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

Vi/etc/apache2/sites-enabled/000-default

Join a row

Redirectmatch ^/$/apache2-default/

Testing this step does not require

Modifying the Apache2 master configuration

Vi/etc/apache2/apache2.conf

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

Vi/etc/php5/apache2/php.ini

PHP5 default 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 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


http://www.bkjia.com/PHPjc/531671.html www.bkjia.com true http://www.bkjia.com/PHPjc/531671.html 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 ...

  • 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.