1. Install apachesudoapt-getinstallapache2 in order to test whether apache2 is normal, access http: // localhost/or http: // 127.0.0.1/, appear ItWorks! The installation is successful. 2. During mysqlsudoapt-getinstallmysql-server Installation, MySQL requires that the account have a password, which is an account and password that is irrelevant to the operating system. 3. Installation
1. install apache
Sudo apt-get install apache2
To test whether apache2 Works properly, access http: // localhost/or http: // 127.0.0.1/To see It Works! The installation is successful.
2. Install mysql
Sudo apt-get install mysql-server
During the installation process, MySQL requires that the account have a password, which is the account and password that has nothing to do with the operating system.
3. Install related modules
Sudo apt-get install libapache2-mod-php5 libapache2-mod-auth-mysql php5-mysql
Restart apache after installation:
Sudo/etc/init. d/apache2 restart
Why install php5-mysql?
This software package writes a configuration file to the/etc/php5/conf. d directory, enabling PHP to support mysql.
Why install libapache2-mod-php5?
Reference Ubuntu best solution http://www.linuxidc.com/linux/2011-07/39170.htm: because when we install this package, it will automatically write PHP configuration files php5.conf and php5.load to/etc/apache2/mod-available, and link them to the/etc/apache2/mod-enabled directory. At the end of the installation, the software package automatically loads the apache configuration, and php can run on apache. You do not need to manually associate Apache with PHP.
To test whether PHP is normal, create an info. php file under/var/www with the following content:
Access: http: // localhost/info. php. The php configuration information is displayed.
The configuration file of apache2 is stored in/etc/apache2/apache2.conf, the web file is stored in/var/www, And the mysql file is stored in/var/lib/mysql.
4. Install phpmyadmin
Sudo apt-get install phpmyadmin
After the installation is complete, access: http: // localhost/phpmyadmin/. The prompt is not found. You also need to put the installed phpmyadmin folder into/var/www /.
Sudo ln-s/usr/share/phpmyadmin // var/www/
Or copy phpmyadmin directly to/var/www.
5. Install adminer
Adminer is a PHP file, which is downloaded from http://www.adminer.org/and stored in /var/www /. For example, create a new adminer folder in/var/www, put the downloaded adminer-3.5.1.php or other versions into this folder, then access http: // localhost/adminer/, click the PHP file.