Quick installation of php environment in Ubuntu

Source: Internet
Author: User
Today, it hurts a bit. I installed a php environment in Ubuntu, that is, MySQL, PHP, and Apache. It's really easy to say... I can't help but remember that when I was developing under windows, I couldn't install it, and one was just a few G... At last, easyPHP is used (but it is really easy to use. It is strongly recommended ).

Today, it hurts a bit. I installed a php environment in Ubuntu, that is, MySQL, PHP, and Apache. It's really easy to say... I can't help but remember that when I was developing under windows, I couldn't install it, and one was just a few G... At last, easyPHP is used (but it is really easy to use. It is strongly recommended ).

Today, it hurts a bit. I installed a php environment in Ubuntu, that is, MySQL, PHP, and Apache. It's really easy to say... I can't help but remember that when I was developing under windows, I couldn't install it, and one was just a few G... EasyPHP is used at last (but it is really easy to use. It is strongly recommended)

Ubuntu's powerful package management tool allows us to install the environment through several commands.

1 # install mysql 2 3 sudo apt-get install mysql-server 4 5 # After this is done, there will be Part 6 that requires entering the root user password 7 sudo apt-get install mysql-client 8 9 # install apache10 11 sudo apt-get install apache212 13 # install php14 15 sudo apt-get install php516 17 # install the connection relationship (directly configured, windows to change the case of that don't have to worry about) 18 19 sudo apt-get install libapache2-mod-auth-mysql20 21 sudo apt-get install php5-mysql

Then the detection result is:

Enter localhost in the browser to see the following interface, indicating that Apache is successfully installed.

Enter

Mysql-username-password

Successful Login is the success rate of mysql.

Verify that php is slightly inconvenient due to permission issues. The default installation path of Apache is/var/www /. We need to create a PHP file under it, but the user does not have the permission. First, we need to obtain the permission:

Su root
Chown username/var/www

Then write a PHP file and output phpinfo.

The file is as follows:

 

The interface displayed successfully is:

Now the environment configuration is complete, so easy ~~~

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.