Linux operating system installation lamp environment, Linux operating system lamp
Step1. Installing Apache
Enter a command in terminal
Copy the Code code as follows: sudo apt-get install apache2
Open the browser, enter in the Address bar: 127.0.0.1, if an "It works!" appears, the installation is successful
Step2. Installing PHP5
In the terminal, enter:
Copy the Code code as follows: sudo apt-get install php5 libapache2-mod-php5 php5-mysql
Restart Apache2:
Copy the Code code as follows: Sudo/etc/init.d/apache2 restart
Note: If you want to turn off the Apache service, you can execute the following command:
Sudo/etc/init.d/apache2 stop
If you want to open the Apache service, you can execute the following command:
Sudo/etc/init.d/apache2 start
MySQL restart, shutdown, and start commands are also similar to the corresponding commands for apache2
To test whether the PHP5 was installed successfully:
Copy the Code code as follows: sudo gedit/var/www/testphp.php
In the file of the open file, enter the following PHP code:
Copy the Code code as follows: <?php phpinfo ();?>
Save and close the file, enter the following IP address in the browser address bar: 127.0.0.1/testphp.php, if there is information about PHP, the installation of PHP is successful
Step3. Install MySQL
Enter the following command in terminal and execute:
Copy the Code code as follows: sudo apt-get install mysql-server mysql-client
During the installation process, you will be presented with a password-setting interface for the root user in MySQL, just follow the prompts.
Step4. Installing phpMyAdmin
Enter the following command in the terminal and execute
Copy the Code code as follows: sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
Adjust the permissions of the/VAR/WWW directory to facilitate editing of Web site files later.
Copy the Code code as follows: sudo chmod 777/var/www
The above is the whole content of this article I hope you can enjoy.
http://www.bkjia.com/PHPjc/1022780.html www.bkjia.com true http://www.bkjia.com/PHPjc/1022780.html techarticle Linux operating system installed lamp environment, Linux operating system lamp Step1. Install Apache in terminal enter the command to copy the code as follows: sudo apt-get install apache2 Open Browser, in ...