Linux下编译安装nginx1.15.7

Linux下编译安装nginx1.15.7

   张吉吉     2019年9月20日 02:42     1643    

1、安装依赖的包

安装nginx需要openssl、zlib、pcre。

我将所有的安装包都放在了/usr/local/soft下

cd /usr/local/soft

tar zxf openssl-1.1.1a.tar.gz

mv openssl-1.1.1a openssl

tar zxf zlib-1.2.11.tar.gz

mv zlib-1.2.11 zlib

unzip pcre-8.42.zip

mv pcre-8.42 pcre

 

2、创建管理nginx的用户

groupadd www

useradd -r -g www www -s /sbin/nologin

 

3、解压安装nginx

tar zxf nginx-1.15.7.tar.gz

cd nginx-1.15.7

 

./configure \

"--prefix=/usr/local/nginx" \

"--user=www" \

"--group=www" \

"--with-file-aio" \

"--with-http_realip_module" \

"--with-http_ssl_module" \

"--with-openssl=/usr/local/soft/openssl" \

"--with-http_gzip_static_module" \

"--with-zlib=/usr/local/soft/zlib" \

"--with-http_stub_status_module" \

"--with-pcre=/usr/local/soft/pcre"

make&&make install


文章评论

0

其他文章