Configure Linux yum server step by step
What is YUM command?
YUM stands for Yellow dog Updater, Modified because it is based on YUP, the Yellow dog Updater. Yellow Dog is a version of Linux for the Power Architecture hardware. YUP, and later YUM, were written by the Linux community as a way to maintain an RPM-based system.
Uses of YUM Command?
Automatic resolution of software dependencies. If a package installation or upgrade request is made and requires the installation or upgrade of additional packages, YUM can list these dependencies and prompt the user to install or upgrade them.
Command-line and graphical versions. The command-line version can be run on a system with a minimal number of software packages. The graphical versions offer ease-of-use and a user-friendly graphical interface to software management.
Multiple software locations at one time. YUM can be configured to look for software packages in more than one location at a time.
Ability to specify particular software versions or architectures. Software locations accessible by YUM can contain multiple versions of the same RPM package and different builds for different architectures such as one for i686 and one for x86_64. yum can easily check the appropriate version and download it.
While it's unlikely that you'll have an Internet connection during the exam, you could have a network connection to a local repository. So you should be ready to use the yum command during the Red Hat exam.
YUM Server step by step configurations
STEP:-1
Insert OEL 6.5 installation media in your computer and mount it into your PC.
to mount OEL 6.5 DVD into your PC, execute the following command
[root@test ~]# mount /dev/cdrom /media
STEP:-2
Go to "/media/Server/Packages/" directory and installed the required packages for YUM Server.
following packages are required for YUM Server :
vsftpd-2.2.2-6.el6.x86_64.rpm
deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
createrepo-0.9.8-4.el6.noarch.rpm
to go to "/media/Server/Packages/", use the following command
[root@test ~]# cd /media/Server/Packages/
to install the above packages, execute the following command
# rpm -ivh vsftpd-2.2.2-6.el6.x86_64.rpm
# rpm -ivh deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
# rpm -ivh python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
# rpm -ivh createrepo-0.9.8-4.el6.noarch.rpm
[root@test
Packages]# rpm -ivh vsftpd-2.2.2-11.el6_4.1.x86_64.rpm
warning: vsftpd-2.2.2-11.el6_4.1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing... ########################################### [100%]
package vsftpd-2.2.2-11.el6_4.1.x86_64 is already installed
[root@test Packages]# rpm -ivh deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
warning: deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing... ########################################### [100%]
1:deltarpm ########################################### [100%]
warning: vsftpd-2.2.2-11.el6_4.1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing... ########################################### [100%]
package vsftpd-2.2.2-11.el6_4.1.x86_64 is already installed
[root@test Packages]# rpm -ivh deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
warning: deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing... ########################################### [100%]
1:deltarpm ########################################### [100%]
[root@test
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 ec551f03: NOKEY
Preparing... ########################################### [100%]
1:python-deltarpm ########################################### [100%]
[root@test Packages]# rpm -ivh createrepo-0.9.9-18.0.1.el6.noarch.rpm
warning: createrepo-0.9.9-18.0.1.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing... ########################################### [100%]
1:createrepo ########################################### [100%]
warning: python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing... ########################################### [100%]
1:python-deltarpm ########################################### [100%]
[root@test Packages]# rpm -ivh createrepo-0.9.9-18.0.1.el6.noarch.rpm
warning: createrepo-0.9.9-18.0.1.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing... ########################################### [100%]
1:createrepo ########################################### [100%]
STEP:-3
In the next step start the FTP Service.
to check the status of FTP Service execute the following command
[root@test ~]# service vsftpd status
to start the FTP Service execute the following command
[root@test ~]# service vsftpd start
to permanently start FTP Service execute the following command
[root@test ~]# chkconfig vsftpd on
STEP:-4
Now go to "/var/ftp/pub/" directory and then create a directory in it named "IT".
to go to "/var/ftp/pub/", execute the following command
[root@test ~]# cd /var/ftp/pub/
to create a directory named IT, execute the following command
[root@test ~]# mkdir IT
STEP:-5
Copy the entire OEL 6 DVD in the "/var/ftp/pub/IT/" directory.
to copy the entire OEL 6.5 DVD in the "/var/ftp/pub/IT/", use the following command
[root@test ~]# cp -rf /media/* /var/ftp/pub/IT/
STEP:-6
Create the reposatory of RPM Packages of "/var/ftp/pub/IT/" directory.
to create the reposatory of RPM Packages, use the following command
[root@test ~]# createrepo -v /var/ftp/pub/IT/
Workers
Finished
Gathering worker results
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Starting other db creation: Wed Jun 17 14:11:26 2015
Ending other db creation: Wed Jun 17 14:11:33 2015
Starting filelists db creation: Wed Jun 17 14:11:36 2015
Ending filelists db creation: Wed Jun 17 14:12:01 2015
Starting primary db creation: Wed Jun 17 14:12:02 2015
Ending primary db creation: Wed Jun 17 14:12:20 2015
Sqlite DBs complete
Gathering worker results
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Starting other db creation: Wed Jun 17 14:11:26 2015
Ending other db creation: Wed Jun 17 14:11:33 2015
Starting filelists db creation: Wed Jun 17 14:11:36 2015
Ending filelists db creation: Wed Jun 17 14:12:01 2015
Starting primary db creation: Wed Jun 17 14:12:02 2015
Ending primary db creation: Wed Jun 17 14:12:20 2015
Sqlite DBs complete
STEP:-7
In the next step create the configuration file of YUM Server in "/etc/yum.repos.d/" directory and add the following line in it.
[server]
name=YUM-Server
baseurl=ftp://192.168.1.101/pub/IT
enabled=1
gpgcheck=0
Note :- where 192.168.1.101 is the IP address of your PC on which you configure YUM-Server.
to create the configuration file of YUM Server in "/etc/yum.repos.d/", use the following command
[root@test ~]# vi /etc/yum.repos.d/server.repo
[root@test
yum.repos.d]# cat server.repo
[server]
name=YUM-Server
baseurl=ftp://192.168.1.115/pub/IT
enabled=1
gpgcheck=0
[root@test yum.repos.d]#
[server]
name=YUM-Server
baseurl=ftp://192.168.1.115/pub/IT
enabled=1
gpgcheck=0
[root@test yum.repos.d]#
STEP:-8
Now install any packages using YUM-Server.
to install any packages using YUM-Server, execute the following command
[root@test ~]# yum install <package-name>
[root@test ~]# yum install oracle-rdbms-server-12cR1-preinstall
*******************************************************************************************************
[root@sujeet ~]# yum install oracle-ebs-server-R12-preinstall
[root@sujeet yum.repos.d]# vi public-yum-ol6.repo
[ol6_latest]
name=Oracle Linux $releasever Latest ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=1
[ol6_addons]
name=Oracle Linux $releasever Add ons ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/addons/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=1
[ol6_UEK_latest]
name=Latest Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/UEK/latest/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=1
No comments:
Post a Comment