Skip to main content

Managing software packages with yum on RHEL 8

1. Register Red Hat Enterprise server for support

To gain tech support and full access to the repositories on Red Hat Network(RHN), you will register your server under your Red Hat account. One Red Hat account can associate with multiple servers, depending on the number of licenses you have.

Your server will need the entitlement/subscription to access the software repositories on RHN. You can subscribe from either purchasing a subscription for RHEL, or Red Hat Developer program and its subscription

Reference: https://developers.redhat.com/articles/getting-red-hat-developer-subscription-what-rhel-users-need-know/

The subscription-manager tool is used to manage the subscription, the common usage includes:

  • Register the server with Red Hat account:
    • subscription-manager register
  • List available subscription
    • subscription-manager list --available
  • Attach a subscription to the server
    • subscription-manager attach --auto
    • This will attach all the subscriptions automatically.
  • Check which subscriptions you are using:
    • subscription-manager --consumed
  • Unregister
    • subscription-manager unregister
Reference: https://linux.die.net/man/8/subscription-manager

/etc/pki stores your certificates. Here are several directories providing specific info:

  • /etc/pki/product: identify Red Hat products on this system
  • /etc/pki/consumer: identify Red Hat account associated with this system
  • /etc/pki/entitlement: identify Red Hat subscription attached to this sytem


2. Specify which repository to use

Sometimes you want to tell your server which repositories to use. Because you want to use non-default software packages, or you are installing Red Hat Enterprise Linux without registering it on RHN.

You need to create a file under /etc/yum.repos.d, ends in .repo. In the file you have:
  • [lable]
  • name=
  • baseurl=
  • mirrorlist=
  • gpgcheck=
  • gpgkey=
You can take a look at the default repository on CentOS:  /etc/yum.repos.d/CentOS-Base.repo to get a feel of its format.

3. Security

GPG (GUN Privacy Guard) key is used to guarantee the package integrity. When you download the repository on the Internet, a GPG key is also stored locally in the early stage and checked against when the download is finished. The key is stored in /etc/pki/rpm-gpg


Comments

Popular posts from this blog

Rib eye with shrimp paste

 6tbsp veg oil 1 1/4 lb bone in rib eye (1 1/2" thick) yu choy or bok choy halved lenghtwise if large 2 scallions, cut into 1'' pieces 2 garlic cloves, crushed 1 lemongrass stalk, tough outer layer removed, chopped 3'' piece ginger sliced 1/2 cup shrimp paste or crab paste 1. meidum high heat, oil grill grate + large cast-iron skillet on grill steak + salt + pepper, + 1tbsp oil rub to coat 2. bok choy in large bowl, drizzle 1tbsp oil over and season with salt. toss 3. grill steak on grate until deeply browned, 2 min per side 4. heat 4tbsp oil in skillet, cook scallions, garlic, lemongrass, giner, stir, until fragrant and starting to brown, about 1 min. Stir in shrimp paste 5. when shrimp mixture is bubbling, transfer steak to skillet. Cook. Turn every few mins, until medium rare, thickest part 125 degree. about 7 mins transfer steak to cutting borad, let rest 10 mins, set skillet with sauce aside 6. Grill boy choy, turning occas. until wilted and charred in spots, ...

Daikon And Grilled Chicken

  1. Cut radishes into quarters if smaller or into ½" pieces if larger + salt, pepper + 6 sliced scallions 2/ 2 Tbsp white wine vinegar + 1 Tbsp. prepared horseradish + 2 tsp. Dijon mustard 1/4 cup extra-virgin olive oil put half of the vinaigrette into the radish mixture 3/ 2 boneless chicken breasts, pound out to about 1/4'' thick. + salt and pepper on both sides 3 Tbsp. extra-virgin olive oil in skillet medium-high heat press down chicken firmly for good contact, 5 mins undisturbed, golden brown on one side turn over, 2 mins on the other side 4/ transfer chicken breast to vinaigrette, let sit 5 minutes Transfer to a clean cutting board cut crosswise into 4 or 5 pieces + radish salad

Automate "Loop Mount" Installation Disk on Linux

 Today I encounter an interesting task about system administration: Configure your system to automatically loop-mount the ISO of the installation disk on the directory /repo. Configure your system to remove this loop-mounted ISO as the only repository that is used for installation. Do not register your system with subscription-manager, and remove all reference to external repositories that may already exist. This is a common issue when you set up the VM: After you finish installing Linux, you want to boot the Linux normally, rather than running into the installation disk again. So when you install Linux, you attach the iso image. Later detach the iso so that Linux can boot normally. This could be easily done from virtualization software such as VirtualBox, VMWare Workstation, thanks to their user-friendly UI. However, this task asks you to do it through automation. In system admin books, this is barely mentioned. But it's still worth digging: in the scenario where you're settin...