When it comes to installing yum repository server there are some requirements:
- Instalattion tree (can be extracted from linux distribution dvd)
- YUM repository
- Network service that is hosting repository and packages. (can be http or ftp server)
I use http for hosting repository. In the apache.conf
DocumentRoot "/var/www/html"
Copy installation tree from dvd iso
# mount -o loop /redhatisos/rhel-server-5.7-x86_64-dvd.iso /mnt/dvdrom
# cd /mnt/dvdrom
# cp -fr * /var/www/html/5.7-x86_64/
# cd /var/www/html/5.7-x86_64
Create yum repository with the following command
# createrepo -o /var/www/html/rhrepos/5.7-x86_64 .
Then go to client and test yum
# vi /etc/yum.repos.d/my.repo
[my]
name= RHEL Server Repository
baseurl=http://<server name>/5.7-x86_64
enabled=1
gpgcheck=0
# yum clean all
# yum list
DocumentRoot "/var/www/html"
Copy installation tree from dvd iso
# mount -o loop /redhatisos/rhel-server-5.7-x86_64-dvd.iso /mnt/dvdrom
# cd /mnt/dvdrom
# cp -fr * /var/www/html/5.7-x86_64/
# cd /var/www/html/5.7-x86_64
Create yum repository with the following command
# createrepo -o /var/www/html/rhrepos/5.7-x86_64 .
Then go to client and test yum
# vi /etc/yum.repos.d/my.repo
[my]
name= RHEL Server Repository
baseurl=http://<server name>/5.7-x86_64
enabled=1
gpgcheck=0
# yum clean all
# yum list
Comments
Post a Comment