Tuesday, July 17, 2018

Yum configuration on RHEL

--cdrom mount
#mount /dev/sr0  /cdrom   

Step-1:
cp -vR /cdrpm/*    /destination

Step-2:
#cd /etc/yum.repo.d/
#vi server.repo

[serverrepo]
name=myrepo
baseurl=file:///destination/
enabled=1
gpgcheck=0

Step-3:
#yum clean all
#yum list

Implement
===========

[root@bachstd ]# mount /dev/sr0 /cd
mount: /dev/sr0 is write-protected, mounting read-only

[root@bachstd ]# cd /cd/
[root@bachstd cd]# ll
total 1313
drwxr-xr-x. 5 root root   2048 Aug  4  2017 addons
drwxr-xr-x. 3 root root   2048 Aug  4  2017 EFI
-rw-r--r--. 1 root root   8643 Aug  4  2017 EULA
-rw-r--r--. 1 root root  18390 Aug  4  2017 GPL
drwxr-xr-x. 3 root root   2048 Aug  4  2017 images
drwxr-xr-x. 2 root root   2048 Aug  4  2017 isolinux
drwxr-xr-x. 2 root root   2048 Aug  4  2017 LiveOS
drwxr-xr-x. 2 root root 813056 Aug  4  2017 Packages
-rw-r--r--. 1 root root 137152 Aug  4  2017 RELEASE-NOTES-U4-en
-rw-r--r--. 1 root root 346229 Aug  4  2017 RELEASE-NOTES-U4-en.html
drwxr-xr-x. 2 root root   4096 Aug  4  2017 repodata
-rw-r--r--. 1 root root   1011 Aug  4  2017 RPM-GPG-KEY
-rw-r--r--. 1 root root   1011 Aug  4  2017 RPM-GPG-KEY-oracle
-r--r--r--. 1 root root   3322 Aug  4  2017 TRANS.TBL
[root@bachstd cd]# cd
[root@bachstd ]#


Installating following packages for exists [/var/ftp/pub] directory
[root@bachstd ]# cd /cd/Packages/
[root@bachstd Packages]# rpm -ivh vsftpd-3.0.2-22.el7.x86_64.rpm
warning: vsftpd-3.0.2-22.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:vsftpd-3.0.2-22.el7              ################################# [100%]
[root@bachstd Packages]# cd
[root@bachstd ]#


#cp -vR /cd/* /var/ftp/pub/

[root@bachstd yum.repos.d]# vi myserver.repo
[myserver]
name=mysrv
baseurl=file:///var/ftp/pub/
enabled=1
gpgcheck=0

[root@bachstd yum.repos.d]# yum clean all
[root@bachstd yum.repos.d]# yum list

No comments:

Post a Comment