RHEL: Difference between revisions
iwu |
Check if there are any disabled repositories |
||
Line 31: | Line 31: | ||
<source lang="bash"> | <source lang="bash"> | ||
$ sudo yum install nginx | $ sudo yum install nginx | ||
</source> | |||
= Useful commands = | |||
== Package management == | |||
=== Check if there are any disabled repositories === | |||
<source lang="console"> | |||
$ egrep -Hi '(^\[|^enabled)' /etc/yum.repos.d/* | |||
/etc/yum.repos.d/epel.repo.rpmsave:[epel] | |||
/etc/yum.repos.d/epel.repo.rpmsave:enabled=1 | |||
/etc/yum.repos.d/epel.repo.rpmsave:[epel-debuginfo] | |||
/etc/yum.repos.d/epel.repo.rpmsave:enabled=0 | |||
/etc/yum.repos.d/epel.repo.rpmsave:[epel-source] | |||
/etc/yum.repos.d/epel.repo.rpmsave:enabled=0 | |||
/etc/yum.repos.d/nginx.repo:[nginx-stable] | |||
/etc/yum.repos.d/nginx.repo:enabled=1 | |||
/etc/yum.repos.d/nginx.repo:[nginx-mainline] | |||
/etc/yum.repos.d/nginx.repo:enabled=1 | |||
/etc/yum.repos.d/redhat.repo:[rhel-7-server-fastrack-rpms] | |||
/etc/yum.repos.d/redhat.repo:enabled_metadata = 0 | |||
/etc/yum.repos.d/redhat.repo:enabled = 0 | |||
/etc/yum.repos.d/redhat.repo:[rhel-7-server-optional-fastrack-rpms] | |||
/etc/yum.repos.d/redhat.repo:enabled_metadata = 0 | |||
/etc/yum.repos.d/redhat.repo:enabled = 0 | |||
/etc/yum.repos.d/redhat.repo:[rhel-7-server-satellite-tools-6.8-rpms] | |||
/etc/yum.repos.d/redhat.repo:enabled_metadata = 0 | |||
/etc/yum.repos.d/redhat.repo:enabled = 0 | |||
... | |||
</source> | </source> |
Revision as of 11:08, 2 November 2021
Setting up from scratch on a VM at work
Web services
$ sudo yum install yum-utils
Create /etc/yum.repos.d/nginx.repo
[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true
[nginx-mainline]
name=nginx mainline repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true
Install nginx
$ sudo yum install nginx
Useful commands
Package management
Check if there are any disabled repositories
$ egrep -Hi '(^\[|^enabled)' /etc/yum.repos.d/*
/etc/yum.repos.d/epel.repo.rpmsave:[epel]
/etc/yum.repos.d/epel.repo.rpmsave:enabled=1
/etc/yum.repos.d/epel.repo.rpmsave:[epel-debuginfo]
/etc/yum.repos.d/epel.repo.rpmsave:enabled=0
/etc/yum.repos.d/epel.repo.rpmsave:[epel-source]
/etc/yum.repos.d/epel.repo.rpmsave:enabled=0
/etc/yum.repos.d/nginx.repo:[nginx-stable]
/etc/yum.repos.d/nginx.repo:enabled=1
/etc/yum.repos.d/nginx.repo:[nginx-mainline]
/etc/yum.repos.d/nginx.repo:enabled=1
/etc/yum.repos.d/redhat.repo:[rhel-7-server-fastrack-rpms]
/etc/yum.repos.d/redhat.repo:enabled_metadata = 0
/etc/yum.repos.d/redhat.repo:enabled = 0
/etc/yum.repos.d/redhat.repo:[rhel-7-server-optional-fastrack-rpms]
/etc/yum.repos.d/redhat.repo:enabled_metadata = 0
/etc/yum.repos.d/redhat.repo:enabled = 0
/etc/yum.repos.d/redhat.repo:[rhel-7-server-satellite-tools-6.8-rpms]
/etc/yum.repos.d/redhat.repo:enabled_metadata = 0
/etc/yum.repos.d/redhat.repo:enabled = 0
...