1.搭建第三方软件仓库

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

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

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

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

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

搭建第三方软件仓库
(3).扫描并采集信息

[[email protected] software]# createrepo -v /var/www/html/software/

搭建第三方软件仓库

[[email protected] software]# ls

搭建第三方软件仓库
(4).指定第三方软件仓库指向


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

搭建第三方软件仓库

[[email protected] software]# yum clean all

搭建第三方软件仓库

[[email protected] software]# yum repolist

搭建第三方软件仓库
(5).测试:

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

搭建第三方软件仓库

[[email protected] ~]# kolourpaint 

搭建第三方软件仓库

相关文章: