Centos7.2 源码安装Nginx
时间:2016-11-15 11:18 来源:linux.it.net.cn 作者:IT
# uname -r
3.10.0-327.el7.x86_64
# ./configure --prefix=/usr/local/nginx
# yum install gcc gcc-c++ zlib-devel pcre-devel openssl-libs openssl -y
# ./configure --prefix=/usr/local/nginx
# make
# make install
# vim /etc/profile.d/http.sh
1 export PATH=/usr/local/nginx/sbin:$PATH
# source !$
# nginx -h
nginx version: nginx/1.10.2
Usage: nginx [-?hvVtTq] [-s signal] [-c filename] [-p prefix] [-g directives]
Options:
-?,-h : this help
-v : show version and exit
-V : show version and configure options then exit
-t : test configuration and exit
-T : test configuration, dump it and exit
-q : suppress non-error messages during configuration testing
-s signal : send signal to a master process: stop, quit, reopen, reload
-p prefix : set prefix path (default: /usr/local/nginx/)
-c filename : set configuration file (default: conf/nginx.conf)
-g directives : set global directives out of configuration file
# iptables -A INPUT -d 192.168.30.10 -p tcp --dport 80 -m state NEW -j ACCEPT
(责任编辑:IT)
|




