This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Showing posts with label Yum Server. Show all posts
Showing posts with label Yum Server. Show all posts

Tuesday, December 27, 2011

Configure Yum Server on Red Hat Enterprise Linux 5(Part-3)


Configuring Yum on RHEL 5.x For Internet Access (Part-3)

In my previous tutorials you have shown that how to configure yum server for Local uses, but it is also possible to donwload and install packages via internet. If you want to do iths then you have to change few things in yum configuration, so take a look the steps.

Step-1: Mount the RHEL5 DVD.

Insert the RHEL5 DVD into your DVD-ROM and create a directory under the /mnt/ directory named rhel5 then mount the DVD into /mnt/rhel5/ directory.

[root@yumsrv ~]# mkdir /mnt/rhel5
[root@yumsrv ~]# mount /dev/block device name /mnt/rhel5/

Step-2: Copy all the files from DVD source.

Create a directory into /home/rhel5 (or any other places) then copy all the files from /mnt/rhel5 directory and keep into /home/rhel5 directory

[root@yumsrv ~]# mkdir /home/rhel5
[root@yumsrv ~]# cp –r /mnt/rhel5/* /home/rhel5/

Step-3: Install createrepo RPM package for creating Repository file for DVD source.

Now go to the mount point directory (home/rhel5/) and execute the command below for installing the RPM package.

[root@yumsrv ~]# cd /home/rhel5/Server/
[root@yumsrv Server]# rpm –ivh createrepo-0.4.11-3.el5.noarch.rpm

Step-4: Creating Repository file.

Now go to the /home/rhel5/ directory and create repodata file for DVD source.

[root@yumsrv ~]# cd /home/rhel5/
[root@yumsrv rhel5]# createrepo .

Step-5: Create an ISO file for this DVD source.

[root@yumsrv ~]# mkisofs –o /opt/RHEL5.iso –l –r /home/rhel5/

Step-6: Create a mount point directory for the ISO file.

Create a directory in /var/www/html/ named “rhel5” which will act as mount point for this ISO file.

[root@yumsrv ~]# mkdir /var/www/html/rhel5
[root@yumserver ~]# mount –r –o loop –t iso9660 /opt/RHEL5.iso /var/www/html /rhel5/

Step-7: Mounting the Image upon system Restart.

Now you have to permanently mount the ISO file that it will automatically mount at every Boot. So we have to edit fstab file for this.

[root@yumsrv ~]# vi /etc/fstab

Then type this path followed by space or tab key

/opt/RHEL5.iso  /var/www/html/rhel5/ iso9660 ro,loop,auto 0 0

Step-8: Edit yum.conf file.

Now finally tell to yum use this “repo” file for installation. It will be automatically done by configuring yum.conf file.

[root@yumsrv ~]# vi /etc/yum.conf

[base]
name=CentOS-$releasever - Base
baseurl=http://mirror.centos.org/centos/5/os/i386/
enabled=1
gpgcheck=0

[updates]
name=Red Hat Linux $releasever - Updates
baseurl=http://mirror.centos.org/centos/5/updates/i386/
enabled=1
gpgcheck=0

[Server]
name=rhel5-Server
baseurl=file:///var/www/html/rhel5/Server/
enabled=1
gpgcheck=0

[Cluster]
name=rhel5-Cluster
baseurl=file:///var/www/html/rhel5/Cluster/
enabled=1
gpgcheck=0

[ClusterStorage]
name=rhel5-ClusterStorage
baseurl=file:///var/www/html/rhel5/ClusterStorage/
enabled=1
gpgcheck=0

[VT]
name=rhel5-Virtualization
baseurl=file:///var/www/html/rhel5/VT/
enabled=1
gpgcheck=0

gpgkey=file:///var/www/html/rhel5/RPM-GPG-KEY-redhat-release

Step-9: Create Local debug information.

Now configure the debug information for DVD source by editing rhel-debuginfo.repo file.

[root@yumsrv ~]# cd /etc/yum.repos.d/
[root@yumsrv yum.repos.d]# vi rhel-debuginfo.repo

[rhel-debuginfo]
name=Red Hat Enterprise Linux- Debuging-Packages
baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/$basearch/Debuginfo/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

