还有可能出现:
错误提示:./configure: error: the HTTP cache module requires md5 functions from OpenSSL library. You can either disable the module by using --without-http-cache option, or install the OpenSSL library into the system, or build the OpenSSL library statically from the source with nginx by using --with-http_ssl_module --with-openssl= options.
解决办法:
yum -y install openssl openssl-devel
安装后在linux下启动和关闭nginx:
启动操作
/usr/nginx/sbin/nginx (/usr/nginx/sbin/nginx -t 查看配置信息是否正确)
停止操作 停止操作是通过向nginx进程发送信号(什么是信号请参阅linux文 章)来进行的 步骤1:查询nginx主进程号 ps -ef | grep nginx 在进程列表里 面找master进程,它的编号就是主进程号了。 步骤2:发送信号 从容停止Nginx: kill -QUIT 主进程号 快速停止Nginx: kill -TERM 主进程号 强制停止Nginx: pkill -9 nginx 另外, 若在nginx.conf配置了pid文件存放路径则该文件存放的就是Nginx主进程号,如果没指定则放在nginx的logs目录下。有了pid文 件,我们就不用先查询Nginx的主进程号,而直接向Nginx发送信号了,命令如下: kill -信号类型 '/usr/nginx/logs/nginx.pid'平滑重启 如果更改了配置就要重启Nginx,要先关闭Nginx再打开?不是的,可以向Nginx 发送信号,平滑重启。 平滑重启命令: kill -HUP 住进称号或进程号文件路径
或者使用
/usr/nginx/sbin/nginx -s reload