0
点赞
收藏
分享

微信扫一扫

CentOS7安装Nginx

玩物励志老乐 2022-01-05 阅读 63
#安装依赖
yum install gcc gcc-c++ pcre-devel zlib-devel openssl-devel -y

#下载安装包
wget http://nginx.org/download/nginx-1.9.9.tar.gz

#进入安装文件目录
cd nginx-1.9.9

#configure --prefix表示将nginx安装至哪个目录
#下面的是一些常用module
./configure --prefix=/usr/local/nginx
--with-http_stub_status_module
--with-http_realip_module --with-http_ssl_module
--with-http_gzip_static_module
--http-client-body-temp-path=/var/tmp/nginx/client
--http-proxy-temp-path=/var/tmp/nginx/proxy
--http-fastcgi-temp-path=/var/tmp/nginx/fcgi

make && make install

示例中nginx版本:1.9.9,其他版本:点此下载

举报

相关推荐

0 条评论