1.How to set up Lamp server,
2.How to set up phpMyAdmin,
3.Change the default server directory.
Advantages of using it in Linux:
2.Best suited for development.
Setup Lamp Server:
1.Download Lamp server using the following command in Ubuntu
Open terminal using Ctrl+Alt+T key combinations
Enter the following code in the terminal
sudo apt-get install lamp-server^
Enter your password and now Lamp sever begins downloading.
2.After downloading it prompts you to enter root password for the mysql database. Enter a password for root and enter OK.
What is phpMyAdmin ?
phpMyAdmin is a free and open source tool written in PHP intended to handle the administration of MySQL with the use of a web browser. It can perform various tasks such as creating, modifying or deleting databases, tables, fields or rows; executing SQL statements; or managing users and permissions.
1.To install phpMyAdmin in ubuntu enter the following code in the terminal
sudo apt-get install phpmyadmin
Enter your password and now phpMyAdmin starts downloading.
2.After downloading a window opens to configure phpMyAdmin. Check apache2 and select ok.
3.In next step select yes and enter the password for database administrative user and mysql password.
4.Now phpMyAdmin is successfully setup in your linux system. To test this enter 127.0.0.1/phpmyadmin in your browser address bar. It works…
Change default server directory:
After installing lamp server the default sever directory is /var/www
To change the default directory to your prefered directory follow the instructions.
1.Enter the following code in the terminal
sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/mysite
sudo gedit /etc/apache2/sites-available/mysite
2.Now a text editor opens . Change the /var/www to your prefered directory.
Here I changed /var/www to /home/rajamalw/public_html , then save the file and exit.
5.To test your website copy the website directory to changed new directory and open 127.0.0.1, You will see the list of directories and select the directory to test in your local server.
6.If you need a customised home page for your server to manage your project
Download the index.php from the below link and paste in your root of the server directory.
You will get a page like this where you can see all your projects listed and link to phpmyadmin page.