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

# rpm –ivh createrepo*

Configure 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
Add:
[Server] name=MY_SERVER
baseurl=ftp://192.168.2.100/pub/Server
gpgcheck=0

# 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 transfer.

Bobbin Zachariah 8:00 am

About Bobbin Zachariah

Founder of LinOxide, passionate lover of Linux and technology writer. Started his career in Linux / Opensource from 2000. Love traveling, blogging and listening music. Reach Bobbin Zachariah about me page and google plus page.

Author's All Posts
Like to become part of Linoxide Team and contribute tips? Contact us here.

Comments

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

All comments are subject to moderation.