当前位置:   article > 正文

Centos7 RPM包离线安装Nginx

Centos7 RPM包离线安装Nginx

查看是否安装nginx

  1. #使用命令 rpm -qa|grep 列出需要卸载的软件包
  2. rpm -qa | grep nginx

卸载nginx

  1. #使用rpm -e 加包名删除 rpm -e nginx-release-centos-7-0.el7.ngx.noarch nginx-1.14.1-1.el7_4.ngx.x86_64
  2. rpm -e nginx

安装nginx

其他版本步骤一样

下载rpm包Index of /packages/centos/7/x86_64/RPMS/

  1. #使用root权限进行安装 rpm -ivh nginx-1.19.5-1.el7.ngx.x86_64.rpm
  2. rpm -ivh nginx-1.16.1-1.el7.ngx.x86_64.rpm

启动Nginx并设置开机启动

  1. systemctl start nginx.service
  2. systemctl enable nginx.service

查看Nginx启动状态

systemctl status nginx.service

修改nginx配置文件

位置 :/etc/nginx/nginx.conf

FAQ

如果报缺少libcrypto.so.10

  1. wget http://rpmfind.net/linux/centos/7.9.2009/os/x86_64/Packages/openssl-libs-1.0.2k-19.el7.x86_64.rpm
  2. rpm -ivh openssl-libs-1.0.2k-19.el7.x86_64.rpm --force

# 下载地址 http://rpmfind.net/linux/rpm2html/search.php?query=libcrypto.so.10%28OPENSSL_1.0.2%29%2864bit%29&submit=Search+...&system=centos+7&arch= [root@ /home/kiosk/repod]# rpm -ivh openssl-libs-1.0.2k-19.el7.x86_64.rpm --force

warning: openssl-libs-1.0.2k-16.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY Preparing... ################################# [100%] Updating / installing... 1:openssl-libs-1:1.0.2k-16.el7 ################################# [100%]

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/2023面试高手/article/detail/505450
推荐阅读
相关标签
  

闽ICP备14008679号