Jephe Wu - http://linuxtechres.blogspot.com
Objective: summarize a few ways to register RHEL5 system with RHN
Environment: RHEL5, Squid proxy, RHN
Steps:
1. Configure /etc/sysconfig/rhn/up2date first
make sure the following lines are there.
serverURL=https://xmlrpc.rhn.redhat.com/XMLRPC
sslCACert=/usr/share/rhn/RHNS-CA-CERT
# ls -l /usr/share/rhn/RHNS-CA-CERT [file should be present]
If you are using Squid http proxy, configure this:
enableProxy=1
httpProxy=ip/name:port
proxyUser=
proxyPasword=
2. how to identify it's Oracle Linux or RHEL
a. cat /usr/share/rhn/RHNS-CA-CERT to see it's Oracle or Redhat
b. more /etc/issue.net or more /etc/issue
c. rpm -qi kernel to check Vendor part and Build Host
3. registration
3.1 - interactive way - rhn_register (configure proxy in step 1 first before use, if you are using proxy. or use
rhn_register --help to specify proxy settings)
If you have already registered before and /etc/sysconfig/rhn/systemid
exists on the system, rhn_register first asks if you are sure that
you would like to register in this way.
3.2 - non-interactive way - rhnreg_ks (kickstart style)
activationkey method (https://access.redhat.com/kb/docs/DOC-2395, need management entitlement)
e.g. rhnreg_ks --profilename=jephe --activationkey=1-2b48feedf5b5a0e0609ae028d9275c93
username/password method (for security reason, you need to clear history commands, use history -d or history -c and clear commands)
e.g. rhnreg_ks --profilename "jephe" --username "username" --password "password" [--force]
4. references
a. RHN FAQ - https://access.redhat.com/kb/docs/DOC-16303
b. How to register with RHN - https://access.redhat.com/kb/docs/DOC-11217
c. rhnreg_ks command: - https://access.redhat.com/kb/docs/DOC-2395
d. using rhn_register, up2date or yum to access RHN, RHN Satellite or RHN proxy via an HTTP proxy
- https://access.redhat.com/kb/docs/DOC-9826
e. activationkey (https://access.redhat.com/kb/docs/DOC-2395, need management entitlement)
f. difference between all kinds of entitlements: https://access.redhat.com/kb/docs/DOC-11277