Install amp
Apt-get Install apache2 mysql-server php5 php5-mysql5
Configure the Apache2 default site
Vi/etc/apache2/sites-enabled/000-default
Join a line
Redirectmatch ^/$/apache2-default/
The test step does not require
Modifying the Apache2 master configuration
Vi/etc/apache2/apache2.conf
To read:
Include Module Configuration:
Include/etc/apache2/mods-enabled/*.load include/etc/apache2/mods-enabled/*.conf
And also:
AddType application/x-httpd-php. php
AddType Application/x-httpd-php-source. Phps
Reboot Apache2
/etc/init.d/apache2 Reload
Now you want to configure PHP 5
Vi/etc/php5/apache2/php.ini
PHP5 default already does not support Mysql, in order to open support, to modify
Extension=mysql.so
Set Mysql root Password
The default installation of Mysql, its root user does not have a password, is really dangerous, we add a password for him.
Mysqladmin-uroot password ' abc123 '
Where abc123 is your password.
Of course, you can also use the following command to set the password:
Mysql-u Root MySQL
mysql> Update user Set Password=password (' Pass ') where user= ' root ';
Build a library and its users for the site that will be erected
Mysql-u root-p MySQL
mysql> CREATE DATABASE Drupal;
mysql> use Drupal;
Mysql> Grant all on drupal.* to Drupal_user@localhost;
mysql> use MySQL;
Database changed
mysql> Update user Set Password=password (' Pass ') where user = ' Drupal_user ';
Query OK, 1 row Affected (0.00 sec)
Rows matched:1 changed:1 warnings:0
mysql>q;
Mysqladmin Reload