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

SoalrWinds 2025.1

 发行说明:https://d…

3 天 ago

诺顿360 豪华版免费升级到诺顿360专业版

还是用诺顿360 60天 OE…

4 天 ago

链接到京东技术交流群

 链接到京东技术交流群

1 周 ago

【PDF】京东基础架构建设之路

 邮箱:gyd1#vip.qq…

1 周 ago

【PDF】京东数据中心构建实战

 邮箱:gyd1#vip.qq…

1 周 ago