YUM Configuration step by step process :
1) Firstly, mount CentOS iso on some partition say /mnt.
2) Command : mount -o loop CentOS.iso /mnt/
3) mkdir -p /var/warehouse/centos
4) Copy everything from /mnt/ to above directory.
5) Command : cp -rv /mnt/* /var/warehouse/centos/
6) umount /mnt/
7) Next is to check whether you have createrepo package installed on not ?
8) Command : rpm -qa | grep createrepo
9) If not, install it from the centos directory, where you have placed your packages.
10) Command : rpm -ivh createrepo-0.4....rpm
11) Now create a database for your repo by
12) createrepo --database /var/warehouse/centos/CentOS/
where CentOS is the directory where all the packages are placed.
13) Now create your own repo file.
14) vi /etc/yum.repos.d/centos.repo
[centos]
name = centos
baseurl = file:///var/warehouse/centos
gpgcheck = 0
15) yum repolist : This command will show you list of packages installed in any repo that is present.
16) Now, you can search any package using
Command : yum search kdebase
17) Command : yum list installed OR yum grouplist
will show you packages installed and group packages that are installed and available consecutively.
18) This way you can create your own repo and add packages into it that are not present in default packages list.
1) Firstly, mount CentOS iso on some partition say /mnt.
2) Command : mount -o loop CentOS.iso /mnt/
3) mkdir -p /var/warehouse/centos
4) Copy everything from /mnt/ to above directory.
5) Command : cp -rv /mnt/* /var/warehouse/centos/
6) umount /mnt/
7) Next is to check whether you have createrepo package installed on not ?
8) Command : rpm -qa | grep createrepo
9) If not, install it from the centos directory, where you have placed your packages.
10) Command : rpm -ivh createrepo-0.4....rpm
11) Now create a database for your repo by
12) createrepo --database /var/warehouse/centos/CentOS/
where CentOS is the directory where all the packages are placed.
13) Now create your own repo file.
14) vi /etc/yum.repos.d/centos.repo
[centos]
name = centos
baseurl = file:///var/warehouse/centos
gpgcheck = 0
15) yum repolist : This command will show you list of packages installed in any repo that is present.
16) Now, you can search any package using
Command : yum search kdebase
17) Command : yum list installed OR yum grouplist
will show you packages installed and group packages that are installed and available consecutively.
18) This way you can create your own repo and add packages into it that are not present in default packages list.
No comments:
Post a Comment