Linux下安装Nginx

一、下载:
1、wget wget http://nginx.org/download/nginx-1.8.1.tar.gz
2、tar -zxvf nginx-1.8.1.tar.gz
3、cd nginx-1.8.1

二、安装依赖模块:
4、yum -y install gcc gcc-c++ autoconf automake make
5、yum -y install zlib zlib-devel openssl openssl--devel pcre pcre-devel
6、yum -y install openssl openssl-devel

三、编译安装
7、./configure --prefix=/usr/local/nginx-1.8.1 --with-http_ssl_module --with-http_spdy_ module --with-http_stub_status_module --with-pcre 8、make 9、make install 10、cd /usr/local/nginx-1.8.1/sbin
四、启动:
11、./nginx 五、常用命令 ./nginx -s reload 重启 ./nginx -v 加载 ./nginx -s stop 停止 ./nginx -t 查看配置是否正确

 

posted @ 2016-10-26 15:49  伍叶春  阅读(143)  评论(0)    收藏  举报