本章节,主要讲述Nginx 安装配置,讲述如何安装和配置Nginx,Nginx 编译安装,Nginx 配置文件测试等
1、安装pcre
./configure
make && make install
cd ../
2、Nginx 编译安装
./configure --user=www --group=www --prefix=/usr/local/Nginx/ --with-http_stub_status_module
--with-openssl=/usr/local/openssl
make && make install
更详细的模块定制与安装请参照官方wiki.
3、Nginx 配置文件测试:
[root@Chinarenservice ~]# /usr/local/nginx/sbin/nginx -t
2008/12/16 09:08:35 [info] 28412#0: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
2008/12/16 09:08:35 [info] 28412#0: the configuration file /usr/local/nginx/conf/nginx.conf was tested successfully
4、Nginx 启动:
[root@Chinarenservice ~]# /usr/local/nginx/sbin/nginx
5、Nginx 配置文件修改重新加载:
[root@Chinarenservice ~]# kill -HUP `cat /usr/local/nginx/logs/nginx.pid`
本文版权所有,转载须注明:来源 https://www.qvdv.net/qvdv-zhuji-797.html