Installing and running web server (httpd)
Checking web server service# ps ax |grep http
If the httpd service is not running please install
#yum -y install httpd*
Starting web server service
#service httpd start
Build the repository
# mkdir /var/www/html/yum
Getting packages to repository
Mounting CD/DVD RHEL
Copying RPM packages from CD/DVD to yum repository
#cp -v /media/RHEL/RPMS/* /var/www/html/yum
installing createrepo
Installing createrepo package
Checking its package
# rpm -qa |grep createrepo
If doesn’t have : install # rpm –ivh createrepo.x.x.x.rpm
Running createrepo tool to repository directory
Createing meta-data to repository directory
# createrepo /var/www/html/yum
You can see:
-rw-r--r-- 1 root root 2227275 2010-02-18 11:51 filelists.xml.gz
-rw-r--r-- 1 root root 6487453 2010-02-18 11:51 other.xml.gz
-rw-r--r-- 1 root root 747714 2010-02-18 11:51 primary.xml.gz
-rw-r--r-- 1 root root 951 2010-02-18 11:51 repomd.xml
Configure yum client
Editing file: /etc/yum.conf Or /etc/yum.repos.d/*
[base-local]
name=RHEL $releasever - $basearch failover
method=priority
baseurl=http://192.168.74.100/yum/
enabled=1
gpgcheck=0
No comments:
Post a Comment