Installation configuration _php tutorial for Debian under APACHE2+MYSQL5+PHP5

Source: Internet
Author: User
Tags drupal

Installing amp

Apt-get Install apache2 mysql-server php5 php5-mysql5

Configure Apache2 Default Site


Join a row

Redirectmatch ^/$/apache2-default/

Testing this step does not require

Modifying the Apache2 master configuration


To change to:

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

Restart Apache2

/etc/init.d/apache2 Reload

Now to configure PHP 5


PHP5 default does not support Mysql, in order to open support, to modify

Set Mysql root Password

The default installation of Mysql, its root user does not have 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


Mysqladmin Reload true techarticle Install amp apt-get install apache2 mysql-server php5 php5-mysql5 Configure Apache2 default site Vi/etc/apache2/sites-enabled/000-default Join a row redirectmatch ^/$/apache2-defaul ...

  • 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: and provide relevant evidence. A staff member will contact you within 5 working days.