搭建第三方软件仓库

1.搭建第三方软件仓库

搭建第三方软件仓库,是为了更好更方便的解决安装有依赖性的包,不用rpm命令一个一个解决依赖性,
下面我以安装画图软件为例,说明第三方软件仓库的优点

(1).创建第三方软件存放目录(这个目录必须是共享的)

##安装apache
[root@localhost ~]# yum install -y httpd
##在apache默认发布目录下建立子目录
[root@localhost ~]# cd /var/www/html/
[root@localhost html]# ls
[root@localhost html]# mkdir software
[root@localhost html]# ls
Software
[root@localhost software]# cd

(2).将下载好的第三方软件全都放入/var/www/html/software目录中

[root@localhost ~]# mv wps-office-9.1.0.4961-1.a18p1.x86_64.rpm kolourpaint-* /var/www/html/software
[root@localhost ~]# cd /var/www/html/software/
[root@localhost software]# ls

在这里插入图片描述
(3).扫描并采集信息

[root@localhost software]# createrepo -v /var/www/html/software/

在这里插入图片描述

[root@localhost software]# ls

在这里插入图片描述
(4).指定第三方软件仓库指向


[root@localhost software]# vim /etc/yum.repos.d/rhel7.0.repo 
#####################
[software]           #名字
name=software        #说明
baseurl=file:///var/www/html/software   #第三方软件仓库位置
gpgcheck=0           #安装软件时不检测

在这里插入图片描述

[root@localhost software]# yum clean all

在这里插入图片描述

[root@localhost software]# yum repolist

在这里插入图片描述
(5).测试:

##此时再安装画图软件就不会报解决依赖性的错误了
[root@localhost software]# yum install -y kolourpaint

在这里插入图片描述

[root@localhost ~]# kolourpaint 

在这里插入图片描述

扫描二维码关注公众号,回复: 3977291 查看本文章

猜你喜欢

转载自blog.csdn.net/lilygg/article/details/83616036