1)install httpd
yum install httpd
2) start httpd service
start service httpd
3)config file
/etc/httpd/conf/httpd.conf
care the line
DocumentRoot"/var/www/html" which is the config root to start http
4)verify the http work or not
http://localhost:80 or http:httpserverip:80
if the site can't be access fromother client , please trun off the firewall with
service iptables stop
5) install createrepo
yum install createrepo
6) create the dir and copy the rpmsto the corresponding dir which you create just now
mkdir -p /var/www/html/localYum
cp rpms-pakages /var/www/html/localYum
7)create respon index and info file
createrepo /var/www/html/localYum
8) in your client on which you wantto use the local yum you just create
vim /etc/yum.repos.d/rhel-source.repo
to add the line
[CDGlocal]
name=RHEL
baseurl=http://10.200.114.144//localYum
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
okay ,it's done ,you can yum cleanand yum update
yun install pkgs which the local yumrespon own
if you have any doubt you can referthe below reference which is detail for the process and how to fix the errorsyou may meet .
http://my.oschina.net/u/1461927/blog/372147