Step-10: Disable RHN Plug-ins.

Now finally disable the RHN plug-ins and tell to yum that just install only the packages not plug-ins.

[root@yumsrv ~]# cd /etc/yum/pluginconf.d
[root@yumsrv pluginconf.d]# vi rhnplugin.conf

[main]
enables=0
gpgcheck=0

[rhel-i386-server-5]
enabled=0

Step-11: Testing the yum server.

Now verify that your Yum is working properly by following this command.

[root@yumsrv ~]# yum clean all
[root@yumsrv ~]# yum update
[root@yumsrv ~]# yum list

Step-11: Testing the yum server.

Now it’s time to testing that our package manager is working properly by type system-config-packages into your terminal window if everything is ok then it will show the package manager as like below.

[root@yumsrv ~]# system-config-packages



Now select a category from left window such as Server and select the packages from right panel that you want to install then click Apply. It will install the core packages and also the related dependent packages. This way you can solve the dependencies installation problem.

Now you can download/install/update packages via internet and also DVD source using yum & package manager.

Configure Yum Server on Red Hat Enterprise Linux 5(Part-2)


Configuring Local Yum Server on RHEL 5.x (Part-2)

Package manager:

All software on a Red Hat Enterprise Linux system is divided into RPM packages which can install, upgrade, or remove. In my previous tutorial I have described that how to use yum as a command line tools for downloading and installing packages. But it is also possible to do all this things using package manager, actually a package manager is graphical tools for Installing/Removing Packages, which is similar to the Add/Remove program of windows. But from Red Hat Enterprise Linux 5 it is difficult to install/remove packages using package manager due to its dependencies problem. To install/remove packages using package manager by solving dependencies problem follow the following steps to enable the package manager.

Server Side Configuration

You can configure package manager to use in local machine or remote machine on your network. You can also do this using internet that you will show on my next tutorial. If you have more than one computer which are running Linux operating system first configure a server system where all the repositories will store then install and configure httpd/vsftpd services for client machine accessing, that I have already been discussed in my previous tutorial (Part-1).

Step-1: Mount the RHEL5 DVD.

Insert the RHEL5 DVD into your DVD-ROM and create a directory under the /mnt/ directory named rhel5 then mount the DVD into /mnt/rhel5/ directory.

[root@yumsrv ~]# mkdir /mnt/rhel5
[root@yumsrv ~]# mount /dev/block device name /mnt/rhel5/

Step-2: Copy all the files from DVD source.

Create a directory into /home/rhel5 (or any other places) then copy all the files from /mnt/rhel5 directory and keep into /home/rhel5 directory

[root@yumsrv ~]# mkdir /home/rhel5
[root@yumsrv ~]# cp –r /mnt/rhel5/* /home/rhel5/

Step-3: Install createrepo RPM package for creating Repository file for DVD source.

Now go to the mount point directory (home/rhel5/) and execute the command below for installing the RPM package.

[root@yumsrv ~]# cd /home/rhel5/Server/
[root@yumsrv Server]# rpm –ivh createrepo-0.4.11-3.el5.noarch.rpm
Warning: createrepo-0.4.11-3.el5.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing…
########################################### [100%]
1:createrepo
########################################### [100%]

Step-4: Creating Repository file.

Now go to the /home/rhel5/ directory and create repodata file for DVD source.

[root@yumsrv ~]# cd /home/rhel5/
[root@yumsrv rhel5]# createrepo .

Step-5: Create an ISO file for this DVD source.

[root@yumsrv ~]# mkisofs –o /opt/RHEL5.iso –l –r /home/rhel5/

Step-6: Create a mount point directory for the ISO file.

Create a directory in /var/www/html/ named “rhel5” which will act as mount point for this ISO file.

[root@yumsrv ~]# mkdir /var/www/html/rhel5
[root@yumserver ~]# mount –r –o loop –t iso9660 /opt/RHEL5.iso /var/www/html /rhel5/

Step-7: Mounting the Image upon system Restart.

Now you have to permanently mount the ISO file that it will automatically mount at every Boot. So we have to edit fstab file for this.

[root@yumsrv ~]# vi /etc/fstab

Then type this path following by space or tab key

