Install the LAMP environment on the Linux operating system of the Ubuntu branch, and run Ubuntu. Ubuntu branch Linux operating system install LAMP environment, ubuntulampStep1. install Apache in terminal input command sudoapt-getinstallapache2 open the browser, in the address bar input: 127.0 Ubuntu branch Linux operating system install LAMP environment, login tulamp
Step1. install Apache
Enter the command in terminal
sudo apt-get install apache2
Open your browser and enter 127.0.0.1 in the address bar. if "It works!" appears !", Indicates that the installation is successful.
Step 2 install php5
In terminal, enter:
sudo apt-get install php5 libapache2-mod-php5 php5-mysql
Restart apache2:
sudo /etc/init.d/apache2 restart
Note: to disable the apache service, run the following command: Sudo/etc/init. d/apache2 stop To open the apache service, run the following command: Sudo/etc/init. d/apache2 start The restart, close, and start commands of mysql are similar to those of apache2. |
Test whether php5 is successfully installed:
sudo gedit /var/www/testphp.php
In the open file, enter the following php code:
Save and close the file. in the address bar of the browser, enter the following ip address: 127.0.0.1/testphp. php. if any information about php appears, it indicates that php is successfully installed.
Step 3 install mysql
Run the following command in terminal:
sudo apt-get install mysql-server mysql-client
During the installation process, the password setting interface is displayed for the root user in mysql. just follow the prompts.
Step 4. install phpmyadmin
Enter the following command in terminal and execute
sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
Adjust the permissions of the/var/www directory to facilitate editing website files in the future.
sudo chmod 777 /var/www
Step1. install Apache. in terminal, enter the command sudo apt-get install apache2 to open the browser. in the address bar, enter 127. 0...