SUSE Manager/Managing Oracle Linux

From MicroFocusInternationalWiki
Jump to: navigation, search

SUSE Manager Main Page

Native Oracle Linux (Traditional RHN stack)

1. Install spacewalk-utils on your SUMA server:

zypper in spacewalk-utils

Run the spacewalk-common-channels script to add base channel, Spacewalk client, and others as desired. Oracle includes all updates in their public yum

spacewalk-common-channels -v -a x86_64 oraclelinux7
spacewalk-common-channels -v -a x86_64 oraclelinux7-uek-r4
spacewalk-common-channels -v -a x86_64 spacewalk24-client-oraclelinux7

Manually sync the channels

spacewalk-repo-sync --channel=oraclelinux7-x86_64
spacewalk-repo-sync --channel=oraclelinux7-x86_64-uek-r4
spacewalk-repo-sync --channel=spacewalk24-client-oraclelinux7-x86_64

Use the Manage Software Channels->channel name->Repositories->Sync web interface to schedule regular sync if desired.

2. Be sure to copy any and all relevant GPG keys to /srv/www/htdocs/pub. This includes the Oracle key, Spacewalk key, SUSE keys and the Red Hat keys. By copying them there, you can reference them in a comma-delimited list in your bootstrap script (see example below)

 Oracle 7 key:
 Spacewalk key:
 Red Hat keys:

3. Create the ol7 bootstrap repository (we need jabberpy to install osad so pull it from the Oracle spacewalk repo)

mkdir -p /srv/www/htdocs/pub/repositories/ol7
cd /srv/www/htdocs/pub/repositories/ol7
wget -r -nH --cut-dirs=5 --no-parent --reject="index.html*"
createrepo .

4. Create a repo file "ol7-client.repo" in /srv/www/htdocs/pub/repositories/ol7


5. Create an activation key for the channel e.g. 1-ol7-x64

6. Create/edit a bootstrap script to correctly reflect the following:

# NOTE: ACTIVATION_KEYS *must* be used to bootstrap a client machine.



## Added to copy the repo file to the client so the prerequisites are in place for registration
curl -Sks http://<servername.fqdn>/pub/repositories/ol7/ol7-client.repo >> /etc/yum.repos.d/ol7-client.repo

yum clean all
# Install the required prerequisites
yum -y install yum-rhn-plugin rhn-setup osad jabberpy

Add this above "if [ $ALLOW_CONFIG_ACTIONS -eq 1 ] ; then"

## Will install rhncfg-actions, python-selinux, rhncfg and rhncfg-client to allow config actions and remote commands
if [ ! -x "/usr/bin/rhn-actions-control" ] ; then
        yum -y install rhncfg-actions

Add these lines to the very bottom of your script, (just before echo “-bootstrap complete -” )

# clean up and run the rhnsd & osad services for real time updating
mv /etc/yum.repos.d/ol7-* /root/
yum clean all
chkconfig rhnsd on
chkconfig osad on
service rhnsd restart
/bin/systemctl restart  osad.service

7. Register the clients using the bootstrap script

curl -Sks https://<servername.fqdn>/pub/bootstrap/ | /bin/bash