1. 所需库的安装
- pcre库
- 下载地址: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
- 安装指令:
1
2
3./configure
make
make install
- zlib库
- 下载地址: http://www.zlib.net/
*安装指令:1
2
3./configure
make
make install
- 下载地址: http://www.zlib.net/
2. 安装nginx
安装指令:
1
2
3./configure --prefix=/usr/local/nginx
make
make install安装完毕后开启nginx服务器:
1
/usr/local/nginx/sbin/nginx
启动之后在浏览器输入: http://localhost ,若能出现welcome to nginx!的界面则说明安装成功
重启、关闭nginx服务器
1
2/usr/local/nginx/sbin/nginx -s reload
/usr/local/nginx/sbin/nginx -s stop