Thursday 12 September 2013

YUM SERVER



#################### Y U M   S E R V E R ####################

[root@server~]#vi /etc/hosts

192.168.10.253 server.example.com server


[root@server~]#rpm -qa | grep yum #require packages

yum-3.0.1-5.el5
yum-metadata-parser-1.0-8.fc6
yum-rhn-plugin-0.4.3-1.el5
yum-updatesd-3.0.1-5.el5

[root@server~]#rpm -qa | grep createrepo

createrepo-0.4.4-2.fc6 # To create repository

[root@server~]#rpm -qa | grep vsftpd #FTP service for yum server

vsftpd-2.0.5-10.el5

#service vsftpd restart
#chkconfig vsftpd on

> Now mount RHEL- CD/DVD into /mnt folder

[root@server~]#mount /dev/cdrom /mnt OR U can Copy all rpm in pub directory

> Copy Server directory from /mnt and paste into /var/ftp/pub directory.

[root@server~]#cp -ar /mnt/Server  /var/ftp/pub

> Edit /etc/yum.repos.d/rhel-debuginfo.repo  file and modify as given bellow:

[root@server~]#vi /etc/yum.repos.d/rhel-debuginfo.repo

[rhel-debuginfo]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=ftp://server.example.com/pub/Server
enabled=1
gpgcheck=0

> Now create repositoy fo packages.

[root@server~]#createrepo -v /var/ftp/pub/Server

Note: It will take long time depends upon rpm packages and performance of machine.

> After repository created, It may be prompt for error that "remove .olddata directory manually"

[root@server~]#rm -rf /var/ftp/pub/Server/.olddata

> Everything done well then try to use yum utility by using yum command.

(Note: If allready yum is configured and you are configuring new yum server
then use #yum clean all  command)

[root@server~]#yum list #list rmp repository
[root@server~]#yum info vsftpd #Provide information about package
[root@server~]#yum install bind #To install packages
[root@server~]#yum install http*
[root@server~]#yum remove bind #To remove packages


#################### Y U M   S E R V E R ####################



----------------------------------------------------------------------------------------------------


#################### Y U M   C L I E N T ####################

> Make sure that vsftpd package is installed.
:> Suppose client is client.example.com

[root@client~]#rpm -qa | grep vsftpd


#service vsftpd restart
#chkconfig vsftpd on

> Edit /etc/yum.repos.d/rhel-debuginfo.repo  file and modify as given bellow:

[root@client~]#vi /etc/yum.repos.d/rhel-debuginfo.repo

[rhel-debuginfo]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=ftp://server.example.com/pub/Server
enabled=1
gpgcheck=0


[root@client~]#yum list


#################### Y U M   C L I E N T ####################

No comments:

Post a Comment