In order to install subscription-manager please do the following:
Enable the subscription-manager copr repo for your release:
$ wget https://copr.fedoraproject.org/coprs/dgoodwin/subscription-manager/repo/fedora-22/dgoodwin-subscription-manager-fedora-22.repo -O /etc/yum.repos.d/dgoodwin-subscription-manager-fedora-22.repo
$ wget https://copr.fedoraproject.org/coprs/dgoodwin/subscription-manager/repo/fedora-23/dgoodwin-subscription-manager-fedora-23.repo -O /etc/yum.repos.d/dgoodwin-subscription-manager-fedora-23.repo
EPEL for Centos 6:
$ wget https://copr.fedoraproject.org/coprs/dgoodwin/subscription-manager/repo/epel-6/dgoodwin-subscription-manager-epel-6.repo -O /etc/yum.repos.d/dgoodwin-subscription-manager-epel-6.repo
EPEL for Centos 7:
$ wget https://copr.fedoraproject.org/coprs/dgoodwin/subscription-manager/repo/epel-7/dgoodwin-subscription-manager-epel-7.repo -O /etc/yum.repos.d/dgoodwin-subscription-manager-epel-7.repo
This repo provides subscription-manager as well as python-rhsm packages.
$ yum install subscription-manager
Optionally install the subscription-manager-gui
$ yum install subscription-manager-gui
The subscription-manager code base is here.
The project is built for the latest versions of Fedorai (and submitted to Fedora Updates), EPEL for Centos 6 and EPEL for Centos 7 here.
The process below is for Fedora 24 and RHEL/CentOS 6/7. Other distributions may require some adaptation to the steps below.
You need to install following RPM packages to build binaries of subscription-manager:
$ dnf install git gcc make glib2-devel dbus-glib-devel libnotify-devel GConf gtk3-devel intltool python-devel openssl-devel redhat-rpm-config m2crypto librsvg subscription-manager subscription-manager-gui
$ yum install git gcc make glib2-devel dbus-glib-devel libnotify-devel GConf2 GConf2-devel gtk3-devel intltool python-devel openssl-devel subscription-manager subscription-manager-gui
Note: when you are trying to compile subscription-manager on RHEL7, then package
GConf2-develis not available in “default” repository
rhel-7-server-rpms. You have to enable another optional repository:
$ subscription-manager repos --enable=rhel-7-server-optional-rpms
When this optional repository is enabled on RHEL7, then you can install
$ yum install GConf2-devel
$ yum install git gcc make glib-devel dbus-glib-devel libnotify-devel GConf2-devel gtk2-devel intltool python-devel openssl-devel subscription-manager subscription-manager-gui
Note: The packages
in the list for convenience to pull in requisite dependencies.
Get the source code of subscription-manager from GitHub:
$ git clone git://github.com/candlepin/subscription-manager.git
Go to the source directory of python-rhsm and build the custom C extensions
$ python ./setup.py build_ext --inplace
If you want to install python-rhsm (Fedora or CentOS) onto the system:
$ sudo python ./setup install
Note: Installing the upstream version on a CentOS/RHEL system is not recommended as it will overwrite the existing installation of python-rhsm.
Build and install subscription-manager itself:
$ cd subscription-manager $ make
Again, you probably don’t want to overwrite your installation of subscription-manager at RHEL 6/7. Execute upstream subscription-manager as follows:
$ export PYTHONPATH=./src/:./python-rhsm/src/ $ # Pick one of the lines below: $ export SUBMAN_GTK_VERSION=3 # Fedora and RHEL7 $ export SUBMAN_GTK_VERSION=2 # RHEL 6
To test your local installation of subscription-manager type:
$ sudo ./bin/subscription-manager version $ sudo ./bin/subscription-manager-gui
If you want to install subscription-manager to the system (Fedora or CentOS):
$ sudo make install