Redhat OS Installation and Updates using an Installation (Yum) Server. Step by step server and client setup.


Server configuration steps

Yum server IP = 192.168.1.100
Yum server hostname = server1.example.com

NOTE: These instructions assume the Linux firewall is off (iptables)

Step 1: Insert the RHEL 6.# CD / DVD

NOTE: ‘#’ in RHEL_6.# should be replaced with the correct release number such as 6.5

#cd /media/RHEL_6.#\ x86_64\ Disc\ 1/Packages/

Required packages for Yum server

#rpm -ivh vsftpd*

#rpm -ivh deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm

#rpm -ivh python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm

#rpm -ivh createrepo-0.9.*

Step 2: Check the installed packages

#rpm -qa vsftp*
vsftpd-2.2.2-6.el6_0.1.x86_64
#rpm -qa deltarpm*
deltarpm-3.5-0.5.20090913git.el6.x86_64
#rpm -qa python-deltarpm*
python-deltarpm-3.5-0.5.20090913git.el6.x86_64
#rpm -qa createrepo*
createrepo-0.9.?.el6.noarch

Step 3 : Ensure the FTP service is started

#service vsftpd status

#service vsftpd start

#service vsftpd status

#chkconfig vsftpd on

Step 4: Copy the rhel6.# cd / dvd content

NOTE: ‘#’ as in RHEL_6.# should be replaced with the correct release number such as 6.5

#cp -rf /media/RHEL_6.#\ x86_64\ Disc\ 1/       /var/ftp/pub/

#cd /var/ftp/pub/

#ls

RHEL_6.# x86_64 Disc 1

#mv RHEL_6.#\ x86_64\ Disc\ 1/ rhel6.#

#ls

rhel6.#

Step 5: Single mode installation createrepo

#createrepo -v /var/ftp/pub/

#cd /var/ftp/pub/

#ls

repodata  rhel6.#

Step 6: Group installation createrepo

# cp –rf /var/ftp/pub/rhel6.#/repodata/5819e9580b5a81a9eec9e2c6e91fc9992a7ccadaa3bcd5ecb2e87a8669eefcec-comps-rhel6-Server.xml      /var/ftp/pub/repodata/

# createrepo -g /var/ftp/pub/repodata/5819e9580b5a81a9eec9e2c6e91fc9992a7ccadaa3bcd5ecb2e87a8669eefcec-comps-rhel6-Server.xml /var/ftp/pub/

Step 7 : Create the server repo file.

#vi /etc/yum.repos.d/server.repo

[server]

name=rhel6.5 yum server 64bit

baseurl=file:///var/ftp/pub

enabled=1

gpgcheck=0

#yum clean all

#yum makecache

#yum list all

#yum grouplist


Client configuration steps

Yum client IP = 192.168.1.101

Yum client hostname = client1.example.com

Step 1 : Create the repo file.

Ensure that every repo file in /etc/yum.repos.d is disabled

#cd /etc/yum.repos.d

#ls

Note: Search each existing repo file in directory for string “enable=1” change to “enable=0”

#vi abc.repo

enable=1

Step 2 : Create a new client repo file that points to our newly created repo server.

#vi /etc/yum.repos.d/client.repo

[client]

name=rhel6.5 yum client 64bit

baseurl=ftp://192.168.1.100/pub

enabled=1

gpgcheck=0

# yum clean all

# yum makecache

# yum list all

# yum grouplist