How to Install Repository through RPM & YUM Packages in Redhat Linux 6 Server - Cloud Network

Networking | Support | Tricks | Troubleshoot | Tips

Buymecoffe

Buy Me A Coffee

Wednesday, September 3, 2014

How to Install Repository through RPM & YUM Packages in Redhat Linux 6 Server

RPM & YUM
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


Thanking You
Hope U Like it....

Ubuntu 14.04

Linux Mint 17

Ubuntu Root Password Reset

Lamp in Ubuntu 14.04

Redhat Linux 7 server
Gentoo Linux 12.1