Nginx 安装

Linux下Nginx采用编码编译安装,软件包可以在官网http://nginx.org下载,编译安装之前使用YUM提前安装所需的依赖包。Nginx采用模块化设计,在安装的时使用configure脚本指定需要(或排除)的模块。安装脚本参考如下:

[root@192 ~]# wget http://nginx.org/download/nginx-1.14.1.tar.gz
[root@192 ~]# tar -xzf nginx-1.14.1.tar.gz -C /usr/src
[root@192 ~]# yum -y install gcc pcre pcre-devel openssl openssl-devel zlib-devel\
> gd gd-devel perl perl-ExtUtils-Embed
[root@192 nginx-1.14.1]# ./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module
[root@192 nginx-1.14.1]# make && make install

 

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据