Professional Documents
Culture Documents
We required installing packages, we do it with rpm command but if the rpm package
has lots of dependencies it becomes difficult to install if rpm’s are placed in
more than one location.
The YUM application can call upon several repositories for dependency resolution,
fetch the rpm’s and install the headed packages.
BY yum even your network clients can install packages from the yum server via
ftp ,http services.
Now we will show them to configure the yum server and to install the packages .
/var/ftp/pub:
Why?
When you start ftp service /var/ftp/pub directory is shared for anonymous (public)
login. So it’s becomes quite easier for clients to install the packages from this
location.
Requirement:
Steps:
1: First make a partition of atleast 5.0 GB and make mount point at /var/ftp/pub.
#mkdir –p /var/ftp/pub and then mount this on the partition which you have made.
#cp –av * /var/ftp/pub ( this will start copying the (cd/dvd) in the given
location).
First go to the location and install the “vsftpd “ and “createrepo” packages .
#cd /var/ftp/pub
#cd Server
#vi /etc/yum.repos.d/server.repo
[base]
name=Server1 Repository
baseurl=ftp://192.168.0.254/pub/Server
enabled=1
gpgcheck=0
[VT]
name=Server1 Repository
baseurl=ftp://192.168.0.254/pub/VT
enabled=1
gpgcheck=0
make the above entries in the file and save the file.
The third line is important because it show the path of the repository from where u
will get the packages. And the Ip address is the server ip means the machine which
has the repository, forth line is enabled=1 means this file is there existing. And
the last line ie gpgcheck =0 means if it is 1 then you get the certificate numbers
from redhat if you are giving the installation number at the time of installation
so by default keep it 0 and if u do enabled=0 means the file is no more exist for
the other users on the network.
Now the same file should be made on the clients machine with same syntax.
#createrepo -v /var/ftp/pub/
After Doing this, go back to your command prompt, now type the following command on
the prompt:
By this command it will make a repository of your Server packages but for the first
time you will get an error of .olddata file so remove this file and again make the
repository.
#rm –rf /var/ftp/pub/Server/.olddata (remove this file and after removing run the
below command),
By this command it will make a repository of your VT packages but for the first
time you will get an error of .olddata file so remove this file and again make the
repository.
#rm –rf /var/ftp/pub/VT/.olddata (remove this file and after removing run the
below command,
Now to check with your YUM working fine check with the ftp service
#ftp 192.168.0.254
After login you will see the pub directory but you cant go beyond pub because now
selinux will block from further access,so to allow access give the following
command.
#restorecon –R /var/ftp/pub.
#yum clean all (to check status of yum)then again do the ftp connection and check:
This will allow the further access after ftp connection close the ftp session.
This command will check for the rpm package is there or not in the repository, and
also checks the package is installed or not.
Similarly you can install packages form different machines also with the above
commands only thing is that the file of