Spacewalk - установка, настройка

СУБД Oracle

Check if you have swap > 1GB because Oracle XE RPM will need it. You can create temporary one (or grow existing) with

 dd if=/dev/zero of=/var/swapfile bs=1M count=1100
 mkswap /var/swapfile
 swapon /var/swapfile

Создадим пользователя oracle

 /usr/sbin/groupadd -r dba
 /usr/sbin/useradd -r -M -g dba -d /usr/lib/oracle/xe -s /bin/bash oracle

Скачаем и установим необходимые пакеты с оф. сайта oracle.com

 rpm -Uvh oracle-xe-univ-10.2.0.1-1.0.i386.rpm
 rpm -Uvh oracle-instantclient-basic-10.2.0.4-1.*.rpm 
 rpm -Uvh oracle-instantclient-sqlplus-10.2.0.4-1.*.rpm

Установим необходимые пакеты

 yum install oracle-lib-compat
 yum install oracle-xe-selinux oracle-instantclient-selinux oracle-instantclient-sqlplus-selinux

Сконфигурируем СУБД Oracle

 /etc/init.d/oracle-xe configure

Here are some sane values for the configure:

 HTTP port for Oracle Application Express: 9055
 Database listener port: 1521
 Password for SYS/SYSTEM: <password>
 Start at boot: y

