您的位置:首页 > 运维架构 > Nginx

Linux安装Nginx

2017-05-15 17:46 218 查看

Linux安装Nginx

Linux安装Nginx,如果可以yum那其实挺好的,但是在没用yum功能的情况,我们只能自己安装Nginx并且安装其依赖包。

注:
Nginx的主要依赖包:
zlib-1.2.11 
openssl-1.0.2h
pcre-8     

解压完依赖包之后,解压nginx程序包。通过configure配置进行安装前基本配置,参数如下:
./configure --prefix=/usr/local/nginx \

--with-http_v2_module \

--with-http_ssl_module \

--with-http_realip_module \

--with-http_gzip_static_module \

--with-http_stub_status_module \

--with-pcre=/home/weblogic/nginx/pcre-8.39 \

--with-zlib=/home/weblogic/nginx/zlib-1.2.11 \

--with-openssl=/home/weblogic/nginx/openssl-1.0.2h \  
检查完毕之后, 使用make && make install进行安装检查和安装。

最后安装成功后,去/usr/local/nginx目录下进行nginx.conf的配置和启动

启动参数/sbin目录下:
./nginx    启动
./nginx  -s stop  停止
./nginx -s reload 重启
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: