YUM
常用指令集
1 # 同步外网YUM源 2 # reposync --repoid repoID -r repo_dir 3 4 # 发布软件目录 5 # createrepo repo_dir 6 # 更新软件发布 7 # createrepo --update repo_dir
本地YUM源
1 # mkdir /mnt/cdrom 2 # mount /dev/cdrom /mnt/cdrom 3 # vim /etc/yumrepos.d/Media.repo 4 [yum] 5 name=Media 6 baseurl=file:///mnt/cdrom 7 enable=1 8 gpgcheck=0 9 # yum clean all
HTTP-YUM源
1 # mkdir /mnt/cdrom 2 # mount /dev/cdrom /mnt/cdrom 3 # mkdir /var/www/html/CentOS7 4 # cp -R /mnt/cdrom/Packages/* /var/www/html/CentOS7/ 5 # yum install createrepo* -y 6 # cd /var/www/html/ 7 # createrepo CentOS7/ 8 # yum install httpd httpd-devel -y 9 # systemctl start httpd 10 # systemctl enable httpd 11 # setenforce 0 12 # systemctl stop firewalld 13 # systemctl disable firewalld 14 # vim /etc/yum.repos.d/http.repo 15 [base] 16 name=HTTP 17 baseurl=http://127.0.0.1/CentOS7/ 18 gpgcheck=0 19 enable=1 20 # yum clean all

浙公网安备 33010602011771号