/opt/RHEL5.iso  /var/www/html/rhel5/ iso9660 ro,loop,auto 0 0

Step-8: Edit yum.conf file.

Now finally tell to yum use this “repo” file for installation. It will be automatically done by configuring yum.conf file.

[root@yumsrv ~]# vi /etc/yum.conf

[main]
gpgcheck=0
plugins=0

[Base]
name=Red Hat Enterprise Linux Local Repository
baseurl=file:///var/www/html/rhel5
enabled=1
gpgcheck=0
gpgkey=file:///var/www/html/rhel5/RPM-GPG-KEY-redhat-release

[Server]
name=rhel5-Server
baseurl=file:///var/www/html/rhel5/Server/
enabled=1

[Cluster]
name=rhel5-Cluster
baseurl=file:///var/www/html/rhel5/Cluster/
enabled=1

[ClusterStorage]
name=rhel5-ClusterStorage
baseurl=file:///var/www/html/rhel5/ClusterStorage/
enabled=1

[VT]
name=rhel5-Virtualization
baseurl=file:///var/www/html/rhel5/VT/
enabled=1

Step-9: Create Local debug information.

Now configure the debug information for DVD source by editing rhel-debuginfo.repo file.

[root@yumsrv ~]# cd /etc/yum.repos.d/
[root@yumsrv yum.repos.d]# cp rhel-debuginfo.repo  rhel5.repo
[root@yumsrv yum.repos.d]# vi rhel5.repo

[RHEL5-Debuginfo]
name= Red Hat Enterprise Linux Local Repository Debuginfo
baseurl= file:///var/www/html/rhel5
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

Note: Remove or move the rhel-debuginfo.repo file, otherwise yum will try to use this file.

Step-10: Disable RHN Plug-ins.

Now finally disable the RHN plug-ins and tell to yum that just install the packages.

[root@yumsrv ~]# cd /etc/yum/pluginconf.d
[root@yumsrv pluginconf.d]# vi rhnplugin.conf

[main]
enables=0
gpgcheck=0

[rhel-i386-server-5]
enabled=0

Step-11: Testing the yum server.

Now verify that your Yum is working properly by following this command.

[root@yumsrv ~]# yum clean all
[root@yumsrv ~]# yum update
[root@yumsrv ~]# yum list

Step-11: Testing the yum server.

Now it’s time to testing that our package manager is working properly by type system-config-packages into your terminal window if everything is ok then it will show the package manager as like below. You can also start the application; go to Applications (the main menu on the panel) → Add/Remove Software.

[root@yumsrv ~]# system-config-packages


Now select a category from left window such as Server and select the packages from right panel that you want to install then click Apply. It will install the core packages and also the related dependent packages. This way you can solve the dependencies installation problem.

Prepare Server for Client machine:

If you want to provide client machine to download & install the packages via package manager, then you will have to enable following services below on your Server Machine. In this case I am describing both of them, but in real world you can configure one of them.

§  By Enabling HTTP Services
§  By Enabling FTP Services

Enabling HTTP Services in Yum Server

Step-1: Install http RPM package

[root@yumsrv ~]# yum install httpd* -y

Step-2:  Configuring the httpd.conf file.

Step-3:  Restart all the required services

[root@yumsrv ~]# service httpd restart
[root@yumsrv ~]# chkconfig httpd on

HTTP Client configuration

Step-1:  Locating repository information

[root@pc1 ~]# vi /etc/yum.conf

[main]
gpgcheck=0
plugins=0

[Base]
name=Red Hat Enterprise Linux Local Repository
baseurl=http://var/www/html/rhel5
enabled=1
gpgcheck=0
gpgkey=http://var/www/html/rhel5/RPM-GPG-KEY-redhat-release

[Server]
name=rhel5-Server
baseurl=http://var/www/html/rhel5/Server/
enabled=1

[Cluster]
name=rhel5-Cluster
baseurl=http://var/www/html/rhel5/Cluster/
enabled=1

[ClusterStorage]
name=rhel5-ClusterStorage
baseurl=http://var/www/html/rhel5/ClusterStorage/
enabled=1

[VT]
name=rhel5-Virtualization
baseurl=http://var/www/html/rhel5/VT/
enabled=1

