On server
side
Ip add =
192.168.0.25
Hostname =
server1
# mount
/dev/cdrom /me dia
# cp –r /media/RHEL/Server
/var/ftp/pub/
# rm –r
/var/ftp/pub/Server/repodata
# createrepo
–g /media/RHEL/Server/repodata/comps-rhel5-server-core.xml /var/ftp/pub/Server/
# cp
/etc/yum.repos.d/rhel.debuginfo.repo /ftp.repo
#edit file like that for
local yum
[server]
name=server
baseurl=file:///var/ftp/pub/Server
enabled=1
gpgcheck=0
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Then run
# yum list
-----------------------------------------------------------
And for client on vsftpd
service and then
Edit the file of client
before editing move all file in yum.repose.d
and move only one file and edit this file like
# mv
/etc/yum.repos.d/* /
#cp /centos-base.repo /etc/yum.repos.d/
#mv /etc/yum.repos.d/centos-base.repo
/etc/yum.repos.d/ftpserver.repo
# vim
/etc/yum.repos.d/ftpserver.repo
[ftpserver]
name=base
baseurl=ftp://192.168.0.25/var/ftp/pub/Server/
enable=1
gpgcheck=0
No comments:
Post a Comment