Installing packages and configuring Servers we need to configure the YellowDog Update Manager (YUM)
First,
1 If its local repository then
------------------------------------------------------------------------------------------
Install Package createrepo ( this pacakge is present in RHEL 5 dvd in Server folder)

RPM -ivh createrepo
createrepo -v /var/ftp/pub/Server
/var/ftp/pub/Server => this is the directory where local copy of RPM packages are there
Edit the Server.repo file
# vi Server.repo
[Server]
name= redhat
baseurl=file:///var/ftp/pub/Server
[enable=1]
[gpgcheck=0]
Save the file and quit

Then,
#yum clean all
#yum update
Now you can install packages
#yum install package-name

-------------------------------------------------------------------------------------------
2 If repository is present in server
-----------------------------------------------------------------------------------------------
#cd /etc/yum.repos.d
#ls

Then it will list the files. There is a file with name rhel-debuginfo.repo. Copy this file to a temp file with name Sever.repo. The starting letter of Server should be Capital.

Second step is given below
#cp rhel-debuginfo.repo Server.repo
The Third and final steps
Edit the Server.repo file
# vi Server.repo
[Server]
[name= redhat]
[baseurl=ftp://192.168.0.254/pub/Server] ( eg: IP address : 192.168.0.254 (the server IP)
[enable=1]
[gpgcheck=0]
Save the file and quit
Then,
#yum clean all
#yum update
Now you can install packages
#yum install package-name

------------------------------------------------------------
Yum local repository creation using ftp

step1: Install vsftpd
step2: cp -r Server /var/ftp/pub
step3: cd /etc/yum.repos.d/
ls
step4: vi rhel-debuinfo.rep
[rhel-debuginfo]
name=Red Hat ..........
baseurl=file:///var/ftp/pub/Server
enable=1
gpgcheck=1
gpgkey=file:///etc/pki/rp..........
:wq!
step5: yum clean all
step6: yum update
step7:install any package and test

No comments:

Post a Comment