Step-2:  Locating debug information

Step-3:  Disable RHN plug-ins

Step-4:  Editing hosts file

[root@pc1 ~]# vi /etc/hosts

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain localhost
210.207.201.254 yumsrv     yumsrv
210.207.201.x   pc1        pc1

Step-5:  Test the Configuration.

Now verify that your client can download and install packages from yum server by typing the command below.

[root@pc1 ~]# yum clean all
[root@pc1 ~]# yum update
[root@pc1 ~]# yum list
[root@pc1 ~]# system-config-packages

So now you can install/remove the packages using packages manager from your client machine by with the help of local http server.

Enabling FTP Services in Yum Server

Step-1:  Installing the ftp package

[root@yumsrv ~]# yum install vsftpd*

Step-2:  Edit the vsftps.conf file

Step-3:  Restart all the required services

[root@yumsrv ~]# service iptables stop
[root@yumsrv ~]# chkconfig iptables off
[root@yumsrv ~]# service network restart
[root@yumsrv ~]# service vsftpd restart
[root@yumsrv ~]# chkconfig vsftpd on

Client side configuration

Follow the “HTTP Client configuration” Just replace “http://210.207.201.254/rhel5”
With ftp://210.207.201.254/pub/rhel5. Also configure the “/etc/hosts” file.
b

Configure Yum Server on Red Hat Enterprise Linux 5(Part-1)


Configuring Local Yum Server on RHEL 5

Overview:

Yum or yellow dot update manager is the front of RPMs. It is only design for packages dependencies. Yum can collect packages from more than one location. To download & install RPM packages, it use a repository file, a repository is a single collection point for all documents that relate to the program. Generically repository refers to a central place where data is stored and maintained. A repository can be a place where multiple databases or files are located for distribution over the network, or a local machine. Yum first read this file list then it can download & install the packages.

Why Yum?

Generally in every Linux platform, it is difficult to install the packages (Software), because in Linux a single package is related with other packages, so if you want to install any package or packages then you need to know the other related packages/dependent packages name, but it is tough to remember so you can install packages by using yum. By using yum you can solve to installing all the dependent packages, this way you can remove the dependencies problem. Yum could be use as Local server that means by configuring yum you can install packages on local machine or can be use remote machines on your network. You can also download and install packages from internet by using yum.

Pre-requisites of Yum Server:

§  A Linux Server with IP address 210.207.201.254 & hostname yumsrv
§  A Linux Client with IP address 210.207.201.x & hostname pc1
§  Configure NIC card on every machine
§  Update /etc/hosts file on both Linux system or use DNS system for name resolution.
§  A DVD-ROM with RHEL5 DVD 

Necessary configuration for Server & Client Machine

IP Configuration: Change your server & client machine IP address as like below.

