The Lnmp of CentOS

Source: Internet
Author: User
Tags fpm install php
Before you install it again, you can take a look at the installation process of lamp
http://blog.csdn.net/zph1234/article/details/51248124
1. Install nginx
[Python] view plain LNMP Yum install Yum priorities - y WGet http://nginx.org/packages/centos/7/noarch/rpms/nginx-release-centos-7-0.el7.ngx.noarch.rpm RPM - IVH nginx-release-centos-7-0.el7.ngx.noarch.rpm Yum install nginx
[Python] view plain LNMP systemctl start nginx.service of LNMP CentOS of copy CentOS start nginx.service stop systemctl restart nginx.service restart systemctl enable nginx.service
2. Change the nginx port number (according to your own needs)
[Python] view plain LNMP CD / etc / nginx / conf.d/vim default.conf of LNMP CentOS of copy CentOS change listen 80 to listen 81 [Python] view plain LNMP systemctl restart nginx.service of LNMP CentOS of copy CentOS restart nginx
3. Visit http: / / IP: 81 to see the nginx Homepage
4. Next install PHP FPM [Python] view plain copy CentOS LNMP CentOS LNMP Yum install PHP FPM [Python] view plain copy CentOS LNMP CentOS LNMP systemctl start PHP fpm.service start PHP FPM systemctl enable PHP fpm.service
5. Change nginx configuration file to recognize PHP
VI / etc / nginx / conf.d/default.conf, just remove the previous ones, and change fastcgi ﹐ param
[Python] view plain LNMP location ~ \. PHP ${root HTML; fastcgi_
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.