Define the service name in /etc/tnsnames.ora

 cat >> /etc/tnsnames.ora << 'EOF'
 XE =
     (DESCRIPTION =
        (ADDRESS_LIST =
           (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
        )
        (CONNECT_DATA =
           (SERVICE_NAME = xe)
        )
     )
 EOF
 restorecon -v /etc/tnsnames.ora

Create the spacewalk database user

 sqlplus 'sys@xe as sysdba'
 SQL> create user spacewalk identified by password default tablespace users;
 SQL> grant dba to spacewalk;
 SQL> quit  

Additional Oracle configuration

 sqlplus spacewalk/password@xe
 SQL> alter system set processes = 400 scope=spfile; 
 SQL> alter system set "_optimizer_filter_pred_pullup"=false scope=spfile; 
 SQL> alter system set "_optimizer_cost_based_transformation"=off scope=spfile; 
 SQL> quit
 /sbin/service oracle-xe restart

Log Oracle

 tail -f /usr/lib/oracle/xe/app/oracle/admin/XE/bdump/alert_XE.log

Spacewalk

Install Spacewalk client (на сервере подключить репозитарий клиента)

rhel/centos 5:

 rpm -ivh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
 rpm -ihv http://spacewalk.redhat.com/yum/1.5-client/RHEL/5/`uname -i`/spacewalk-client-repo-1.5-1.el5.noarch.rpm

rhel/centos 6:

 rpm -ivh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm
 rpm -ihv http://spacewalk.redhat.com/yum/1.5-client/RHEL/6/`uname -i`/spacewalk-client-repo-1.5-1.el6.noarch.rpm

Import Redhat's RPM GPG key

 wget -O /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release http://www.redhat.com/security/37017186.txt && rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

Registering clients

В панели Spacewalk
  • создать канал ПО
  • создать ключ активации (с привязкой к необходимому каналу)
В терминале
 yum install rhn-setup
 rhnreg_ks --serverUrl=http://spacewalk.tomtel.ru/XMLRPC --activationkey=<key-with-custom-channel>
 
/etc/sysconfig/rhn/rhnsd
 INTERVAL=60

Install Spacewalk server

 BASEARCH=$(uname -i)
 rpm -Uvh http://spacewalk.redhat.com/yum/1.2/RHEL/5/$BASEARCH/spacewalk-repo-1.2-0.el5.noarch.rpm
 yum install spacewalk-oracle

Configuring Spacewalk server

 spacewalk-setup --disconnected

An example session is as follows:

 
 * Setting up Oracle environment.
 * Setting up database.
 ** Database: Setting up database connection for Oracle backend.
 DB User? spacewalk
 DB Password? пароль к БД
 DB SID? XE
 DB hostname? localhost
 DB port [1521]? 
 DB protocol [TCP]? 
 ** Database: Testing database connection.
 ** Database: Populating database.
 *** Progress: ########################################################
 * Setting up users and groups.
 ** GPG: Initializing GPG and importing key.
 ** GPG: Creating /root/.gnupg directory
 You must enter an email address.
 Admin Email Address? vukor@tomtel.ru
 * Performing initial configuration.
 * Activating Spacewalk.
 ** Loading Spacewalk Certificate.
 ** Verifying certificate locally.
 ** Activating Spacewalk.
 * Enabling Monitoring.
 * Configuring apache SSL virtual host.
 Should setup configure apache's default ssl server for you (saves original ssl.conf) [Y]? 
 ** /etc/httpd/conf.d/ssl.conf has been backed up to ssl.conf-swsave
 * Configuring tomcat.
 ** /etc/tomcat5/tomcat5.conf has been backed up to tomcat5.conf-swsave
 ** /etc/tomcat5/server.xml has been backed up to server.xml-swsave
 ** /etc/tomcat5/web.xml has been backed up to web.xml-swsave
 * Configuring jabberd.
 * Creating SSL certificates.
 CA certificate password? 
 Re-enter CA certificate password? пароль к сертификату
 Organization? TOMTEL
 Organization Unit [spacewalk.tomtel.ru]? 
 Email Address [vukor@tomtel.ru]? 
 City? Tomsk
 State? Tomskaya obl.
 Country code (Examples: "US", "JP", "IN", or type "?" to see a list)? RU
 ** SSL: Generating CA certificate.
 ** SSL: Deploying CA certificate.
 ** SSL: Generating server certificate.
 ** SSL: Storing SSL certificates.
 * Deploying configuration files.
 * Update configuration in database.
 * Setting up Cobbler..
 Cobbler requires tftp and xinetd services be turned on for PXE provisioning functionality. Enable these services [Y/n]?
 cobblerd does not appear to be running/accessible
 * Restarting services.
 Installation complete.
 Visit https://spacewalk.tomtel.ru to create the Spacewalk administrator account.

Manage Spacewalk

 /usr/sbin/rhn-satellite [stop|start|restart].

Import Pubkeys for channels

 wget http://download.fedora.redhat.com/pub/epel/RPM-GPG-KEY-EPEL -O /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
 rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
 wget http://spacewalk.redhat.com/yum/RPM-GPG-KEY-spacewalk -O /etc/pki/rpm-gpg/RPM-GPG-KEY-spacewalk
 rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-spacewalk
 wget http://yum.id.ethz.ch/yum/RPM-GPG-KEY.ethz.txt -O /etc/pki/rpm-gpg/RPM-GPG-KEY-ETHZ
 rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-ETHZ
 wget http://linux.dell.com/repo/hardware/latest/RPM-GPG-KEY-dell -O /etc/pki/rpm-gpg/RPM-GPG-KEY-dell
 wget http://linux.dell.com/repo/hardware/latest/RPM-GPG-KEY-libsmbios -O /etc/pki/rpm-gpg/RPM-GPG-KEY-libsmbios
 rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-dell
 rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-libsmbios
 wget http://download.openvz.org/RPM-GPG-Key-OpenVZ -O /etc/pki/rpm-gpg/RPM-GPG-Key-OpenVZ
 rpm --import /etc/pki/rpm-gpg/RPM-GPG-Key-OpenVZ
 wget http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing -O /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-testing
 rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-testing

Update client profile

 rhn-profile-sync -v

p.s. This command need run after update base channels in Spacewalk panel, else systems not seen updates in Spacewalk panel.

Ссылки

Комментарии

 
blog/2011/11/25-spacewalk_-_установка_настройка.txt · Последние изменения: 2012/05/15 12:06 — Антон Бугреев · []