准备rpm离线安装包
https://pkgs.org/ rpm安装包下载地址
上传安装包到 自定义位置
put *
创建repo源库
cd /home/update/repo # createrepo . Spawning ..... 1pkgs .... Sqlite DBS complete 当上传新的rpm包时需要进行刷新 命令 # createrepo --update . Spawning ..... 1pkgs .... Sqlite DBS complete 清缓存 yum clean all 再查询 yum repolist httpd 你会发现repolist: 数量多了
4.创建.repo配置
cd /etc/yum.repos.d touch httpd.repo [httpd] name=httpd - Plus baseurl=home/update/repo gpgcheck=0 enabled=1
5.查看
# yum repolist httpd loaded plugins: .... ....... httpd httpd = plus 4 repolist: 4 这里我上传了四个rpm包 httpd httpd-tools mod_session apr-util-openssl
6升级
# yum update httpd --enablerepo=httpd loaded plugins: ...... --->>>> .... Dependencies Resolved ======== ... Is this ok[y/d/N]:y Downloading ...... ..... Complete!
乐享:知识积累,快乐无限。