/data/server/nginx/sbin/nginx # start server
/data/server/nginx/sbin/nginx -s stop # fast shutdown
/data/server/nginx/sbin/nginx -s quit # graceful shutdown
/data/server/nginx/sbin/nginx -s reload # reloading the configuration file
/data/server/nginx/sbin/nginx -s reopen # reopening the log files
至此,nginx的安装与最基本的配置已完成
configure过程可能出现的情况
缺少C编译器,需要安装gcc
运行安装命令,yum install -y gcc
未安装PCRE
运行安装命令,yum install -y pcre pcre-devel
缺少安全库
运行安装命令,yum install -y openssl openssl-devel
更多Nginx相关教程见以下内容:
搭建基于Linux6.3+Nginx1.2+PHP5+MySQL5.5的Web服务器全过程
CentOS 6.3下配置Nginx加载ngx_pagespeed模块
Ubuntu 16.04 LTS 上安装 Nginx、MariaDB 和 HHVM 运行 WordPress