Installing LAMP Server for Newbies
LAMP is not a familiar term for those who don’t know basic and advance programming and web and software development. A LAMP server is a very cost-effective, popular, credible, and user-friendly server. Although it is Linux-based (which is the reason why it isn’t popular to many), it’s actually a very helpful tool or program.
The acronym stands for Linux, Apache, MySQL, and PHP. It is a direct counterpart of the WAMP for Windows. This article deals mainly with providing quality information and instruction for proper installation of the LAMP server.
The kind of computer you will be working with is not a problem if you are worrying about hardware compatibility. The good thing about LAMP is that it can run even on old hardware. You can expect the same server performance.
Installation Requirements
Installation of the LAMP server must start with the installation of the base program – the Linux operating system. L means Linux and you have the liberty to search, download, and install your preferred Linux release. Soon after you’re done putting an operating system, you can begin installing the server.
Apache
Let’s begin with the easiest part of the installation using Apache. Log in via the console menu and input the command:
sudo apt-get install apache2
Next, enter the user password you have for sudo for the installation to proceed. In order to verify installation, you need to check by opening a browser using the IP address of that newly created server. By doing so, you’ll identify if Apache is successfully installed and running.
PHP
For PHP, the first job is to enter:
sudo apt-get install php5 libapache2-mod-php5
Next, wait for the installation to consummate. After everything is complete, restart the previous Apache server with this command:
sudo /etc/init.d/apache2 restart
After that, all you have to do is find the “Test PHP Page” located on the browser page and when you see it, that manifests that everything is up and running.
MySQL
The last line of installation for the LAMP server is MySQL. First step is to perform the command:
sudo apt-get install mysql-server
After entering the said command, the next step is setting up a user password. You can do this by using the command:
mysql -u root
After, you will directed to a prompt where you need to do the following:
SET PASSWORD FOR ‘root’@'localhost’ = PASSWORD(‘YOURPASSWORD’)
The password you set up above will be the one you will use for the MySQL server account.
After coming up with the user password, the last step is starting the server by using the command:
/etc/init.d/mysql start
Finally, everything is set up and you’re good to go!
