王尘宇王尘宇

研究百度干SEO做推广变成一个被互联网搞的人

服务器安装(6)linux局域网搭建yum源


image.png

访 http://192.168.0.105:9002/centos7/

image.png

在103上执行 安装 createrepo

install -y createrepo

image.png

createrepo /home/java/nginx1/html/repl/centos7/

image.png

至此服务端准备完yum 源服务就搭建好了

接下来在105上修改yum 源

cd /etc/yum.repos.d/
rename .repo .repo.bak ./*

image.png

vi rhel7.repo


[iso]
name=CentOS-7-x86_64-Everything-iso
baseurl=http://192.168.0.103:9002/centos7/
gpgcheck=1
enabled=1
gpgkey=http://192.168.0.103:9002/centos7/RPM-GPG-KEY-CentOS-7

添加nginx配置好的地址, enabled 设置为1,保存退出

yum clean all
yum makecache
yum repolist

image.png

到此处没有错误,就可以使用yum 安装软件

yum search httpd

image.png

参考
https://blog.csdn.net/sinat_28521487/article/details/108750711
https://blog.csdn.net/C1041067258/article/details/83507125

相关文章

评论列表

发表评论:
验证码

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。