Yum server (yellowdog updater modified) it’s a package manager for rpm management, yum server make it easy rpm install, update, remove.
Step 1.
Firstly you have to need a RHEL 6 DVD then insert it’s in your system and mount it with media folder because of that all media automatically mount with Media folder.
Step 2.
Now change directory within your DVD run below command.
[root@localhost ~]# cd /media/RHEL-6.6\ Server.x86_64/Packages/
[root@localhost Packages]#
NOTE:- For Yum server installation we have required these RPM. It’s mandatory for yum server.
- deltarpm
- python-deltarpm
- createrepo
Step 3.
Now install deltarpm run below command.
[root@localhost Packages]# rpm -ivh deltarpm*
warning: deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:deltarpm ########################################### [100%]
[root@localhost Packages]#
Step 4.
Then install python-deltarpm follow below stept.
[root@localhost Packages]# rpm -ivh python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
warning: python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:python-deltarpm ########################################### [100%]
[root@localhost Packages]#
Step 5.
Now install createrepo rpm this is the last rpm for yum server and it’s the main RPM
[root@localhost Packages]# rpm -ivh createrepo-0.9.9-22.el6.noarch.rpm
warning: createrepo-0.9.9-22.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:createrepo ########################################### [100%]
[root@localhost Packages]#
Step 6.
Now make directory for yum server repository using mkdir command. You can give any name to this directory and create in Home directory of ROOT user. This directory contain all rpm which is we are copying in this directory and it’s also hold database file of yumserver follow below steps.
[root@localhost Packages]# mkdir /yumserver
[root@localhost Packages]#
Step 7.
Now going in Packages directory which is in your DVD and then copy all rpm file from Packages directory into yumserver directory follow below steps.
[root@localhost Packages]# cp -v *.rpm /yumserver/
Step 8.
After copying all rpm then going in yumserver directory using cd command and then run createrepo command for creating Database for yum server, in this command we are using dot (.) it means current location of your on terminal, you can check your current location using ‘pwd’ command it means present working directory. For this please follow bellow steps.
[root@localhost Packages]# cd\
[root@localhost ~]# cd /yumserver/
[root@localhost yumserver]# createrepo -v .
Step 9.
Now going in yum.repos.d directory using cd command for creating a repo file.
[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]#
Step 10.
Then make a file using VIM editor which is name is yumserver.repo. For this file you can give any name but extension must be “.repo” it’s required.
[root@localhost yum.repos.d]# vim yumserver.repo
Step 11.
Then press ‘I’ for insert mode and then write these some line in this file.
[yumserver]
name=yumserver
baseurl=file:///yumserver
enabled=1
gpgcheck=0
Then press esc button and then shift+: then wq for saving changes.
Step 12.
Now run below command for checking yum server configuration is done or not if it’s run successfully so your yum server configured successfully. Now enjoy your yum server.
[root@localhost ~]# yum repolist
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
yumserver | 2.9 kB 00:00 ...
yumserver/primary_db | 3.2 MB 00:00 ...
repo id repo name status
yumserver yumserver 3,785
repolist: 3,785
[root@localhost ~]#
For more
No comments:
Post a Comment