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
Configuring YUM behind the HTTP proxy
Under Normal Conditions yum dont work if you are suing internet behind proxy
So in yum.conf add
#The proxy server or IP address:port number
proxy=http://proxy.server.com:8080
Below one if you use ( username/password)
proxy_username=userid
proxy_password=password
-----------------------------------------------------------------------------------------------
Other topics you may find intresting
Linux Interview Questions basic
Important Port numbers of linux asked in interview
Linux Advance interview Questions
Oracle DBA interview Questions
Configure Nagios from scratch
First,
1 If its local repository then
------------------------------------------------------------------------------------------
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
Under Normal Conditions yum dont work if you are suing internet behind proxy
So in yum.conf add
#The proxy server or IP address:port number
proxy=http://proxy.server.com:8080
Below one if you use ( username/password)
proxy_username=userid
proxy_password=password
-----------------------------------------------------------------------------------------------