首页 > 代码库 > Linux下安装Nginx

Linux下安装Nginx

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

二、安装依赖模块:
4yum -y install gcc gcc-c++ autoconf automake make
5yum -y install zlib zlib-devel openssl openssl--devel pcre pcre-devel
6yum -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 8make 9make install 10、cd /usr/local/nginx-1.8.1/sbin
四、启动:
11、./nginx 五、常用命令 ./nginx -s reload 重启 ./nginx -v 加载 ./nginx -s stop 停止 ./nginx -t 查看配置是否正确

 

Linux下安装Nginx