XX Yum Server Client Configuration By - Shirish Shukla XX
1> yum server Setup :
==================
>> Install Linux with > 6+ gb of /var partition
# lokkit and do the following
Security level : Disabled
SElinux : Disabled
Reboot the system (To Avoide any obstacle)
# mount /dev/dvd /mnt (mount your Linux dvd )
# cd /mnt
# You will see dir called “Server”
# Go to “Server” dir
# You will see all RPMs (3842)
# rpm -ivh vsftpd* (Do this in “Server” Dir)
# cp -r /mnt/* /var/ftp/pub/ (Do this outside the “Server” Dir)
# rpm -ivh createrepo* (Do this in “Server” Dir)
# createrepo -v /var/ftp/pub/Server (Will show lots of files)
# service vsftpd restart
# chkconfig vsftpd on
# iptables -F
# service iptables save
2> Server yum-client :
===================
On Server side it’s optional, but in future it’ s good for you to install any package on server
# cd /etc/yum.repos.d/
# cp rhel-debuginfo.repo vadapav1.repo
# Now open vadapav1.repo and you will see this :
[rhel-debuginfo]
name=Red Hat Enterprise Linux $releasever - $basearch – Debug baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/$basearch/Debuginfo/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Change the above to the following or make a copy of above and do below changes
[vadapav1]
name=Red hat Enterprise Linux $releasever - $basearch - Debug
baseurl=ftp://192.168.0.2>>>/pub/Server
enabled=1 ----> by default it is 0 --set to 1
gpgcheck=0 ----> by default it is 1 --set to 0
[Delete or comment last line gpgkey=file…… ]
# yum update list
# yum info gftp*
(If above two commands don't work, it means you have done something wrong in above two setups.)
3> Yum Client :
=============
Finally, configure yum server for the CLIENT.
>>>a. Go to this dir:
# cd /etc/yum.repos.d/
>>>b. Make a copy of this only file in this dir:
# cp rhel-debuginfo.repo station11.repo (any filename with .repo extention)
>>>c. Open that file:
# vi station11.repo
>>>d. Do the following changes so finally station11.repo file looks like this:
[rhel-debuginfo] change to [station11]
name=Red hat Enterprise Linux $releasever - $basearch - Debug---> Given DNT
Change this line to the following:
baseurl=ftp://192.168.0.2>>>/pub/Server
enabled=0----> change to 1
gpgcheck=1---> change to 0
[Delete or comment gpgkey(i.e, delete the last line)]
>>>e. To Check whether the yum server for the Client is OK, Do the follow command:
# yum update list
# yum info gftp*
4> Yum important Commands :
===========================
>> install packages:
# yum -y install dhcpd*
>> Remove packages:
# yum remove dhcpd*
>> Package info:
# yum info dhcpd*
>> To know whether package installed or not:
# yum list dhcpd*
>> To clean yum server catch:
# yum clean all
>> Patch up system by applying all updates
# yum update
>> To update yum server list
# yum update list
>>Check for and update specified packages
# yum update package-name
>>Search for packages by name
# yum list package-name*
>>Display the list of available packages
# yum list all
>>Check for and update specified packages
# yum update package-name
>>Search for packages by name
# yum list package-name*
>>Search for packages by name
# yum list package-name*
>>Lists all the packages available to be installed
# yum list installed
>>yum check-update yum list updates but returns an exit code of 100 if there are updates available
# yum check-update
>>Display what package provides the file
# yum whatprovides Filename
-->You can use same command to list packages that satisfy dependencies:
# yum whatprovides dep-1 dep-1
.... See man yum for more info
# man yum
x x x x xx x x x xx x x x xx x x x xx x x x xx x x x xx x x x xx x x x xx x x
yami much helpfull shuklaji
ReplyDelete-Simi
good yaar thanks
ReplyDeletemount /dev/cdrom /mnt
ReplyDeletecd /mnt/Server
rpm -ivh createrepo*
rpm -ivh vsftpd*
cp -rvf /mnt/* /var/ftp/pub
cp /var/ftp/pub/Server/repodata/comps* /var/ftp/pub/Server
cp /var/ftp/pub/VT/repodata/comps* /var/ftp/pub/VT
cd /var/ftp/pub/Server
rm -rf /var/ftp/pub/Sever/.olddata
rm -rf /var/ftp/pub/VT/.olddata
createrepo -vg comps-rhel5-server-core.xml /var/ftp/pub/Server
createrepo -vg comps-rhel5-vt.xml /var/ftp/pub/VT
cd /etc/yum.repos.d/
if [ -f yumserver.repo ]
then
rm -f yumserver.repo
fi
cat >> yumserver.repo <<-EOA
[Server]
name=YumServer
baseurl=file:///var/ftp/pub/Server
gpgcheck=0
[VT]
name=VTServer
baseurl=file:///var/ftp/pub/VT
gpgcheck=0
EOA
only one script