AllsWeb Blog
No Result
View All Result
  • Home
  • Main Home
  • PHP and MySQL
  • JavaScript
    • jQuery & AJAX
  • WordPress
  • SEO
  • Web Hosting
  • Comparison
Support
Knowledgebase
  • Home
  • Main Home
  • PHP and MySQL
  • JavaScript
    • jQuery & AJAX
  • WordPress
  • SEO
  • Web Hosting
  • Comparison
No Result
View All Result
AllsWeb White Logo
No Result
View All Result
Home Web Hosting

How to Install LAMP (Linux, Apache, MySQL, PHP) on Ubuntu

Linux, Apache, MySQL, PHP

Lakshika Mathur by Lakshika Mathur
January 1, 2020
Reading Time: 2 mins read
0
How to Install LAMP (Linux, Apache, MySQL, PHP) on Ubuntu

LAMP means Linux, Apache, MySQL, and PHP is an open source software stack. Therefore, you can use LAMP to configure the web server and host the web content. In this tutorial, we have explained to you a step by step method of how to install Linux, Apache, MySQL, and PHP on Ubuntu. Linux part is taken care of by Ubuntu; you only have to install the rest.

RELATED POSTS

Hosting a Website in Abroad or India: What is Better?

How To Host A Website? Beginner’s Guide!

Discover What is VPS Hosting? (A Complete Guide)

Follow the given steps to setup LAMP and install Apache, MySQL, and PHP on Ubuntu 14.04.

1: Install Apache

Apache is the world’s popular open-source web server software. Therefore, to install Apache on Ubuntu, open the terminal and type the following commands.

sudo apt-get update
sudo apt-get install apache2

2: Install MySQL

MySQL is an open-source relational database management system. So, to install MySQL on Ubuntu, open the terminal and type the following commands.

sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql

SEE ALSO: How to Create Loader Animation with CSS

3: Install PHP

PHP is an open-source server-side scripting language. To install PHP on Ubuntu, open the terminal and type the following commands.

sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt

Well done! You did the installation of a LAMP stack on Ubuntu.

4: Restart Server

Apache will automatically restart after the installation of both PHP and MySQL. However, you can restart the Apache server manually by executing the following commands.

sudo service apache2 restart

5: Check Apache

Open your browser and run this URL – http://localhost/. You’ll see a message saying, “It works!”.Step 6:

6: Check PHP

Now check whether PHP is working.

Create a new PHP file (info.php) in the /var/www/ directory and place the following code. 

<?php
phpinfo();
?>

Open the http://localhost/info.php URL on the browser. If it displays the PHP info on the screen, PHP is working correctly.

Also, read our previous blog- Display Loading Image While Page Loads using jQuery and CSS

Tags: LAMPUbuntu
ShareTweetSendShareSharePinScan
Lakshika Mathur

Lakshika Mathur

Related Posts

Hosting a Website in Abroad or India: What is Better?
Web Hosting

Hosting a Website in Abroad or India: What is Better?

February 9, 2022
21
How To Host A Website? Beginner's Guide! 5 steps for web hosting.
Web Hosting

How To Host A Website? Beginner’s Guide!

February 9, 2022
13
Discover What is VPS Hosting? (A Complete Guide)
VPS Server

Discover What is VPS Hosting? (A Complete Guide)

February 9, 2022
12
What you require to know while selecting your domain and hosting plan?
Web Hosting

What you require to know while selecting your domain and hosting plan?

February 8, 2022
13
Free Hosting Vs. Paid Hosting: Know the 10 Remarkable Differences.
Comparison

Free Hosting Vs. Paid Hosting.

February 8, 2022
7
Apply these Secrets to Secure your VPS. And Tips to Secure your VPS.
Security

Apply these Secrets to Secure your VPS.

February 8, 2022
12
Next Post
How to Connect to the Remote MySQL Database using PHP

How to Connect to the Remote MySQL Database using PHP

Form Validation using jQuery Validation Plugin

Form Validation using jQuery Validation Plugin

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • Comparison (3)
  • HTML & CSS (9)
  • Interesting Facts (1)
  • JavaScript (27)
    • jQuery & AJAX (18)
  • PHP and MySQL (48)
  • Security (10)
  • SEO (2)
  • Trademark (2)
  • Tutorials (5)
  • Uncategorized (1)
  • Web Hosting (19)
    • VPS Server (5)
  • WordPress (8)

Recent Posts

  • Is the Trademark valuable to your Brand or domain?
  • Ideas For Ten Fantastic Online Business From Home
  • Some best free WordPress Themes for Affiliate Marketing Websites
  • Home
  • Posts
  • Privacy Policy
  • Terms and Conditions

Built and Maintained With ♥ by AllsWeb Team

No Result
View All Result
  • Home
  • Main Home
  • PHP and MySQL
  • JavaScript
    • jQuery & AJAX
  • WordPress
  • SEO
  • Web Hosting
  • Comparison

Built and Maintained With ♥ by AllsWeb Team

Go to mobile version