Installation and configuration of Apache2 + Mysql5 + Php5 in Debian

Source: Internet
Author: User
Tags drupal
Install AMPapt-getinstallapache2mysql-serverphp5php5-mysql5 configure Apache2 default site vi/etc/apache2/sites-enabled/000-default add a row RedirectMatch ^/$/apache2-default/test this step not required

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


Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.