CentOS 6.5 安裝nginx 1.6.3
使用epel
[[email protected] /]# wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
下載nginx 1.6.3
[[email protected] /]# wget http://nginx.org/download/nginx-1.6.3.tar.gz
安裝前準備
安裝pcre (安裝pcre庫是為了Nginx支持HTTP Rewrite 模塊)
[[email protected] /]# yum -y install pcre pcre-devel
安裝openssl
[[email protected] /]# yum -y install openssl openssl-devel
gcc編譯器
[[email protected] /]# yum -y install gcc gcc-c++
解壓
[[email protected] /]# ll nginx-1.6.3.tar.gz -rw-r--r-- 1 root root 805253 Apr 8 2015 nginx-1.6.3.tar.gz [[email protected]
創建nginx用戶
[[email protected] nginx-1.6.3]# useradd nginx -s /sbin/nologin -M
配置、編譯、安裝
[[email protected] nginx-1.6.3]# ./configure --user=nginx --group=nginx --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module [[email protected]