Linux: Registering Server with Satellite
Use the following procedure to register (or re-register) a RedHat (v6 or v7) with our corporate Satellite server (ServerName)
Open a SSH (Putty) Terminal or VMWare console to the VM.
*NOTE: If you use Putty you can copy and paste the below commands into the shell for quick and easy setup.
###For a brand new server, Restart the virt-who service on ServerName###
* systemctl stop virt-who * virt-who –one-shot * systemctl start virt-who
###CLEAN THE SUBSCRIPTION-MANAGER CACHE###
subscription-manager clean
###SUBSCRIPTION MANAGER SETUP###
rpm -ivh http://ServerName/pub/katello-ca-consumer-latest.noarch.rpm
###REGISTER WITH SATELLITE### -DEV-
subscription-manager register –org=”companyname” –activationkey=”RHEL7Dev”subscription-manager register –org=”companyname” –activationkey=”RHELD6ev”
-QA-
subscription-manager register –org=”companyname” –activationkey=”RHEL7QA”subscription-manager register –org=”companyname” –activationkey=”RHEL6QA”
-PRD-
subscription-manager register –org=”companyname” –activationkey=”RHEL7PRD”subscription-manager register –org=”companyname” –activationkey=”RHEL6PRD”
###SUBSRIBE###
subscription-manager subscribe –auto
###INSTALL COTELLO AND PUPPET AGENT###
yum install katello-agent puppet -y
###INSTALL PUPPET AGENT###
puppet agent -t –server servername.domain.com
### APPEND SERVER NAME TO puppet.conf### RHEL 7
* echo “server = servername.domain.com” >> /etc/puppet/puppet.conf;systemctl enable puppet;systemctl restart puppet;systemctl status puppet
RHEL 6
* echo “server = servername.domain.com” >> /etc/puppet/puppet.conf;chkconfig puppet on;service puppet restart;service puppet status
###RUN YUM UPDATE###
* yum update -y
RHEL7:
systemctl enable puppetsystemctl start puppetsystemctl status puppet (should see green output)
RHEL6:
chkconfig puppet onservice puppet startservice puppet status
We also need to ensure that the /etc/puppet/puppet.conf file has this as it’s last line (in the “Agent” section:
server = servername.domain.com
###REMOTE EXECUTION SSH KEY SETUP###
Run this command from the root shell on the satellite:
* ssh-copy-id -i ~foreman-proxy/.ssh/id_rsa_foreman_proxy.pub root@<name-of-host>
* ###IF ERRORS DURING YUM INSTALL###yum clean allrm -rf /var/cache/yum* Then start from the beginning