1.yum下载安装gcc、zip、openssl、openssl--devel、pcre
yum install -y gcc zip openssl openssl--devel pcre
2.下载安装nginx
下载地址:http://nginx.org/download/
./configure --sbin-path=/usr/local/nginx \
--conf-path=/usr/local/nginx/nginx.conf \
--pid-path=/usr/local/nginx/nginx.pid \
--with-http_ssl_module\ #开启ssl模块
--with-http_stub_status_module \#启用监控nginx的当前状态
--user=nginx
make && make install
启动服务
/usr/local/nginx/nginx -c /usr/local/nginx/nginx.conf
停止服务
kill -9 pid
打开nginx.conf
修改
server {
server_name xxxx;#域名
}
重启命令
/usr/local/nginx/nginx -s reload
2016/12/4 18:12:07
网友评论