Saturday, January 9, 2016

Local Yum Server (Part 2)




Local Yum Server


Step-1: Mounting the RHEL5 DVD.

Insert the RHEL5 DVD into your DVD-ROM and create a directory under the /mnt/ directory named rhel5 then mount the DVD into /mnt/rhel5/ directory.

[root@yumsrv ~]# mkdir /mnt/rhel5

[root@yumsrv ~]# mount /dev/block device name /mnt/rhel5/

Note: If you are using usb-dvd-rom then your block device name will be scd0, if your device IDE dvd-rom then your device will dvd-hdd, if else you are using SATA dvd-rom then device will be only dvd, but keep remember it that when you are working on Vmware Workstation then you have to use only cdrom.

Step-2: Copy all the files from DVD source.

Create a directory into /var/www/html/rhel5 then copy all the file from /mnt/rhel5 directory and keep into /var/www/html/rhel5 directory

[root@yumsrv ~]# mkdir /var/www/html/rhel5

[root@yumsrv ~]# cp –r /mnt/rhel5/* /var/www/html/rhel5/

Or you can directory copy /mnt/rhel5 directory without creating /var/www/html/rhel5 directory

[root@yumsrv ~]# cp –r /mnt/rhel5 /var/www/html/

Step-3: Unmount and eject the DVD

[root@yumsrv ~]# umount /mnt/rhel5/

[root@yumsrv ~]# eject /dev/block device name

Step-4: Installing createrepo RPM package for creating Repository file for DVD source.

Now go to the mount point directory (var/www/html/rhel5/) and execute the command below for installing the RPM package.

[root@yumsrv ~]# cd /var/www/html/rhel5/Server/

[root@yumsrv Server]# rpm –ivh createrepo-0.4.11-3.el5.noarch.rpm
Warning: createrepo-0.4.11-3.el5.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing…
########################################### [100%]
1:createrepo
########################################### [100%]

Step-5: Creating Repository file.

Now go to the /var/www/html/rhel5/ directory and create repodata file for DVD source.

[root@yumsrv ~]# cd /var/www/html/rhel5/
[root@yumsrv rhel5]# createrepo .

Step-6: Edit yum.conf file.

Now finally tell to yum use this “repo” frile for installing packages. It will automatically done by configuring yum.conf file

[root@yumsrv ~]# vi /etc/yum.conf

[main]

gpgcheck=0

plugins=0

[RHEL5-repository]
name=Red Hat Enterprise Linux Local Repository

baseurl=file:///var/www/html/rhel5

enabled=1

gpgkey=file:///var/www/html/rhel5/RPR-GPG-KEY-redhat-release

Step-7: Create Local debug information.

Now configure the debug information for DVD source by editing rhel-debuginfo.repo file.

[root@yumsrv ~]# cd /etc/yum.repos.d

[root@yumsrv ~]# cp rhel-debuginfo.repo  rhel5.repo

[root@yumsrv yum.repos.d]# vi rhel5.repo

[RHEL5-Debuginfo]
name=Red Hat Enterprise Linux Local Repository Debuginfo

baseurl=file:///var/www/html/rhel5

enabled=1

gpgcheck=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-key-redhat-release

Note: Remove or move the rhel-debuginfo.repo file, otherwise yum will try to use this file.

Step-8: Disable RHN Plug-ins.

Now finally disable the RHN plug-ins and tell to yum that just install the packages.


[root@yumsrv ~]# cd /etc/yum/pluginconf.d

[root@yumsrv pluginconf.d]# vi rhnplugin.conf

[main]
enables=0

gpgcheck=0


[rhel-i386-server-5]
enabled=0

Step-9: Testing the yum server.

Now verify that your Yum is working properly by following this command.

[root@yumsrv ~]# yum clean all
[root@yumsrv ~]# yum update
[root@yumsrv ~]# yum list
[root@yumsrv ~]# yum install kernel* gcc* lib* httpd* vsftpd* -y
[root@yumsrv ~]# yum erase kernel* gcc* lib* httpd* vsftpd* -y

So, now you can install & uninstall your all required packages by using yum command with install & erase command.

MAXIT INTERNET

BLOGGER

CD DVD RW

DELL

DOWNLOAD

FTP Server Linux

HACK

HARD DRIVE

HOW TO WORKIN

HARDWAER

INTERNET

INTERNET CAFE

LAPTOP

LENOVO

LINUX

Additional configuration for Samba Server (Part 2)  

BSNL/Airtel/Idea using Huawei E156G 3g Wireless USB Linux 5   

Basic File Extensions    CHANGING AN ACCOUNT EXPIRATION DATE   

Configure Linux as a Router   

Configure SAMBA Server (Part-1)   

Configure VNC server   

Configure Yum Server (Part-1)   

Configure yum server for Client machine (Part 3)   

Configuring Samba as a Standalone Server (Part 3)  

Connecting ftp Server with Anonymous User Part 5  

Create ftp account with Shared directory Part 3  

DHCP Server Configuration Part 2  

DHCP Server Configuration Part-1  

DHCP Server Configuration Part-3  

Enabling FTP Services in Yum Server (Part 5)  

FTP Server Configuration Part 1  

FTP Server How to Change In Primary DNS Server Part 2  

HTTP Client side configuration (Part 4)  

How to Vsftpd conf files Parameter Part 6   

LINUX FILE SYSTEM STRUCTURE  

Linux User Administrtion  

Linux as a Router configuration for Client Machine   

Linux client machine FileZilla FTP Client Part 4  

Local Yum Server (Part 2)  

Modifying Existing User Information  

Primary DNS Server Configuration Part-1  

Primary DNS Server Configuration Part-2    

Primary DNS Server Configuration Part-3  

Remove Linux From Your Pc Safely and restoring your MBR  

Sharing & Accessing Samba Share (Part 4)   

Speeding up your internet connection under Linux and Windows   

THE ROOT FILE SYSTEM   

VNC Server Configuration

LINUX LAB

Linux as a Router

MOTHERBOARD

Mobile

NETWORKING

REDHAT 5

REGISTRY EDTOR

RESET BIOS PASSWORD

SAMBA Server Linux

SERVER

SERVER CONFIG

SOFTWAER

VNC server Linux

Window 10

Window XP