Installation and configuration of Apache2 + Mysql5 + Php5 In Debian

Source: Internet
Author: User
Tags drupal

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


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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.