Linux LAMP servers are also popular, flexible and reliable as WAMP server. The installation of both servers are very easy and differ from each other. LAMP means Linux Apache Mysql Php, and WAMP is for Windows. WAMP server installs automatically(installer),you are able to use server without touching setting files. While LAMP server installs with commands. Here, I am going to show how to install LAMP server through Terminal on Ubuntu.
To install LAMP server, open up a Terminal window(Ctrl+Alt+t), and type the following commands.
All commands have written in italic words and remember Terminal commands are case sensitive!!
To install Apache:
sudo apt-get install apache2
Now to confirm the installation of Apache2 open http://127.0.0.1 in your web browser, you will see It Works! default page of Apache.
To install Mysql:
sudo apt-get install mysql-server
At the installation you be will asked to provide a root password for Mysql.
To install php:
sudo apt-get install php5 libapache2-mod-php5
After this installation restart Apache [sudo /etc /init.d/apache2 restart] don’t write brackets.
Now make a phpinfo.php file and save that in /var/www to do this use [sudo gedit /var/www/phpinfo.php] write a code in this file
<?php phpinfo(); ?>
Now open http://127.0.0.1/phpinfo.php
To install phpmyadmin:
sudo apt-get install phpmyadmin
Two option window will open in installation one for web server reconfigure automatically[select apache2] and second for configure database for phpmyadmin with dbconfig-common [select No].
You will need to copy the apache.conf to /etc/apache2/conf.d/ from /etc/phpmyadmin/ or the page will return a 404 error. To copy Run-
sudo cp /etc/phpmyadmin/apache.conf /etc/apache2/conf.d
Now you have to restart your apache server
sudo /etc/init.d/apache2 restart
Now open http://127.0.0.1/phpmyadmin
If you want to start blogging and interested in the field of earning money online. Then you should install WordPress CMS to make blog or site. For WordPress installation you should see my tutorial of WordPress installation.
Hope this will helpful for you, for any query or help post comments. Your feedback helps us.