nginx 源码安装
安装nginx
安装pcre库是为了让nginx支持具备URI重写功能的rewrite模块
[root@www ~]# yum install pcre pcre-devel -y
[root@www ~]# rpm -qa pcre pcre-devel
安装nginx 依赖的包 openssl-devel
[root@www ~]# yum install openssl openssl-devel
[root@www ~]# rpm -qa openssl openssl-devel
下载nginx源码包
[root@www tools]# wget -q http://nginx.org/download/nginx-1.9.2.tar.gz
解压
[root@www nginx-1.9.2]# tar xf nginx-1.9.2.tar.gz
[root@www nginx-1.9.2]# cd nginx-1.9.2
配置文件
[root@www nginx-1.9.2]# ./configure --user=nginx --group=nginx --prefix=/application/nginx-1.9.2/ --with-http_stub_status_module --with-http_ssl_module
安装
[root@www nginx-1.9.2]# make
[root@www nginx-1.9.2]# make install