linux实战教学,Linux教学总结

首页 > 教育培训 > 作者:YD1662023-10-24 18:29:55

yum客户端配置

注释已经配置的yum源文件

cd /etc/yum.repos.d/ gzip *

书写新的yum配置即可

cat yumlocal-10.0.0.200.repo [yumlocal] name = 'yum local 内部yum源 10.0.0.200' baseurl = http:Վˌ10.0.0.200:12306 enalbed = 1 gpgcheck = 0

测试是否可以使用内部yum仓库

#1.清空缓存 yum clean all Loaded plugins: fastestmirror Cleaning repos: yumlocal Cleaning up list of fastest mirrors Other repos take up 183 M of disk space (use verbose for details) #2.根据新的配置生成缓存 yum makecache Loaded plugins: fastestmirror Determining fastest mirrors yumlocal | 2.9 kB 00:00:00 (1/3): yumlocal/filelists_db | 13 kB 00:00:00 (2/3): yumlocal/other_db | 5.3 kB 00:00:00 (3/3): yumlocal/primary_db | 22 kB 00:00:00 Metadata Cache Created #3. 查看yum源列表 yum repolist Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile repo id repo name status yumlocal 'yum local 内部 yum源 10.0.0.200' 20 repolist: 20

遇到下载失败或依赖问题

服务端:需要在服务端下载依赖,上传到目录中

#1. 开启keepcache功能 grep keepcache /etc/yum.conf #2. 进入软件包目录 cd /app/yumlocal/ #3. 本地安装并下载依赖 yum localinstall -y *.rpm #4. 找出缓存的rpm包 find /var/cache/yum/ -type f -name "*.rpm" #4.找出缓存的rpm包并复制到/app/yumlocal/目录 find /var/cache/yum/ -type f -name "*.rpm" |xargs cp -t /app/yumlocal/ ll /app/yumlocal/*.rpm |wc -l

服务端:重新createrepo

#5. 重新生成 createrepo /app/yumlocal/

服务端:yum clean all 然后 yum makecache 然后 yum install

yum clean all yum makecache yum repolist yum install -y php72w-cli

企业级SRE运维必会项目

【学习资料 视频教程合集】

免费领取,限 200

评论区告诉我!!!

上一页1234末页

栏目热文

文档排行

本站推荐

Copyright © 2018 - 2021 www.yd166.com., All Rights Reserved.