Yellowdog Updater Modified (YUM) is a software package manager that installs, updates and removes packages on RPM-based Linux distributions. Yum makes it easier to maintain groups of machines without having to manually update each one using rpm.
YUM uses an online repository by default but you can also configure it to use a local repository of packages. Let’s install a local yum server using RHEL/CentOS 6.5.
# mount /dev/dvdrom /mnt/
# cd /mnt/Packages
# rpm -ivh vsftpd-2.2.2-11.el6.i686.rpm
# /etc/init.d/vsftpd restart
# chkconfig vsftpd on
# rpm -ivh deltarpm-3.5-0.5.20090913git.el6.i686.rpm
# rpm -ivh python-deltarpm-3.5-0.5.20090913git.el6.i686.rpm
# rpm -ivh createrepo-0.9.8-5.el6.noarch.rpm
Create a directory called yum in /var/ftp/pub directory to save all the packages.
# mkdir /var/ftp/pub/yum
# cp -ar *.* /var/ftp/pub/yum/
Create repo file: It’ll take a while to copy all the packages in the DVD. Please be patient. After all packages are copied, create a repo file called yum.repo in /etc/yum.repos.d/ directory.
comment => Information about the Repository.
baseurl => Path of the Repository.
gpgcheck => Authentication of the Repository, which is disabled in our case.
Create repo file: It’ll take a while to copy all the packages in the DVD. Please be patient. After all packages are copied, create a repo file called yum.repo in /etc/yum.repos.d/ directory.
# vim /etc/yum.repos.d/yum.repo
[yum] => Name of the Local Repository.comment => Information about the Repository.
baseurl => Path of the Repository.
gpgcheck => Authentication of the Repository, which is disabled in our case.
# createrepo -v /var/ftp/pub/yum/
# yum clean all
# yum update
Client Side Configuration:
Client side configuration: Create a repo file in your client system as mentioned above in the /etc/yum.repos.d/ directory and remove or rename the existing repositories. Then modify the baseurl as mentioned below.
Method 1:
# vim /etc/yum.repos.d/yum.repo
[yum]
comment =”yum server”
baseurl=ftp://yum.dailytech24.com/pub/yum
gpgcheck=0
enabled=1
Method 2:
# vim /etc/yum.repos.d/yum.repo
[yum]
comment =”yum server”
baseurl=ftp://192.168.1.10/pub/yum
gpgcheck=0
enabled=1
SEE THE CONFIGURATION VIDEO:
Client Side Configuration:
Client side configuration: Create a repo file in your client system as mentioned above in the /etc/yum.repos.d/ directory and remove or rename the existing repositories. Then modify the baseurl as mentioned below.
Method 1:
# vim /etc/yum.repos.d/yum.repo
[yum]
comment =”yum server”
baseurl=ftp://yum.dailytech24.com/pub/yum
gpgcheck=0
enabled=1
Method 2:
# vim /etc/yum.repos.d/yum.repo
[yum]
comment =”yum server”
baseurl=ftp://192.168.1.10/pub/yum
gpgcheck=0
enabled=1
SEE THE CONFIGURATION VIDEO:






0 comments:
Post a Comment