Install LAMP-SERVER, linux, apache, mysql, php
Do you want to install LAMP-SERVER on Ubuntu Linux ?
LAMP stands for Linux, Apache, Mysql, Php
Its a package containing all required packages which are needed on  linux for developing php application with apache server and mysql  database server.
You can install each of the packages individually or just install a single package containing all this in one single command.
Which one you will prefer ?
 Don’t worry ! I will show you both the methods…. 
Install all packages separately
Perform following commands
sudo apt-get install apache2Now one all installation is done, just make sure that it is installed and working properly.
Try http://localhost/ or http://YOUR_IP_ADDRESS
It will show you a message in web page “It Works!” means “It is working”.
Now next step install php and required libraries & modules.
sudo apt-get install php5 libapache2-mod-php5Once installation is done, restart apache.
sudo /etc/init.d/apache2 restartNow make sure that PHP is working. Just create a simple php file in /var/www folder.
sudo gedit /var/www/check.phpOnce editor is opened then put following code in that file.
<?phpecho "PHP is also working.";phpinfo();
?>
Save & Close file.
Now open http://localhost/check.php
If you see a message “PHP is also working.” along with some more information about PHP, then its done. Its working.
If its not working then try to restart your computer and then try again.
Now next step is installing MySQL.
sudo apt-get install mysql-serverNow once this is over, first thing is we have to set the root password of MySQL.
mysql -u rootNow you will get a mysql terminal/command prompt.
mysql>SET PASSWORD FOR 'root@'localhost' = PASSWORD('ENTER YOUR PASSWORD');Thats all ! You are done with installation.
If you like to work with GUI for databases, then you should install “PHPMYADMIN”.
sudo apt-get install libapache2-mod-auth-mysql phpmyadminOnce installation is started it will ask you for selecting server,  there you select apache2 by hitting “SPACE” key and continue  installation.
Test phpmyadmin in browser by http://localhost/phpmyadmin
Comments
Post a Comment