1) Make a directory where all our RHEL5 dvd files will be stored. mkdir -p /var/ftp/pub/repo

2) Insert the RHEL5 DVD and enter the following command to mount the drive to a mount point. mount /dev/cdrom /mnt

3) Check the contents of the DVD. ls -l /mnt
4) Copy all the files of the DVD to the folder created earlier. cp -ivr /mnt/* /var/ftp/pub/repo/

5) unmount the DVD umount /mnt

6) Install the createrepo software for creating repository's. (be careful the s in "server" is in capital letters like "Server" ). The 'i' in rpm means interactive, 'v' means verbose & 'h' means hash. rpm -ivh /var/ftp/pub/repo/Server/createrepo-0.4.4.2.fc6.noarchive.rpm

7) Now we will create repository's of two folders Server and VT. createrepo -v /var/ftp/pub/repo/Server in case error relating to '.olddata' enter the following command rm -rf /var/ftp/pub/repo/Server/.olddata/ rm means remove. -rf means remove forcefully. then, createrepo -v /var/ftp/pub/repo/VT


8) Create the configuration file using vi editor vi /etc/yum.repos.d/server.repo insert the following parameters in it:- [Server] name=Serverrepo baseurl=file:///var/ftp/pub/repo/Server enabled=1 gpgcheck=0 gpgenabled=0 [VT] name=VTrepo baseurl=file:///var/ftp/pub/repo/VT enabled=1 gpgcheck=0 gpgenabled=0


9) with the following command yum will list all the softwares installed and not-installed on the machine. yum list all

10) To check whether a software is installed or not use the following example. yum list vsftp*
11) To install it use yum install vsftp* press y for confirmation.
12) To remove it use yum remove vsftp* press y for confirmation.
0 comments:
Post a Comment