Installation configuration for Apache2 Mysql5 Php5 under Debian

Source: Internet
Author: User
Tags create database drupal

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

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.