[root@localhost ~]# rpm -ivh nginx-1.24.0-1.el7.ngx.x86_64.rpm Preparing... ################################# [100%] file /usr/sbin/nginx from install of nginx-1:1.24.0-1.el7.ngx.x86_64 conflicts with file from package nginx-1:1.20.1-1.el7.ngx.x86_64 file /etc/nginx/mime.types from install of nginx-1:1.24.0-1.el7.ngx.x86_64 conflicts with file from package nginx-1:1.20.1-1.el7.ngx.x86_64 file /usr/libexec/initscripts/legacy-actions/nginx/check-reload from install of nginx-1:1.24.0-1.el7.ngx.x86_64 conflicts with file from package nginx-1:1.20.1-1.el7.ngx.x86_64 file /usr/libexec/initscripts/legacy-actions/nginx/upgrade from install of nginx-1:1.24.0-1.el7.ngx.x86_64 conflicts with file from package nginx-1:1.20.1-1.el7.ngx.x86_64 file /usr/sbin/nginx-debug from install of nginx-1:1.24.0-1.el7.ngx.x86_64 conflicts with file from package nginx-1:1.20.1-1.el7.ngx.x86_64 file /usr/share/nginx/html/50x.html from install of nginx-1:1.24.0-1.el7.ngx.x86_64 conflicts with file from package nginx-1:1.20.1-1.el7.ngx.x86_64 file /usr/share/nginx/html/index.html from install of nginx-1:1.24.0-1.el7.ngx.x86_64 conflicts with file from package nginx-1:1.20.1-1.el7.ngx.x86_64
Total size: 807 k Installed size: 2.8 M Is this ok [y/d/N]: y Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Warning: RPMDB altered outside of yum. Installing : 1:nginx-1.26.1-2.el7.ngx.x86_64 1/1 ----------------------------------------------------------------------
Thanks for using nginx!
Please find the official documentation for nginx here: * https://nginx.org/en/docs/
Please subscribe to nginx-announce mailing list to get the most important news about nginx: * https://nginx.org/en/support.html
Commercial subscriptions for nginx are available on: * https://nginx.com/products/
yum -y install make zlib zlib-devel gcc-c++ libtool openssl openssl-devel
安装 PCRE
wget http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz tar zxvf pcre-8.35.tar.gz cd pcre-8.35 ./configure make && make install pcre-config --version
tar -zxvf nginx-1.24.0.tar.gz cd nginx-1.24.0/ ./configure --prefix=/tmp/nginx --with-http_ssl_module --with-http_stub_status_module --with-pcre make make install