1. first, we need to explain to you that this tutorial is tested on the local machine. to switch the Administrator identity in Ubuntu, you need to use the root identity for operations. Therefore, use the following command to ensure that you log on as root: sudo su www.2cto.com 3. start installing MySQL5 apt-get install mysql-server mysql-client 4. apache2 is installed as a Ubuntu software package, so we can directly install it using the following command: apt-get install Apache2 now, your browser goes to 127.0.0.1, you should see the content on the test page of Apache2. The default file root directory of Apache is the/var/www directory on Ubuntu, And the configuration file is/etc/apache2/apache2.conf. Configure the sub-directories stored in the/etc/apache2 directory. 5. install PHP5 we can directly install PHP5 and Apache PHP5 module, as follows: apt-get install php5 libapache2-mod-php5 installation after the need to restart/etc/init. d/apache2 restart 6. test PHP5 and obtain the installation details of PHP5: The file root directory of the default website is under/var/www. Now we will create a php file (info. php) in this directory to call it in the browser. This file will show a lot of details about our PHP installation, such as the installed PHP version and some useful information. The content of info. php is as follows <? Php phpinfo ();?> Now, we can use a browser to access the file 127.0.0.1/info. php, for example, as you can see, PHP5 works normally, and it works on the Server API line through the Apache 2.0 processing program. If you continue to scroll down, you will see all modules enabled in PHP5. MySQL is not listed, which means that MySQL is not supported in PHP5. Www.2cto.com PHP5 get MySOL support 7. PHP5 get MySOL support for PHP in MySQL. We can install the php-mysql software package. It is a good idea to install some other PHP5 modules and applications you may need: apt-cache search php5 also install the need to install apt-get install php5-mysql php5-curl php5-gd php5-idn php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl now restart Apache2: /etc/init. d/apache2 restart now, reload 127.0.0.1/info. php in your browser and scroll down to the module area again. Now, you should find many new modules, including the MySQL module: Installing phpMyAdmin 8. Installing phpMyAdmin is a network interface through which you can manage your MySQL database. Www.2cto.com apt-get install phpmyadmin you will see the following problem: Web server to reconfigure automatically: <-- apache2Configure database for phpmyadmin with dbconfig-common? <-- No enter 127.0.0.1/phpmyadmin in the address bar: You can access phpmyadmin. NOTE: If pache/2.2.14 (Ubuntu) Server at localhost Port 80 appears, change row 11th of/etc/apache2/sites-available/default to AllowOverride All author But_Bueatiful.