linux---yum源 软件管理
一.本地安装源的配置
[source7.3] #仓库名
name=rhel7.3 #名称
baseurl=file:///source7.3 #对本地文件访问
gpgcheck=0 #软件的logo,gpg是一个加密方式,gpgcheck表示是否检测到软件的gpgk
systemctl start httpd #启动共享
systemctl enable httpd #设置为开启启动
systemctl stop firewalld #关闭防火墙,防止防火墙阻止共享
systemctl disable firewalld #
mkdir /var/www/html/source7.0 /var/www/html/source7.2
2.2挂载镜像
mount /iso/rhel-server-7.0-x86_64-dvd.iso /var/www/html/source7.0
mount /iso/rhel-server-7.3-x86_64-dvd.iso /var/www/html/source7.3
vim /etc/rc.d/rc.local
(写入: mount /iso/rhel-server-7.0-x86_64-dvd.iso /var/www/html/rhtl7.0)
然后加权: chmod+x /etc/rc.d/rc.local(开机自动挂载)
在浏览器中输入地址
http://ip/真机地址/source7.0 /source7.3
rm -fr /etc/yum.repos.d/* ##清空yum当前配置文件,重新配置
vim /etc/yum.repos.d/yum.repo ##编写一个软件仓库文件
[source7.0]
name=source7.0
baseurl=http://172.25.30.250/source7.0