Creating your own repository in RHEL5
- 1.You should have 'createrepo' pacakge installed.
verify if it's already installed.
[root@localhost ~]# rpm -qa |grep create
createrepo-0.4.4-2.fc6 - Copy all your RPM pacakges in a directory, where you can then create the necessary metadata that is needed for your local repository. for example /var/ftp/pub/RHEL5_RPMS directory we have created for this purpose.
You would do that by running this command:
[root@localhost~]#creeaterepo /var/ftp/pub/RHEL5_RPMS
Whenever you put in any new RPMs, you'll have to run this command, so that the new repository metadata gets updated.
Configuring access to repositories in RHEL5 - To add an extra repository, place a definition file inthe /etc/yum.repos.d/ directory on your system. Package providers makethe definition files for their repositories available on theirwebsites.
Example configuration is:
[repositoryid]
name=my local reop
baseurl=ftp://127.0.0.1/pub/RHEL5_RPMS
gpgcheck=0
Do a man yum.conf for more options. On other rhel5 systems change 127.0.0.1 to the repository server ip. - Start ftp service.
/sbin/service vsftpd start
Make sure that you have allowd incoming traffic for ftp service on your local repository server.
Anuj Singh.