Configure apche + php + mysql in linux

Source: Internet
Author: User
Configuring apche + php + mysql in linux recently requires servers to learn about android network development. Therefore, configuring apche + php + mysql in linux takes ubuntu as an example.

Configuration process: 1. install apache

Enter sudo apt-get install apache2 on the terminal

After the installation is complete, open http: // localhost/or http: // 127.0.0.1 in the browser. if the following interface appears, congratulations, apche2 has been installed successfully.

 

2. install php

Enter sudo apt-get install php5 on the terminal

Enter y to continue,

After the installation is complete, you can test whether php is successfully installed.

First, enter the following command on the terminal:

cd /var/wwwsudo gedit phptest.php

Enter the test text in the new text. enter php install success here!

Finally, enter http: // localhost/phptest. php in the address bar of the browser. if the test text is displayed, it indicates that php has been installed successfully.

3. install mysql

Enter sudoapt-get install mysql-server on the terminal

During the installation process, you need to set a password for mysql, and then enter it.

After the installation is successful, enter the sudoapt-get install libapache2-mod-auth-mysql on the terminal to make apche2 support mysql; then enter the sudoapt-get install php5-mysql to make php5 support mysql.


4. restart apache

Enter sudo/etc/init. d/apache2 restart on the terminal to restart apche2. in this way, all the apache + php + mysql configurations in linux are complete, and then you can perform web development.

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.