Categories: Linux

编译安装nginx

Nginx的一些模块需要依赖其他第三方库,通常有pcre库(支持rewrite模块),zlib库(支持gzip)和openssl库(支持ssl模块)等

[root@localhost ~]# yum install gcc gcc-c++ automake pcre pcre-devel zlib zlib-devel open openssl-devel

[root@localhost ]# mkdir nginx    ####根目录下新建nginx目录

[root@localhost ]# cd nginx           ####进入nginx

[root@localhost nginx]# wget http://nginx.org/download/nginx-1.12.0.tar.gz      ####下载nginx

[root@localhost nginx]# cp nginx-1.12.1.tar.gz /nginx        ####复制到对应目录

[root@localhost nginx]# tar -zxvf nginx-1.12.0.tar.gz        ####解压缩

[root@localhost nginx]# cd nginx-1.13.1

[root@localhost nginx-1.13.1]# ./configure –prefix=/nginx/       ####指定nginx的安装路径

[root@localhost nginx-1.13.1]# make              ####编译

Kai

Recent Posts

分享个便宜速度快的云主机

野草云 https://my.…

19 小时 ago

众筹微软大佬徐庭老师M365课程

 联系邮箱:gyd1#vip.…

3 周 ago

求职

 邮箱:gyd1#vip.qq…

3 周 ago

MySQL EOL和版本推荐

   MySQL 5.7版本已…

1 月 ago

DirectStorage 1.3 现已推出

 DirectStorage …

1 月 ago

【白嫖】Oracle OCI培训

 继上次庆祝MySQL 30年…

1 月 ago