We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
首先明白Nginx的依赖:
Nginx
PCRE pcre-devel :Nginx的Http模块使用的pcre模式解析的正则表达式,所以需要在Linux上安装pcre库,pcre-devel是使用pcre二次封装的一个库,Nginx也依赖于它
PCRE pcre-devel
Http
pcre
Linux
pcre-devel
yum install -y pcre pcre-devel
zilb : Nginx使用zlib对http包的内容进行gzip压缩。
zilb
zlib
http
gzip
yum install -y zlib zlib-devel
OpenSSL : Nginx使用OpenSSL支持Https协议
OpenSSL
Https
yum install -y openssl openssl-devel
安装好以上依赖之后,上官网下载最新的二进制包,虽然一般yum源也有Nginx,但是这个源可能很久没有更新了,因此最好直接去官方下载最新的二进制包,编译安装。
yum
https://nginx.org/en/download.html
同时,也可以使用命令进行安装下载
wget -c https://nginx.org/download/nginx-1.10.1.tar.gz
下载了二进制包之后,接下来就是解压:
tar -zxvf nginx-1.4.2.tar.gz
接下来是配置Nginx,默认情况下我们使用默认配置即可
./configure
一切准备就绪后,就可以进行编译安装了
make
make install
make 为编译 make install 为安装
安装完成后,一般默认安装位置为/usr/local/nginx
/usr/local/nginx
到这里Nginx基本安装完毕。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
依赖
首先明白
Nginx
的依赖:PCRE pcre-devel
:Nginx
的Http
模块使用的pcre
模式解析的正则表达式,所以需要在Linux
上安装pcre
库,pcre-devel
是使用pcre
二次封装的一个库,Nginx
也依赖于它zilb
:Nginx
使用zlib
对http
包的内容进行gzip
压缩。OpenSSL
:Nginx
使用OpenSSL
支持Https
协议下载二进制文件
安装好以上依赖之后,上官网下载最新的二进制包,虽然一般
yum
源也有Nginx
,但是这个源可能很久没有更新了,因此最好直接去官方下载最新的二进制包,编译安装。同时,也可以使用命令进行安装下载
解压
下载了二进制包之后,接下来就是解压:
配置
接下来是配置
Nginx
,默认情况下我们使用默认配置即可./configure
编译安装
一切准备就绪后,就可以进行编译安装了
make
make install
安装完成后,一般默认安装位置为
/usr/local/nginx
到这里
Nginx
基本安装完毕。The text was updated successfully, but these errors were encountered: