首页 > 代码库 > Nginx编译安装

Nginx编译安装

nginx编译安装  
===========================================  
Nginx官网:http://nginx.org/  
Nginx官网下载地址(选择 Stable version 稳定版):http://nginx.org/en/download.html  
官网安装介绍:http://nginx.org/en/linux_packages.html

一:安装  
  
1.1:环境准备  
    ~]# yum -y install gcc gcc-c++  pcre pcre-devel  openssl-devel  
  
1.2:编译安装  
    ~]# tar -axf nginx-1.10.0.tar.gz  
    ~]# cd nginx-1.10.0/  
    ~]# useradd -r nginx  
    ~]# ./configure --prefix=/usr/local/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-threads --with-stream --with-stream_ssl_module --with-http_slice_module --with-file-aio --with-http_v2_module --with-ipv6  
    ~]# make && make install

1.3:启动与重启停止  
        启动:nginx  
        重载:nginx -s reload  
        快速停止:nginx -s stop  
        有序退出:nginx -s quit 

  

Nginx编译安装