Installation of Nginx

Source: Internet
Author: User

This article mainly introduces Nginx installation process, does not include configuration.

1. Configuring the installation Environment

Yum Groupinstall "Development Tools" "Server Platform" Yum install Pcre-devel Openssl-devel

2. Create a new running account:

Groupadd-r Nginxuseradd-r-G nginx

3. View the Help file:

./configure--help | less

4. Compile and install:

#./configure--prefix=/usr/local/nginx--conf-path=/etc/nginx/nginx.conf--user=nginx--group=nginx-- Error-log-path=/var/log/nginx/error.log--http-log-path=/var/log/nginx/access.log--pid-path=/var/run/nginx/ Nginx.pid--lock-path=/var/lock/nginx.lock--with-http_ssl_module--with-http_stub_status_module--with-http_gzip_ Static_module--with-http_flv_module--with-http_mp4_module--http-client-body-temp-path=/var/tmp/nginx/client-- Http-proxy-temp-path=/var/tmp/nginx/proxy--http-fastcgi-temp-path=/var/tmp/nginx/fastcgi# make && make Install

5. Check the installation status:

/usr/local/nginx/sbin/nginx-t

6. Start Nginx (before service script is configured):

/usr/local/nginx/sbin/nginx

7. Close Nginx:

killall nginx

8. Service Script settings:

Vim/etc/rc.d/init.d/nginx service script, available according to document settings chmod +x/etc/rc.d/init.d/nginxchkconfig--add nginxchkconfig--list Nginxservice Nginx Start

9. Start the service, the normal running page is displayed as follows:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/73/57/wKioL1X6u3Th4rx8AAETZu8q8nY593.jpg "title=" 1.png " alt= "Wkiol1x6u3th4rx8aaetzu8q8ny593.jpg"/>

This article is from the "Lifelong Learning" blog, please be sure to keep this source http://chickengg.blog.51cto.com/10402610/1695828

Installation of Nginx

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.