QFPAY-NGINX-CENTOS安装基线文档
| 文档标题 | QFPAY-NGINX-CENTOS安装基线文档 |
| 系统发行版 | centos |
| 版本号 | 6.3 |
| 软件版本号 | 1.6.0 |
| 安装方式 | 编译安装 |
| 作者 | 孙红 |
| 日期 | 2014-07-09 |
| 备注 |
安装依赖
yum -y install pcre pcre-devel openssl openssl-devel
切换到qfpay用户
su - qfpay
下载nginx
稳定性起见,安装稍微早点的版本
wget http://nginx.org/download/nginx-1.6.0.tar.gz
解压
tar -xzvv nginx-1.6.0.tar.gz
安装nginx
./configure --prefix=/home/qfpay/nginx/ --conf-path=/home/qfpay/nginx/conf/nginx.conf --pid-path=/home/qfpay/nginx/logs/nginx.pid --with-http_ssl_module --with-http_stub_status_module --user=qfpay --group=qfpay && make -j8 && make -j8 instal
l
修改配置文件
$ cd /home/qfpay/nginx/
$ vim conf/nginx.conf
user qfpay qfpay;
如下
因为linux下面只有root用户才能使用1000以下的端口,所以修改以下监听端口
启动nginx
检查配置
/home/qfpay/nginx/sbin/nginx -t
提示只有超级用户才能运行主进程的警告
su - root
chown root nginx
chmod +s nginx
然后切回qfpay用户
su - qfpay
/home/qfpay/nginx/sbin/nginx -t 检查配置
这次没有OK了
启动
/home/qfpay/nginx/sbin/nginx -c /home/qfpay/nginx/conf/nginx.conf
nginx 就此安装成功。
posted on 2014-07-09 17:11 winterComing 阅读(210) 评论(0) 收藏 举报
浙公网安备 33010602011771号