Wednesday, September 3, 2014

Linux Servers : How To Create Yum Server

How To Create Yum Server


What Is Yum Server ?
 The Yellowdog Updater, Modified (yum) is an open-source command-line package-management utility for Linux operating systems using the RPM Package Manager. Though yum has a command-line interface, several other tools provide graphical user interfaces to yum functionality. Yum allows automatic updates, package and dependency management, on RPM-based distributions. Like the Advanced Packaging Tool (APT) from Debian, yum works with software repositories (collections of packages), which can be accessed locally or over a network connection. 


Advantages of Yum Server-

  • Automatic resolution of software dependencies. If a package installation or upgrade request is made and requires the installation or upgrade of additional packages, YUM can list these dependencies and prompt the user to install or upgrade them.
  • Command-line and graphical versions. The command-line version can be run on a system with a minimal number of software packages. The graphical versions offer ease-of-use and a user-friendly graphical interface to software management.
  • Multiple software locations at one time. YUM can be configured to look for software packages in more than one location at a time.

Configure the Yum Server-Server Side:


1. insert DVD in to DVD-ROM 

2. mount the DVD-ROM 
 #mount /dev/cdrom /mnt/ 

3.go to /mnt/Packages/

  #cd /mnt/Packages/
  #ll                           {List all the package}

4.now install the yum server rpm 
#rpm -ivh vsftpd-2.2.2-11.el6.i686.rpm 
#rpm -ivh createrepo-0.44...........noarch.rpm

5.Create a folder under the Directory

#mkdir /var/ftp/pub/yum                    {Note-yum is a Directory name}

6. Change The Directory Permission

#chmod -R 777 /var/ftp/pub/yum 

7.Copy all /mnt Data in this location /var/ftp/pub/yum

#cp -rvf . /mnt/* /var/ftp/pub/yum/

8.Go to Repository file

#cd /etc/yum.repos.d/
#ll

9.now create repository file

#vi server.repo
Then Entry-

[server]

name=Rhel6
baseurl=file:///var/ftp/pub/yum/
gpgcheck=0
enabled=1

Now Save And Exit.


10.Createrepo -(is a program that creates a repomd (xml-based rpm metadata)repository from a set of rpms.)

               
#createrepo /var/ftp/pub/yum/

11.Umount Dvd-ROM and /mnt
#umount /mnt
#umount /dev/cdrom

12.Clean all cache memory
#yum clean all

13.restart vdftpd services

#/etc/init.d/vsftpd restart
#chkconfig vsftpd on                    {updates  and queries runlevel information for system services}

14.Check yum server

#yum list


to install rpm using yum server
#yum install bind* -y

to search rpm using yum server

#yum list | grep rpm_name 

to remove rpm using yum server

#yum remove rpm_name

Client Side:


1.Create Repository File

#vi /etc/yum.repos.d/1.repo

Then Entry-


[server]

name=Rhel6
baseurl=ftp://ip address of server/pub/yum                   {Server IP and Define Proper path}
gpgcheck=0
enabled=1

Now Save And Exit.


2.Check yum server

#yum repolist - See more at: http://www.linuxforfreshers.com/p/how-to-create-yum-server-what-is-yum.html#sthash.jhc7JS2f.dpuf

No comments: