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
1、gcc 安装,编译依赖 gcc 环境。
yum install gcc-c++
2、pcre、pcre-devel 安装 。 PCRE(Perl Compatible Regular Expressions) 是一个Perl库,包括 perl 兼容的正则表达式库。nginx 的 http 模块使用 pcre 来解析正则表达式,所以需要在 linux 上安装 pcre 库,pcre-devel 是使用 pcre 开发的一个二次开发库。
yum install -y pcre pcre-devel
3、zlib 安装 。 zlib 库提供了很多种压缩和解压缩的方式, nginx 使用 zlib 对 http 包的内容进行 gzip ,所以需要在 Centos 上安装 zlib 库
yum install -y zlib zlib-devel
4、OpenSSL 安装 OpenSSL 是一个强大的安全套接字层密码库,囊括主要的密码算法、常用的密钥和证书封装管理功能及 SSL 协议,并提供丰富的应用程序供测试或其它目的使用。 nginx 不仅支持 http 协议,还支持 https(即在ssl协议上传输http),所以需要在 Centos 安装 OpenSSL 库
yum install -y openssl openssl-devel
1、下载nginx源码包
wget -c https://nginx.org/download/nginx-1.14.0.tar.gz
2、解压缩源码包并进入
tar -zxvf nginx-1.14.0.tar.gz cd nginx-1.14.0
3、配置
推荐使用默认配置
./configure
4、编译并且安装
make && make install
5、 查找安装路径
whereis nginx
进入目录
cd /usr/local/nginx/sbin/
1、启动 nginx
./nginx
2、停止 nginx
./nginx -s stop
3、从容停止 nginx
./nginx -s quit
4、重启nginx
./nginx -s reload
5、推荐先停止再启动
./nginx -s quit ./nginx
6、修改了 nginx 的配置文件 nginx.conf 想让它立即生效时 这时我们就需要重启nginx
The text was updated successfully, but these errors were encountered:
No branches or pull requests
centos7.4 安装 nginx1.14
安装所需环境
1、gcc 安装,编译依赖 gcc 环境。
2、pcre、pcre-devel 安装 。
PCRE(Perl Compatible Regular Expressions) 是一个Perl库,包括 perl 兼容的正则表达式库。nginx 的 http 模块使用 pcre 来解析正则表达式,所以需要在 linux 上安装 pcre 库,pcre-devel 是使用 pcre 开发的一个二次开发库。
3、zlib 安装 。
zlib 库提供了很多种压缩和解压缩的方式, nginx 使用 zlib 对 http 包的内容进行 gzip ,所以需要在 Centos 上安装 zlib 库
4、OpenSSL 安装
OpenSSL 是一个强大的安全套接字层密码库,囊括主要的密码算法、常用的密钥和证书封装管理功能及 SSL 协议,并提供丰富的应用程序供测试或其它目的使用。
nginx 不仅支持 http 协议,还支持 https(即在ssl协议上传输http),所以需要在 Centos 安装 OpenSSL 库
安装nginx
1、下载nginx源码包
2、解压缩源码包并进入
3、配置
推荐使用默认配置
4、编译并且安装
5、 查找安装路径
常用操作
进入目录
1、启动 nginx
2、停止 nginx
3、从容停止 nginx
4、重启nginx
5、推荐先停止再启动
6、修改了 nginx 的配置文件 nginx.conf 想让它立即生效时 这时我们就需要重启nginx
The text was updated successfully, but these errors were encountered: