Install lamp under Unbuntu server (Linux system)

Source: Internet
Author: User

1.sudo apt-get Update

2.sudo Apt-get Install Apache2

3. Check if the installation was successful: Apache2-v

4.sudo apt-get Update php5

Error occurred: Package PHP5 has no installation candidate

Solve:

sudo add-apt-repository ppa:ondrej/php

sudo apt-get update
sudo apt-get install php5.6

5, check Apache2 support file for PHP exists: cat/etc/apache2/mods-enabled/php5.6.load

If you see a hint at the end of libphp5.6.so that means support

6, installation Mysql:sudo Apt-get install Mysql-server

Enter Password two times

Of course, there will be some unexpected problems when installing, like this way.

Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

Baidu Solution: sudo rm var/lib/dpkg/lock

7. Check that the parser is installed successfully between Php-mysql: Cat/etc/php/5.6/cli/conf.d/20-mysql.ini
If prompted at the end: Extension = mysql.so can be

Note: Different system, different version of the file whose default path may not be the same, all installed detection directory self-tuning

All installations can be resolved with a single command.
sudo apt-get install apache2 php5.6 mysql-server php5.6-mysql

Install lamp under Unbuntu server (Linux system)

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.