- 安装开发工具包:
yum groupinstall -y "Development Tools*"
50多个,安装了好久……
- 下载Nginx:
http://nginx.org/en/download.html
Development version #开发版本,有不稳定因素
stable version #稳定版本
Legacy versions #一些老版本wget http://nginx.org/download/nginx-1.6.2.tar.gz
tar -xvf nginx-1.6.2.tar.gzcd nginx-1.6.2#进入解压目录
./configure#运行configure进行编译#编译出现如下错误:./configure: error: the HTTP rewrite module requires the PCRE library. You can either disable the ……
#解决办法
yum -y install pcre-devel openssl openssl-devel然后再进入nginx目录编译
make - 安装Nginx:
make install#进行安装
- 运行Nginx服务器:
#Nginx默认目录在 /usr/local/nginx/
cd /usr/local/nginx/sbin
./nginx#运行Nginx服务器