With the release of Ubuntu 15.10, webmasters and new users across the IT universe will be looking for help installing the LAMP stack on it.
LAMP is one of the most successful opensource project in used today.. It’s a combination of Linux operating systems and opensource software applications.
LAMP represents, Linux, Apache2, MySQL and PHP. These opensource software with Linux operating systems make up the LAMP stack.
Majority of the websites and web portals online today run on this stack. By far, the most web application stack, as well.
So, if you’re thinking of running a WordPress blog or other content management platform, then installing and configuring the LAMP stack will be your first challenge.
This brief tutorial is going to show you how to do it in Ubuntu 15.10 if you haven’t already done so.
There are many tutorials across the Internet that will show you how.. but at this blog, we make sure to follow a simple process so everyone, new or old can understand it.
We write very simple tutorials.. for everyone.
So to get started, you’ll want to make sure you already have a functioning Ubuntu 15.10 system.
Since these software applications mostly function on Linux computer, go ahead and install Ubuntu. You should also need root access to the machine.
- Installing Apache2
You first goal is to install Apache2 package. This can be achieved by running the commands below.
sudo apt-get install apache2
Running the above command will install the Apache2 package on your Ubuntu machine.
Now that Apache2 is installed.. if you wish to start it up, you can run the commands below.
sudo systemctl start apache2
To restart Apache2, run the commands below
sudo systemctl restart apache2
One good trick is to always allow Apache2 web server to start up everytime your system boots up or is restarted.. to do that run the commands below.
sudo systemctl enable apache2
- Installing MySQL Server
Your second challenge is to install MySQL server. This is a database package and part of the LAMP stack.
To install MySQL server, run the commands below
sudo apt-get install mysql-server mysql-client
During the installation of MySQL server, you’ll be prompted to create a root (or administrator) password. Type and confirm a password to continue.. you should use the password always to logon to the server.
After installing MySQL server, run the commands below to start it up.
sudo systemctl start mysql
To enable MySQL server to always start up everytime your system boots or restarted, run the commands below.
sudo systemctl enable mysql
- Installing PHP Modules
The final challenge is to install PHP and other modules. PHP is part of the LAMP stack and allows for applications built to run on PHP to function.
To install PHP and useful modules, run the commands below.
sudo apt-get install php5 php5-mysql libapache2-mod-php5
More of PHP modules can be installed to work with other applications and services.. but the commands above allows PHP to function in its basic form.
At this point, Linux, Apache2, MySQL and PHP are installed and ready. To test out if Apache2 and PHP are functioning, create a test page in the root directory and add this file.
sudo vi /var/www/html/testphp.php
The add these lines into the file and save it.
Browse to that page using the server name or IP.. and you should see PHP information page. This page confirms PHP and Apache2 and up and functioning.
MySQL can be tested by checking its status by running the commands below.
sudo systemctl status mysql
This is how to install the LAMP stack on Ubuntu 15.10.