Install the LNMP environment using apt-get In Ubuntu 14.04

Source: Internet
Author: User

Install the LNMP environment using apt-get In Ubuntu 14.04

1. Use root to log on to the Ubuntu 14.04 host and execute the following command:

Sudo apt-get install nginx
Sudo apt-get install php5
Sudo apt-get install php5-fpm
Sudo apt-get install mysql-server set the root password
Sudo apt-get install phpmyadmin select lighttp here nginx is not apache2

2. An error occurs during MySQL installation:

1.1 according to the official solution, the solution still cannot be solved

1.2 change ubuntu14.04 source upgrade

Vim/etc/apt/sources. list

Deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
Deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
Deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
Deb http://archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse
Deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
The deb-src http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
Deb-src http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
Deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
The deb-src http://archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse
The deb-src http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
Deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse

1.4 execute the upgrade command
Apt-get update

3. Set the MySQL password to log on to MySQL for viewing

4. Configure nginx to support copying nginx vhost Templates using php
1.1: cp/etc/nginx/sites-enabled/default open the following content and add index. php at the root location

1.2: fastcgi_pass 127.0.0.1: 9000; the sock connection is not used.
1.3: Modify php. ini to configure vim/etc/php5/fpm/php. ini

1.4: use TCP to connect to vim/etc/php5/fpm/pool. d/www. conf

Comment out sock
5. Restart the service

/Etc/init. d/php5-fpm restart
/Etc/init. d/nginx restart

6. Write a phpinfo file in the nginx vhost directory.
<? Php
Phpinfo ();
?>

7. Run the following command to check whether PHP5 supports MySQL:
Apt-cache search php5
Run the following command to install
Apt-get install php5-mysql php5-curl php5-gd php5-intl php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp
The same is true for accelerators.
Apt-get install php5-XCache
Restart the server
/Etc/init. d/php5-fpm restart
/Etc/init. d/nginx restart

Php5-fpm in the use of service calls from the new reload and restart will appear not loaded production test the following article

LNMP Installation Reference:

Build LNMP in Ubuntu 14.04

Ubuntu 14.04 LTS install LNMP Nginx \ PHP5 (PHP-FPM) \ MySQL

Install the LAMP \ Vsftpd \ Webmin \ phpMyAdmin service and settings in Ubuntu 13.04

Nginx startup failure occurs during LNMP deployment.

Ubuntu install Nginx php5-fpm MySQL (LNMP environment setup)

Related Article

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.