欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 文旅 > 旅游 > Yum包下载

Yum包下载

2024/10/24 1:52:12 来源:https://blog.csdn.net/qq_29974229/article/details/140521397  浏览:    关键词:Yum包下载

1. 起因

内网有一台服务器需要升级php版本,维护的同学又不想二进制安装.服务器只有一个光盘的yum仓库

2. 解决方法

解决思路如下:

  1. 外网找一台机器配置php8.3.8的仓库
  2. 外网服务器下载软件集并打包
  3. 内网服务器上传并解压实现升级

2.1 下载php8.3.8仓库

  1. 配置php仓库
root@centos7:~/php_install# cat /etc/yum.repos.d/remi.repo 
# This repository is safe to use with RHEL/CentOS base repository
# it only provides additional packages for the PHP stack
# all dependencies are in base repository or in EPEL[remi-safe]
name=Safe Remi's RPM repository for Enterprise Linux 7 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/7/safe/$basearch/
#mirrorlist=https://rpms.remirepo.net/enterprise/7/safe/httpsmirror
mirrorlist=http://cdn.remirepo.net/enterprise/7/safe/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi[remi-safe-debuginfo]
name=Remi's RPM repository for Enterprise Linux 7 - $basearch - debuginfo
baseurl=http://rpms.remirepo.net/enterprise/7/debug-remi/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
  1. 安装yum-utils
yum install yum-utils
  1. 下载php8.3.8
mkdir /root/php_install/
yumdownloader --resolve --destdir=/root/php_install/ php83-php.x86_64
tar czvf php_install.tar /root/php_install

在这里插入图片描述
4. 下载压缩包

sz php_install.tar

在这里插入图片描述

2.2 安装

tar xf php_install.tar
# 由于服务器的httpd服务不需要升级
mv php_install/httpd-* /root/
yum install -y php_install/*

3. 确认版本

rpm -qa|grep php8.3
php83 --version

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com