Install Apache/PHP/MySQL on Ubuntu _ MySQL

Source: Internet
Author: User
Install ApachePHPMySQL on Ubuntu and use UbuntuApache

System environment: Ubuntu 10.04.4 LTS, x86_64 GNU/Linux

1. install Apache2

1) sudo apt-get install apache2

2) enter the password and perform some operations as prompted.

3) test:

4) modify the default Document Root

* Sudo cp/etc/apache2/sites-available/default/etc/apache2/sites-available/webserver

* Sudo gedit/etc/apache2/sites-available/webserver

* Change the Document Root to point to the location you want. For ex:

DocumentRoot/home/ /Server/

/Server/>

5) activate the new configuration

Sudo a2dissite default & a2ensite webserver

6) restart Apache HTTP Server

Sudo/etc/init. d/apache2 reload

2. install PHP5

1) install PHP5 and Apache PHP5 module

Sudo apt-get install php5 libapache2-mod-php5

2) restart Apache2

Sudo/etc/init. d/apache2 reload

3) test PHP5 is working and write a phpinfo. php file.

Sudo gedit/home/ /Server/phpinfo. php

Input content:

Visit: you can see some basic php information

3. install MySQL

1) sudo apt-get install mysql-server mysql-client

2) install the php5-mysql package for PHP to support MySQL

Sudo apt-get install php5-mysql

3) install phpMyAdmin: MySQL manager

Sudo apt-get install phpmyadmin

Some options:

Web server to configure automatically: Apache2

Configure database for phpmyadmin with dbconfig-common: No

4) you can create some soft links to/home/ /Server (the root directory of Apache2), for example:

Cd/home/ /Server/

Sudo ln-s/usr/share/phpmyadmin

5) access address:

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.