[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0

#Broadcom Corporation Net link BCM57875 Gigabyte Ethernet PCI Express
DEVICE=eth0
BOOTPROTO=static
HWADDR=00:0C:29: EB: B2: CA
ONBOOT=yes
TYPE=Ethernet
PEERDNS=no
USERCTL=no
IPV6INIT=no
IPADDR=210.207.201.254
NETMASK=255.255.255.0
NETWORK=210.207.201.0
BROADCAST=210.207.201.255

Changing Host name: Change your server & client machine name as like below.

[root@localhost ~]# vi /etc/sysconfig/network

NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=yumsrv

Local Yum Server

Step-1: Mounting the RHEL5 DVD.

Insert the RHEL5 DVD into your DVD-ROM and create a directory under the /mnt/ directory named rhel5 then mount the DVD into /mnt/rhel5/ directory.

[root@yumsrv ~]# mkdir /mnt/rhel5
[root@yumsrv ~]# mount /dev/block device name /mnt/rhel5/

Note: If you are using usb-dvd-rom then your block device name will be scd0, if your device IDE dvd-rom then your device will dvd-hdd, if else you are using SATA dvd-rom then device will be only dvd, but keep remember it that when you are working on Vmware Workstation then you have to use only cdrom.

Step-2: Copy all the files from DVD source.

Create a directory into /var/www/html/rhel5 then copy all the file from /mnt/rhel5 directory and keep into /var/www/html/rhel5 directory

[root@yumsrv ~]# mkdir /var/www/html/rhel5
[root@yumsrv ~]# cp –r /mnt/rhel5/* /var/www/html/rhel5/

Or you can directory copy /mnt/rhel5 directory without creating /var/www/html/rhel5 directory

[root@yumsrv ~]# cp –r /mnt/rhel5 /var/www/html/

Step-3: Unmount and eject the DVD

[root@yumsrv ~]# umount /mnt/rhel5/
[root@yumsrv ~]# eject /dev/block device name

Step-4: Installing createrepo RPM package for creating Repository file for DVD source.

Now go to the mount point directory (var/www/html/rhel5/) and execute the command below for installing the RPM package.

[root@yumsrv ~]# cd /var/www/html/rhel5/Server/
[root@yumsrv Server]# rpm –ivh createrepo-0.4.11-3.el5.noarch.rpm
Warning: createrepo-0.4.11-3.el5.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing…
########################################### [100%]
1:createrepo
########################################### [100%]

Step-5: Creating Repository file.

Now go to the /var/www/html/rhel5/ directory and create repodata file for DVD source.

[root@yumsrv ~]# cd /var/www/html/rhel5/
[root@yumsrv rhel5]# createrepo .

Step-6: Edit yum.conf file.

Now finally tell to yum use this “repo” frile for installing packages. It will automatically done by configuring yum.conf file

[root@yumsrv ~]# vi /etc/yum.conf

[main]
gpgcheck=0
plugins=0

[RHEL5-repository]
name=Red Hat Enterprise Linux Local Repository
baseurl=file:///var/www/html/rhel5
enabled=1
gpgkey=file:///var/www/html/rhel5/RPR-GPG-KEY-redhat-release

Step-7: Create Local debug information.

Now configure the debug information for DVD source by editing rhel-debuginfo.repo file.

[root@yumsrv ~]# cd /etc/yum.repos.d
[root@yumsrv ~]# cp rhel-debuginfo.repo  rhel5.repo
[root@yumsrv yum.repos.d]# vi rhel5.repo

[RHEL5-Debuginfo]
name=Red Hat Enterprise Linux Local Repository Debuginfo
baseurl=file:///var/www/html/rhel5
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-key-redhat-release

Note: Remove or move the rhel-debuginfo.repo file, otherwise yum will try to use this file.

Step-8: Disable RHN Plug-ins.

Now finally disable the RHN plug-ins and tell to yum that just install the packages.

[root@yumsrv ~]# cd /etc/yum/pluginconf.d
[root@yumsrv pluginconf.d]# vi rhnplugin.conf

[main]
enables=0
gpgcheck=0

[rhel-i386-server-5]
enabled=0

Step-9: Testing the yum server.

Now verify that your Yum is working properly by following this command.

[root@yumsrv ~]# yum clean all
[root@yumsrv ~]# yum update
[root@yumsrv ~]# yum list
[root@yumsrv ~]# yum install kernel* gcc* lib* httpd* vsftpd* -y
[root@yumsrv ~]# yum erase kernel* gcc* lib* httpd* vsftpd* -y

So, now you can install & uninstall your all required packages by using yum command with install & erase command.

Configure yum server for Client machine:

If you want to provide client machine to download & install the packages via yum server, then you will have to enable following services below on your yum server. In this case I am describing both of them, but in real world you can configure both of them or one of them.

§  By Enabling HTTP Services
§  By Enabling FTP Services

Enabling HTTP Services in Yum Server

Step-1: Installing http RPM package

[root@yumsrv ~]# yum install httpd* -y

Step-2:  Configuring the httpd.conf file.

Now go to the main configuration file for enabling http services

[root@yumsrv ~]# vi /etc/httpd/conf/httpd.conf

Directives
Discription
Line Number
Orginal File Text
Modified File Text
Listen
Specify the Port Number where apache will listen on
134
80
210.207.201.254:80
ServerAdmin
e-mail address of the server administrator
251
root@localhost
ServerName
Put the host name(FQDN)of web server
265
DocumentRoot
Specify the html file location of the web server
281
“/var/www/html”
“/var/www/html”
NameVirtualHost
Set web Server IP which will contain the virtual host
972
*:80
210.207.201.254:80

** Also go to the end of the configuration file for configuring Virtual host

<VirtualHost 210.207.201.254:80>
     ServerAdmin     root@210.207.210.254
     DocumentRoot    /var/www/html
     ServerName 210.207.201.254
</virtualHost>

Tips: To edit httpd.conf file set Line number & enter Follow the method.

Esc → set number → Enter → Esc → Shift+: → type line number which you want to edit → Enter → press I for insert mode → then edit → Save & Exit.

Step-3:  Editing hosts file

If DNS is not use for http services then you put the host name and IP address of yum server in to the /etc/hosts file in every client machine otherwise packages will be failed to download & install. The configuration file will look like below,

[root@yumsrv ~]# vi /etc/hosts

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain localhost
210.207.201.254 yumsrv     yumsrv

Step-4:  After configuring http service you have to restart httpd service

[root@yumsrv ~]# service iptables stop
[root@yumsrv ~]# chkconfig iptables off
[root@yumsrv ~]# service network restart
[root@yumsrv ~]# service httpd restart
[root@yumsrv ~]# chkconfig httpd on

HTTP Client side configuration

Step-3:  Editing hosts file

[root@yumsrv ~]# vi /etc/hosts

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain localhost
210.207.201.254 yumsrv     yumsrv
210.207.201.x   pc1        pc1

Step-1:  Locating repository information

[root@pc1 ~]# vi /etc/yum.conf

[main]
gpgcheck=0
plugins=0

[RHEL5-Repository]
name=Red Hat Enterprise Linux Local Repository
baseurl=http://210.207.201.254/rhel5
enabled=1
gpgcheck=0
gpgkey=http://210.207.201.254/rhel5/RPM-GPG-KEY-redhat-release

Step-2:  Locating debug information

[root@pc1 ~]# cd /etc/yum.repos.d/
[root@pc1 yum.repos.d]# cp rhel-debuginfo.repo  rhel5.repo
[root@pc1 yum.repos.d ~]# vi rhel5.repo

[RHEL5-Debuginfo]
name= Red Hat Enterprise Linux Local Repository Debuginfo
baseurl=http://210.207.201.254/rhel5
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

Note: Now remove or move the rhel-debuginfo.repo file, otherwise yum will be try to use this file

Step-3:  Disable RHN plug-ins

[root@pc1 ~]# cd /etc/yum/pluginconf.d
[root@pc1 ~ pluginconf.d]# vi rhnplugin.conf

[main]
enabled=0
gpgcheck=0

[rhel-i386-server-5]
enabled=0

Step-4:  Testing the server

Now verify that your client can download and install packages from yum server by typing the command below.

[root@pc1 ~]# yum clean all
[root@pc1 ~]# yum update
[root@pc1 ~]# yum list
[root@pc1 ~]# yum install kernel* gcc* lib* httpd* vsftpd* -y
[root@pc1 ~]# yum erase kernel* gcc* lib* httpd* vsftpd* -y

So, now you can install & uninstall your all required packages from local http server by using yum command.

Enabling FTP Services in Yum Server

Your client can download and install packages from yum server using FTP services. For providing FTP services you have to create a public directory named “rhel5” into /var/ftp/pub/ directory and put all the packages in it.

Step-1:  Installing the ftp package

[root@yumsrv ~]# yum install vsftpd*

Step-2:  Edit the vsftps.conf file

[root@yumsrv ~]# vi /etc/vsftpd/vsftpd.conf

Directives
Line Number
Orginal File Text
Modified File Text
Anonymous_enable
12
YES
YES

Note: rempve the “#” from line number 27,31,81,81 but do not removw “#” from the line 89 & 91.

[root@yumsrv ~]# service iptables stop
[root@yumsrv ~]# chkconfig iptables off
[root@yumsrv ~]# service network restart
[root@yumsrv ~]# service vsftpd restart
[root@yumsrv ~]# chkconfig vsftpd on

Client side configuration

Follow the “HTTP Client configuration” Just replace “http://210.207.201.254/rhel5”
With ftp://210.207.201.254/pub/rhel5. Also configure the “/etc/hosts” file.