May 2020
M T W T F S S
« Mar    
 123
45678910
11121314151617
18192021222324
25262728293031

Categories

WordPress Quotes

History is a relentless master. It has no present, only the past rushing into the future. To try to hold fast is to be swept aside.
John F. Kennedy
May 2020
M T W T F S S
« Mar    
 123
45678910
11121314151617
18192021222324
25262728293031

Short Cuts

2012 SERVER (64)
2016 windows (9)
AIX (13)
Amazon (40)
Ansibile (19)
Apache (135)
Asterisk (2)
cassandra (2)
Centos (211)
Centos RHEL 7 (270)
centos8 (3)
chef (3)
cloud (2)
cluster (3)
Coherence (1)
DB2 (5)
DISK (25)
DNS (9)
Docker (30)
Eassy (11)
ELKS (1)
EXCHANGE (3)
Fedora (6)
ftp (5)
GIT (3)
GOD (2)
Grub (1)
Hacking (10)
Hadoop (6)
health (2)
horoscope (23)
Hyper-V (10)
IIS (15)
IPTABLES (15)
JAVA (7)
JBOSS (32)
jenkins (1)
Kubernetes (7)
Ldap (5)
Linux (188)
Linux Commands (166)
Load balancer (5)
mariadb (14)
Mongodb (4)
MQ Server (24)
MYSQL (84)
Nagios (5)
NaturalOil (13)
Nginx (35)
Ngix (1)
openldap (1)
Openstack (6)
Oracle (35)
Perl (3)
Postfix (19)
Postgresql (1)
PowerShell (2)
Python (3)
qmail (36)
Redis (12)
RHCE (28)
SCALEIO (1)
Security on Centos (29)
SFTP (1)
Shell (64)
Solaris (58)
Sql Server 2012 (4)
squid (3)
SSH (10)
SSL (14)
Storage (1)
swap (3)
TIPS on Linux (28)
tomcat (62)
Ubuntu (1)
Uncategorized (30)
Veritas (2)
vfabric (1)
VMware (28)
Weblogic (38)
Websphere (71)
Windows (19)
Windows Software (2)
wordpress (1)
ZIMBRA (17)

WP Cumulus Flash tag cloud by Roy Tanck requires Flash Player 9 or better.

Who's Online

0 visitors online now
0 guests, 0 bots, 0 members

Hit Counter provided by dental implants orange county

YUM Server in CentOS 6.x / RHEL 6.x

Setup Local YUM Server in CentOS 6.x / RHEL 6.x

(Yum) is a software package manager that installs, updates and removes packages on RPM-based Linux distributions. Yum makes it easier to maintain groups of machines without having to manually update each one using rpm.

Features:

Support for multiple repositories.
Simple configuration.
Automatic dependency calculation.
Fast operation.
RPM-consistent behavior.
Package group support, including multiple-repository groups.
Simple interface.
Yum uses an online repository by default, but you can also configure it to use a local repository of packagesY
Let us install a local yum server using CentOS 6.3. The steps provided here are tested in CentOS 6.3. But it will work fine in RHEL 6.x and Scientific Linux 6.x too.

Install CentOS 6.3 as a physical or virtual machine. I have already covered a topic how to install Redhat Enterprise Linux 6.0 earlier in this blog. Those steps are damn similar to CentOS 6.x and Scientific Linux 6.x installation. So just follow the steps exactly to install CentOS 6.3.

In this example the hostname of the server is rmohan.com and IP Address is 192.168.56.101.

Login to your system and Mount the contents of your CentOS 6.3 DVD in the /mnt directory or wherever you want. In the Terminal window, type the following command:
# mount /dev/cdrom1 /mnt/ (Here cdrom1 is my local cdrom device)

Install vsftpd package, so that we can use this as a FTP server to share our repository in the client systems.
Change to the directory where you mounted CentOS DVD. In our example we have mounted the CentOS DVD in /mnt directory.
# cd /mnt/Packages
# rpm -ivh vsftpd-2.2.2-11.el6.i686.rpm

Start the FTP Service:
# service vsftpd start

Install createrepo package if it is not installed. This is package is used to create our local repository.
# rpm -ivh createrepo-0.9.8-5.el6.noarch.rpm

Then install the another one:
# rpm -ivh python-deltarpm-3.5-0.5.20090913git.el6.i686.rpm

Now install the createrepo package:

Create a folder called localyumserver (You can use your own) in /var/ftp/pub directory to save all the packages from the CentOS DVD. Copy all the files in the Packages folder from the DVD to /var/ftp/pub/localyumserver folder:
# mkdir /var/ftp/pub/localyumserver
# cp -ar *.* /var/ftp/pub/localyumserver

It will take a while to copy all the packages in the DVD. Please be patient. After all packages are copied, create a repo file called localyumserver.repo in /etc/yum.repos.d/ directory.
# nano /etc/yum.repos.d/localyumserver.repo

Type the following entries and save the file (CTRL+O to save and CTRL+X to exit):

Where,
[localyumserver] ==> Name of the Local Repository.
comment ==> Information about the Repository.
baseurl ==> Path of the Repository (i.e where we had copied the contents from CentOS DVD)
gpgcheck ==> Authentication of the Repository, which is disabled in our case.

Now it is time to create our repository. Enter the following command in the Terminal:
# createrepo -v /var/ftp/pub/localyumserver
Now the local YUM repository creation process will begin.

Note: Delete or rename all the other repo files except the newly created repo file i.e in our example it is localyumserver.repo.

Next update the repository:
yum clean all
yum update
You’re done now.

Client side configuration:

Create a repo file in your client system as mentioned above in the /etc/yum.repos.d/ directory and remove or rename the existing repositories. Then modify the baseurl as mentioned below:

[localyumserver]
comment =”My Local Repository”
baseurl=ftp://rmohan.com/pub/localyumserver
gpgcheck=0
enabled=1
(or)

[localyumserver]
comment =”My Local Repository”
baseurl=ftp://192.168.56.101/pub/localyumserver
gpgcheck=0
enabled=1

Thats it. Start using Yum. Enjoy!!

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

  

  

  

Blue Captcha Image
Refresh

*

Protected by WP Anti Spam