从yum源安装nginx
> yum install -y nginx
> nginx -v
nginx version: nginx/1.12.2

安装依赖包
yum install -y gcc
yum install -y pcre-devel openssl-devel
yum install -y gperftools-devel
yum install -y redhat-rpm-config
yum install -y gd-devel
yum install -y perl-ExtUtils-Embed
yum install -y geoip-devel
yum install -y zlib-devel
yum install -y libxml2 libxml2-dev
yum install -y libxslt-devel
yum install -y GeoIP GeoIP-devel GeoIP-data

下载最新安装包
> wget http://nginx.org/download/nginx-1.17.1.tar.gz

解压缩
> tar zxvf nginx-1.17.1.tar.gz

构建
> cd nginx-1.17.1

> ./configure --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/run/nginx.pid --lock-path=/run/lock/subsys/nginx --user=nginx --group=nginx --with-file-aio --with-http_auth_request_module --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_slice_module --with-http_stub_status_module --with-http_perl_module=dynamic --with-mail=dynamic --with-mail_ssl_module --with-pcre --with-pcre-jit --with-stream=dynamic --with-stream_ssl_module --with-google_perftools_module --with-debug --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic' --with-ld-opt='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-E'

> make

> make install

> cp ./objs/nginx /usr/sbin/nginx

> systemctl daemon-reexec

重启nginx
> service nginx restart

确认版本
> nginx -v
nginx version: nginx/1.17.1

centos安装nginx1.17的更多相关文章

  1. CentOS安装Nginx-1.6.2+安全配置

    注:以下所有操作均在CentOS 6.5 x86_64位系统下完成. #准备工作# 在安装Nginx之前,请确保已经使用yum安装了pcre等基础组件,具体见<CentOS安装LNMP环境的基础 ...

  2. CentOS安装Nginx-1.6.2+安全配置+性能配置

    注:以下所有操作均在CentOS 6.5 x86_64位系统下完成. #准备工作# 在安装Nginx之前,请确保已经使用yum安装了pcre等基础组件,具体见<CentOS安装LNMP环境的基础 ...

  3. linux centos安装nginx1.7.4

    原文转自 jerryhe326:https://www.cnblogs.com/jerrypro/p/7062101.html一.安装准备 首先由于nginx的一些模块依赖一些lib库,所以在安装ng ...

  4. centos安装Nginx1.9.9

    今天在安装centos的时候,又出现了yum报错的情况,弄了半个小时就弄好,就直接放弃了,使用了VMware快照功能.(快照功能要经常使用,我使用的频率不高,所以这次又造成了以前安装好的很多模块又得重 ...

  5. CentOS 安装Nginx1.14.0

    原文地址:http://www.cnblogs.com/ascd-eg/p/9275441.html 一.安装所需环境   1.gcc 安装         yum install gcc-c++   ...

  6. Centos 安装 Node-v12.17.0-linux-x64.tar.gz

    wget https://nodejs.org/dist/v12.17.0/node-v12.17.0-linux-x64.tar.gz tar -zxf node-v12.17.0-linux-x6 ...

  7. 【推荐】CentOS安装Subversion-1.8.17+HTTP协议支持配置

    注:以下所有操作均在CentOS 6.5 x86_64位系统下完成. 我们需要搭建一个自己的SVN服务器. 此外,搭建好的SVN服务器除了需要支持svn协议外,最好还需要支持HTTP协议和HTTPS协 ...

  8. 【推荐】CentOS安装Subversion-1.8.11+HTTP协议支持配置

    注:以下所有操作均在CentOS 6.5 x86_64位系统下完成. 我们需要搭建一个自己的SVN服务器. 此外,搭建好的SVN服务器除了需要支持svn协议外,最好还需要支持HTTP协议和HTTPS协 ...

  9. CentOS安装Apache-2.4.10+安全配置

    注:以下所有操作均在CentOS 6.5 x86_64位系统下完成. #准备工作# 在安装Nginx之前,请确保已经使用yum安装了各基础组件,并且配置了www用户和用户组,具体见<CentOS ...

随机推荐

  1. govendor用法

    为什么使用govendor go语言的依赖管理最主要的是版本控制问题. govendor是Golang的依赖包管理工具,它的出现可以避免不同用户在clone同一个项目后从外部获取不同依赖库版本的问题. ...

  2. QTableWidget右键菜单

    #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> namespace Ui { class MainWind ...

  3. H5新增form控件和表单属性

    第一个知识点:表单的属性及总结 第二个知识点:H5新增的表单控件和属性以及总结 第一个知识点: 我们常见的表单验证有哪些呢 text 文本框标签 password 密码框 checkbox 多选框 r ...

  4. 《linux就该这么学》课堂笔记15 vsftpd文件传输、Samba/NFS文件共享

    1.为了能够在如此复杂多样的设备之间(Windows.Linux.UNIX.Mac等不同的操作系统)解决问题解决文件传输问题,文件传输协议(FTP)应运而生. FTP服务器是按照FTP协议在互联网上提 ...

  5. Alipay 支付类

    本版本参考网友 <?php namespace App\Tools; class Alipay { //应用ID,您的APPID. private $appID = '111'; //商户私钥 ...

  6. python平台下实现xgboost算法及输出的解释

    python平台下实现xgboost算法及输出的解释 1. 问题描述 ​ 近来, 在python环境下使用xgboost算法作若干的机器学习任务, 在这个过程中也使用了其内置的函数来可视化树的结果, ...

  7. KL散度=交叉熵-熵

    熵:可以表示一个事件A的自信息量,也就是A包含多少信息. KL散度:可以用来表示从事件A的角度来看,事件B有多大不同. 交叉熵:可以用来表示从事件A的角度来看,如何描述事件B. 一种信息论的解释是: ...

  8. eclipse 导入项目后,在工程图标上出现红叉,但是工程中的文件并没有提示错误的解决方法

    进入项目包下的.settings目录,找到org.eclipse.wst.common.project.facet.core.xml文件,用记事本打开后才发现这句话有问题:<runtime na ...

  9. Pandas | 23 分类数据

    通常实时的数据包括重复的文本列.例如:性别,国家和代码等特征总是重复的.这些是分类数据的例子. 分类变量只能采用有限的数量,而且通常是固定的数量.除了固定长度,分类数据可能有顺序,但不能执行数字操作. ...

  10. Ubuntu安装笔记

    Ubuntu安装笔记 前言 先后在台式电脑&奇葩的SurfaceLaptop上装了Ubuntu18.04LTS 收获了去多经验,浪费了去多时间 为了让下次更加的方便, 写一篇博客记录一下 安装 ...