3

This is a similar question to: How to enable PowerTools repository in CentOS 8?

I am trying to to setup a headless web server on my EC2 AWS running on RHEL 8.2. As it is a headless server with no GUI, I just need to the firefox browser to do some web configurations. With that said, on on the client side, I am using Putty to SSH to the server remotely and Xming to display the browser. I think PowerTools is needed in order to install xorg-x11-apps in RHEL 8.2 in my case to get the display installed in my VM so that I can run my firefox remotely via Putty SSH.

On the Side note:

(On Server Side)

  1. Installed firefox and prerequisite packages
  2. Installed xauth & xorg-x11*
  3. Configured /etc/ssh/ssh_config (FowardX11 yes, FowardX11Trusted yes)
  4. Configured /etc/ssh/sshd_config (X11Forwarding yes)
  5. export DISPLAY=ip:0.0

(On Client Side - PuTTy)

  1. Installed and configured XMing
  2. SSH with X Forwarding via Putty (With X11Forwarding enabled & X Display Location to :0.0)

I installed epel:

$ yum install dnf-plugins-core
$ dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
$ yum install epel-release

But when I tried to enable PowerTools, I received the following error:

$ dnf config-manager --set-enabled PowerTools
Error: Unknown repo: 'PowerTools'

When I checked the repo list, no PowerTools is installed:

$ yum repolist
repo id                        repo name
epel                           Extra Packages for Enterprise Linux 8 - x86_64
epel-modular                   Extra Packages for Enterprise Linux Modular 8 - x86_64
rhel-8-appstream-rhui-rpms     Red Hat Enterprise Linux 8 for x86_64 - AppStream from RHUI (RPMs)
rhel-8-baseos-rhui-rpms        Red Hat Enterprise Linux 8 for x86_64 - BaseOS from RHUI (RPMs)
rhui-client-config-server-8    Red Hat Update Infrastructure 3 Client Configuration Server 8

How do I go around this so that I can enable PowerTools so that I can run the dnf config-manager --set-enabled PowerTools command?

Many thanks!

user7610
  • 214
  • 1
  • 9
Noose780
  • 33
  • 1
  • 1
  • 4

3 Answers3

3

CentOS and RHEL are actually different, despite one being "clone" of the other.

The canonical name for the repository in question is actually CodeReady Linux Builder. However, it is trademarked, and as such, in CentOS it has a different name - PowerTools.

Since you are using RHEL, you should enable CodeReady Linux Builder repository:

subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms

According to this AWS doc, it can enabled with:

sudo dnf config-manager --set-enabled codeready-builder-for-rhel-8-rhui-rpms
Danila Vershinin
  • 5,286
  • 5
  • 17
  • 21
3

If you are using the ubi8 container image

FROM registry.access.redhat.com/ubi8/ubi:latest

and you don't have RHEL subscription to enable CodeReady Builder, then your only option is to use the CentOS PowerTools, even though you are on RHEL. In that case

RUN dnf -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs install \
      http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/centos-gpg-keys-8-6.el8.noarch.rpm \
      http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/centos-stream-repos-8-6.el8.noarch.rpm \
 && dnf -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs install epel-release \
 && dnf config-manager --set-enabled powertools

As you can see, installing these repos is essentially turning your system into a CentOS. Given that CentOS Stream is upstream of RHEL, it might make better sense to instead pick packages from a downstream distro such as Alma, Rocky, etc.

Alternatively, you can install dependencies by running dnf and then install the needed package from PowerTools from a direct URL. If the PowerTools package does not have other PowerTools dependencies, this is workable. For example

RUN curl -Lo ninja.rpm https://cbs.centos.org/kojifiles/packages/ninja-build/1.10.2/2.el8/x86_64/ninja-build-1.10.2-2.el8.x86_64.rpm
RUN microdnf -y --setopt=install_weak_deps=0 --setopt=tsflags=nodocs install \
    emacs-filesystem \
    python3 \
    vim-filesystem
RUN rpm -iv ninja.rpm
user7610
  • 214
  • 1
  • 9
  • I have a question, how do you find out the URL for a certain package? For example I am trying to install `libev-devel`. – RL_Pug Apr 12 '23 at 16:52
  • 1
    You could drop the package-specific suffix from the url and you'd get a big page with a listing of all packages, that's at https://cbs.centos.org/kojifiles/packages/ Alternatively you can search the CentOS Koji instance at https://cbs.centos.org/koji/, when writing query use percent signs as wildcards, such as `%ninja%`, and you should find build page with the link, e.g. https://cbs.centos.org/koji/buildinfo?buildID=42958 – user7610 Apr 12 '23 at 20:54
-1

subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms

yum repolist Updating Subscription Management repositories. repo id repo name codeready-builder-for-rhel-8-x86_64-rpms Red Hat CodeReady Linux Builder for RHEL 8 x86_64 (RPMs) copr:copr.fedorainfracloud.org:group_cloud-init:el-stable Copr repo for el-stable owned by @cloud-init docker-ce-nightly Docker CE Nightly - x86_64 docker-ce-stable Docker CE Stable - x86_64 docker-ce-test Docker CE Test - x86_64 epel Extra Packages for Enterprise Linux 8 - x86_64 epel-modular Extra Packages for Enterprise Linux Modular 8 - x86_64 ol7_UEKR5 Latest Unbreakable Enterprise Kernel Release 5 for Oracle Linux 8 (x86_64) ol7_latest Oracle Linux 8 Latest (x86_64) ol7_oracle_instantclient Oracle Instant Client for Oracle Linux 8 (x86_64) rhel-8-for-x86_64-appstream-rpms Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs) rhel-8-for-x86_64-baseos-rpms Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)

yum install perl-IPC-Run Now your able to install it