How to Create Ftp Yum Repository in Linux

YUM as we know it a Yellow Dog Modifier is the Red Hat package manager that is able to query for information about available packages, fetch packages from repositories, install and uninstall them, and update an entire system to the latest available version. Yum performs automatic dependency resolution on packages you are updating, installing, or removing, and thus is able to automatically determine, fetch, and install all available dependent packages.

Yum can be configured with new, additional repositories, or package sources, and also provides many plug-ins which enhance and extend its capabilities. Yum is able to perform many of the same tasks that RPM can; additionally, many of the command line options are similar. Yum enables easy and simple package management on a single machine or on groups of them.

Vsftpd is a GPL licensed FTP server for UNIX systems, including Linux. It is secure and extremely fast. It is stable. Vsftpd is a mature and trusted solution.

So here we have few steps to do

1. Install vsftpd server
2. Create repository with createrepo
3. Configure repository
4. Configure clients

Install vsftpd server

Insert RHEL 5 Installation DVD

# mkdir ~/Desktop/rhel_cd
# mount /dev/cdrom ~/Desktop/rhel_cd
# cd ~/Desktop/rhel_cd/Server
# rpm –ivh vsftpd*

Create repository with createrepo

Lets create the repo using below command

# rpm –ivh createrepo*

Configure repository

Now we can configure the repository

# cd /var/ftp/pub/Server/repodata
# cp comps-rhel5-server-core.xml /var/ftp/pub/Server/
# cd /var/ftp/pub/Server
# createrepo -vg comps-rhel5-server-core.xml /var/ftp/pub/Server/
# service vsftpd start (Starting vsftpd services)
# chkconfig --add vsftpd ( making it persistent across all run levels)

Configure clients

Run following commands on clients

# vi /etc/yum.repos.d/yum_server.repo
[Server] name=MY_SERVER

# vi /etc/vsftpd/vsftpd.conf
Set the following parameter (if not already set)
anonymous_enable = yes

# service vsftpd restart

NB: Yum provides secure package management by enabling GPG (Gnu Privacy Guard; also known as GnuPG) signature verification on GPG-signed packages to be turned on for all package repositories (i.e. package sources), or for individual repositories. When signature verification is enabled, Yum will refuse to install any packages not GPG-signed with the correct key for that repository. This means that you can trust that the RPM packages you download and install on your system are from a trusted source, such as Red Hat, and were not modified during the transfer.

Bobbin Zachariah 8:00 am


Your email address will not be published. Required fields are marked *

All comments are subject to moderation.