-->
##########################################################################
1-mkdir /var/www/html/yum
But i installed it before and used rpm query to verify whether the package was already installed or not.
##################################### -->
-->Note that I have disabled other repositories to check my configuration
################################################# -->
second configuration for server which service to provide yum server
we have 3 ways to do this:
with http with web directory , ftp and nfs
#####################################
1- http server with web directory we have 2 method
For the first one just make directory under /var/www/html/any name of dirctory i choose yum -->For the second one used VirtualHost configration if you need to change web directory (see photo)
This simple configuration for the VirtualHost configration
After this configuration we must start httpd services
#service httpd restart
check http server work or not
#######################################################
2- yum server with ftp : -->
then save
after that run service vsftpd restart
and check ftp server work or not
############################################################
3 yum server with nfs (network file system)
It's very easy edit /etc/exports and writ
/var/www/html/yum *(ro)
* for all network
ro = read only
then run service nfs restart
#######################################
For the last configuration for server we will now configure client
for yum client with http used this
edit /etc/yum.repos.d/any file or create any file with .repo extension
and add this
save file
then run
# yum search gcc for check
like this photo
if you see like that that's mean it work good
then run
#yum install gcc
you will see
to install press y to cancel press N
######################################
yum client configuration with ftp
same thing but we will edit /etc/yum.repos.d/any file or create any file with .repo extension
and add this
and run
# yum search gcc
#yum install gcc
to test your configuration
############################################################
the last configuration yum client with nfs
#mount 10.3.14.31:/var/www/html/yum / /opt
edit /etc/fstab to save your mount
# vi /etc/fstab
10.3.14.31:/var/www/html/yum /opt nfs defaults 0 0
save file
#mount -a
edit /etc/yum.repos.d/any file or create any file with .repo extension
and change baseurl section to
baseurl=file:///opt
save
and run
# yum search gcc
#yum install gcc
to test your configuration
Today we will make a small server @ RHEL5; it is called an update server .
We will use yum:
Server Confiuration
2-copy rpm files from cd to /var/www/html/yum
3-install createrepo-0.4.11-3.el5.noarch.rpm
rpm -ivh createrepo-0.4.11-3.el5.noarch.rpm
##################################### -->
Now we will edit /etc/yum.repos.d/any file or create any file with .repo extension
and write these lines
-->Note that I have disabled other repositories to check my configuration
################################################# -->
Now we will create the data base for repositories
with the createrepo command:
#createrepo /var/www/html/yum
second configuration for server which service to provide yum server
we have 3 ways to do this:
with http with web directory , ftp and nfs
#####################################
1- http server with web directory we have 2 method
For the first one just make directory under /var/www/html/any name of dirctory i choose yum -->For the second one used VirtualHost configration if you need to change web directory (see photo)
This simple configuration for the VirtualHost configration
After this configuration we must start httpd services
#service httpd restart
check http server work or not
#######################################################
2- yum server with ftp : -->
We will add a new line @ vsftpd.conf
anon_root=/var/www/html/yum
then save
after that run service vsftpd restart
and check ftp server work or not
############################################################
3 yum server with nfs (network file system)
It's very easy edit /etc/exports and writ
/var/www/html/yum *(ro)
* for all network
ro = read only
then run service nfs restart
#######################################
For the last configuration for server we will now configure client
for yum client with http used this
edit /etc/yum.repos.d/any file or create any file with .repo extension
and add this
save file
then run
# yum search gcc for check
like this photo
if you see like that that's mean it work good
then run
#yum install gcc
you will see
to install press y to cancel press N
######################################
yum client configuration with ftp
same thing but we will edit /etc/yum.repos.d/any file or create any file with .repo extension
and add this
and run
# yum search gcc
#yum install gcc
to test your configuration
############################################################
the last configuration yum client with nfs
#mount 10.3.14.31:/var/www/html/yum / /opt
edit /etc/fstab to save your mount
# vi /etc/fstab
10.3.14.31:/var/www/html/yum /opt nfs defaults 0 0
save file
#mount -a
edit /etc/yum.repos.d/any file or create any file with .repo extension
and change baseurl section to
baseurl=file:///opt
save
and run
# yum search gcc
#yum install gcc
to test your configuration
ذلك من فضل الله علينا وعلى الناس
فما كان من توفيق فمن الله
وما كان من خطا فمنى ومن الشيطان
فما كان من توفيق فمن الله
وما كان من خطا فمنى ومن الشيطان