понедельник, 2 февраля 2015 г.

Spacewalk tips

SERVER
Install the Spacewalk repository
rpm -Uvh http://yum.spacewalkproject.org/2.2/RHEL/6/x86_64/spacewalk-repo-2.2-1.el6.noarch.rpm
Install the following required additional repositories
cat > /etc/yum.repos.d/jpackage-generic.repo << EOF
[jpackage-generic]
name=JPackage generic
#baseurl=http://mirrors.dotsrc.org/pub/jpackage/5.0/generic/free/
mirrorlist=http://www.jpackage.org/mirrorlist.php?dist=generic&type=free&release=5.0
enabled=1
gpgcheck=1
gpgkey=http://www.jpackage.org/jpackage.asc
EOF
Install EPEL
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Install spacewalk for postgresql
yum install spacewalk-setup-postgresql
yum install spacewalk-postgresql -y

CLIENT
Install the Spacewalk client yum repository
rpm -Uvh http://yum.spacewalkproject.org/2.2-client/RHEL/6/x86_64/spacewalk-client-repo-2.2-1.el6.noarch.rpm

Install client packages
    yum install rhn-client-tools rhn-check rhn-setup rhnsd m2crypto yum-rhn-plugin

    Register your CentOS or Red Hat Enterprise Linux system to Spacewalk using the activation key you created earlier
     rhnreg_ks --serverUrl=http://spacewalk.core.kran/XMLRPC --activationkey=1-a7f734ebf3911f03e34f834376b34ab4

    yum install osad rhncfg rhncfg-actions rhncfg-client rhncfg-managemen
    Unregister
    rm -f /etc/sysconfig/rhn/systemid
    Oracle spacewalk client
    http://public-yum.oracle.com/repo/OracleLinux/OL6/spacewalk20/client/x86_64/getPackage/spacewalk-client-repo-2.0-3.el6.noarch.rpm

    Redhat spacewalk client
    rpm -ihv http://yum.spacewalkproject.org/2.2-client/RHEL/6/x86_64/spacewalk-client-repo-2.2-1.el6.noarch.rpm

    ##########
    service osad start
    Starting osad: Invalid Cert Error:

    ERROR: unhandled exception occurred: (Expired certificate /usr/share/rhn/RHNS-CA-CERT).

                                                               [FAILED]

    you need to grab your spacewalk server's ssl cert from the pub location (http://<your-server>/pub ) and put it under /usr/share/rhn on your client. Then modify the sslCACert=/usr/share/rhn/RHNS-CA-CERT field in /etc/sysconfig/rhn/up2date file to /usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT.
    https://www.redhat.com/archives/spacewalk-list/2008-July/msg00271.html