Skip to content

Simplify adding repositories #8

Description

@tukusejssirs

You could add all repositories in some command.

# Current
yum -y install yum-utils epel-release
rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm
rpm -Uvh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm
rpm -Uvh https://yum.postgresql.org/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm

# Proposed
yum -y install yum-utils epel-release http://rpms.remirepo.net/enterprise/remi-release-$(rpm -E %centos).rpm https://repo.zabbix.com/zabbix/4.4/rhel/7/x86_64/zabbix-release-4.4-1.el7.noarch.rpm https://yum.postgresql.org/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm

Moreover, you could enable the latest remi-php version available using the following command.

# Current
yum-config-manager --enable remi-php72

# Proposed
remi_php_latest="$(ls /etc/yum.repos.d/remi-php* | grep -Po 'remi-php[0-9]*' | tail -1)"
yum-config-manager --enable $remi_php_latest

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions