Ali resolved under a cloud ubuntu12.04 environment configuration Apache + PHP + PHPmyadmin + MYsql

This article is configured Apache + PHP + PHPmyadmin + MYsql the specific operational procedures at Ali cloud environment ubuntu12.04 a detailed analysis of introduction, refer to the next friend in need

IP and other related settings used in this tutorial, do the appropriate modifications in your environment.
Before using the update apt-get, because the server system is basically a naked
APT-GET Update;
APT-GET upgrade;
. 1 we use the root account for installation, first switch to the root account, enter the command:
the sudo SU

2 Installing MySQL 5
enter the command:
APT-GET install MySQL-Server MySQL-Client
installation process need to set the root account password, the system will make the following prompt:
New password for at The MySQL "root" the User: the Repeat password for theMySQL "root" the User :

3 Installing Apache2
enter the command:
APT-GET install apache2
in your browser and enter the server address included http://192.168.0.100 see if Apache2 work, if the display (Itworks!), Explained that it had to work.
Apache in Ubuntu default document root is / var / www, /etc/apache2/apache2.conf profile, additional configuration store subdirectories / etc / apache2 example, / etc / apache2 / mods-enabledas Apache module), / etc / apache2 / sites-enabled (virtual host virtual hosts), and /etc/apache2/conf.d.

4 Installing PHP5
install PHP5 and the Apache PHP5 module:
APT-GET install php5 libapache2-MOD-php5
(if there is content that is installed can not find the need to update apt-get, execute apt-get update)
and then restart the Apache:
/ etc / the init .d / apache2 restart

5 Testing PHP5 / probe can build a page
vi /var/www/info.php
contents enter the following:
<PHP?
; Phpinfo ()
?>
And then open the browser to access (http://127.0.0.1/info.php ):
you can see some of the modules already supported.

6 get MySQL support for PHP5
we need to install php5-mysql, first look at the php5 module
APT-MySQL-Cache Search php5
php5-MySQL - MySQL Module for php5http: //www.bbqmw.net/qm_yeqm/ baby named
php5-mysqlnd - MySQL module for php5 (Native Driver
) and install the required module, for example the following command:
APT-GET-MySQL PHP5 the install 
APT-GET-mysqlnd PHP5 the install
the sudo APT-GET-MOD for libapache2 the install PHP5 PHP5 PHP5-CGI-php5- the Common-php5 php5-cli php5-gd php5-curl php5-pgSQL MySQL
sudo a2enmod php5

difference what php5 modules on the installation of php5 modules, ubuntu install php5 module's still very easy to
following modules of their choice to install some modules are not necessarily correct
apt-get install php5-mysql php5tidyphp5-xmlrpc php5-xsl
Restart Apache2:
/etc/init.d/apache2 restart
and then once you http://127.0.0.1/info.php brush is not view the module support has increased.

7 phpMyAdmin
installation phpmyadmin to manage MySQL:
APT-GET the install phpmyadmin
phpmyadmin provided:
during the installation process will be asked to select the Web server: apache2 or lighttpd, select apache2, and then press the OK tab key. Mysql database will then be asked to set the connection password password Password of the database's administrative user.
Then establish a connection with phpmyadmin apache2, In my example: www directory in / var / www, phpmyadmin in / usr / share / phpmyadmin directory, so I use the command: sudo ln -s / usr / sharewww establish a connection.

Guess you like

Origin www.cnblogs.com/murongyuling/p/11038378.html