Install AMP
Apt-get install apache2 mysql-server php5 php5-mysql5
Configure Apache2 default site
Vi/etc/apache2/sites-enabled/000-default
Add a row
RedirectMatch ^ // apache2-default/
This test step is not required
Modify the master configuration of Apache2
Vi/etc/apache2/apache2.conf
To change:
Include module configuration:
Include/etc/apache2/mod-enabled/*. load Include/etc/apache2/mod-enabled/*. conf
Also:
AddType application/x-httpd-php. php
AddType application/x-httpd-php-source. phps
Restart Apache2
/Etc/init. d/apache2 reload
Configure PHP 5 now
Vi/etc/php5/apache2/php. ini
Php5 does not support Mysql by default. To enable it, modify it.
Extension = mysql. so
Set the Mysql Root Password
The root user of Mysql installed by default has no password, which is dangerous. We can add a password for it.
Mysqladmin-uroot password abc123
Here, abc123 is your password.
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;
Create a library and its users for the site to be set up
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