yum install createrepo repoview
mkdir -p /var/www/repo #mkdir -p /var/www/repo/SRPMS cp *.rpm /var/www/repo/ createrepo /var/www/repo/el7 repoview /var/www/repo/el7 chown -R apache:apache /var/www/repo
/etc/httpd/conf.d/repo.conf
<VirtualHost *:81> DocumentRoot /var/www/repo/el7/ <Directory /var/www/repo/el7/> Options +Indexes </Directory> <Location /> Allow from all </Location> </VirtualHost>
/etc/httpd/conf/httpd.conf
Listen 80 Listen 81
apache -t && systemctl reload httpd
/etc/yum.repos.d/mon.repo
[interne] name=Dépôt interne enabled=1 gpgcheck=0 baseurl=http://localhost:81/ #gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Pour tester la conf du client
yum clean all yum list