I. Installation APACHE2
1. Enter the sudo apt-get install apache2 to download the installation apache2
2. Enter Y to confirm
3. Successful Installation
After the Apache installation is complete, the default Web site root is "/var/www/html", enter "ls/var/www/html" in the terminal window, and enter the "index.html" file in the Web root directory, in the browser type " 127.0.0.1 "-Enter, you can open the page.
----------Configuration---------
4. Change the port number
In the terminal window, enter "Cd/etc/apache2 ls"--and a "ports.conf" configuration file.
sudo vi ports.conf Open with administrator privileges. conf
I is the editor
X is delete
ESC is exit Edit
Q is exited and not saved
Wq is to exit and save
To enter Q or Wq before entering: (colon)
After modifying ports.conf, there are changes 000-default.conf
Enter "Sudo/etc/init.d/apache2 Restart" in the terminal window----Enter the root user password--Enter and restart successfully.
127.0.0.1:8080
Two. Installing PHP5
1.sudo apt-get Install php5 input Password Enter confirmation
2. Enter Y to confirm successful installation
3. let Apache support php input "sudo apt-get install LIBAPACHE2-MOD-PHP5"--and return-to-install.
4. Install the PHP5-GD module input "sudo apt-get install PHP5-GD"-------and the installation is complete.
5. Use Gedit to create the info.php file under "/var/www/html", enter "sudo gedit/var/www/html/info.php" and enter "<?php" in the editor Phpinfo ();?> "-Save, file created successfully.
6. Test whether Apache can parse the PHP page in Firefox and enter "127.0.0.1\info.php"-The PHP version information page appears, indicating that the PHP installation configuration is successful.
Three. Install MySQL
1. Enter "sudo apt-get install Mysql-server mysql-client"-and enter "Y"--enter "root" in MySQL in the "Package Setup dialog box" The user's password--Enter and lose the password again--Enter, the installation is complete.
2. Enter "sudo service mysql restart"-and carriage return-if MySQL boot is successful, the MySQL installation is successful.
3. Let Apache support MySQL, enter "sudo apt-get install Libapache2-mod-auth-mysql"-----the installation is successful, after installing this module, Apache can support MySQL.
4. Let PHP support MySQL ", enter" sudo apt-get install Php5-mysql "-----the installation is successful, after installing this module, PHP can support MySQL.
5. Log in to MySQL ", enter" Mysql-u root-p "and enter the password for the" root "user in MySQL--and return to login success.
6. Test whether PHP supports MySQL
7. Success
Apache+php+mysql Chinese Configuration