Working with repos Flashcards
1
Q
Install local repo
A
mkdir /repo vim /etc/fstab /home/user/Centos.iso /repo iso9660 -o loop,ro 0 0 \:wq vim /etc/yum.repos.d/basa.repo [basa] name=Base Repo on local host baseurl=file:///repo/BaseOS/ gpgcheck=0 enabled=1 \:wq similarly vim /etc/yu.repos.d/app.repo: [app] name=AppStream Repo on local host baseurl=file:///repo/AppStream/ gpgcheck=0 enabled=1 yum repolist=> basa Base Repo on local host app AppStream Repo on local host
2
Q
List all known repos
List enabled repos
List disabled repos
A
yum repolist –all
yum repolist –enabled / yum repolist (without params)
yum repolist –disabled
3
Q
Disable repo
A
- vim /etc/yum.repos.d/basa.repo
enabled=0 - yum-config-manager –disable basa.repo
4
Q
Add new remote repository to be seen by yum repolist
A
yum-config-manager –add-repo=http://fedoreproject.org/pub/epel/7/x86_64/
Ths will create respective repo file in /etc/yum.repos.d/