Spacewalk sattelite installation
id : 8jjo1pmuku
category : computer
blog : unixlinux
created : 12/22/10 - 09:36:54
Activate repository
  • Download those two rpms to enable spacewalk and epel repository :
# wget http://spacewalk.redhat.com/yum/1.2/RHEL/5/i386/spacewalk-repo-1.2-0.el5.noarch.rpù
# wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
# rpm -ivh spacewalk-repo-1.2-0.el5.noarch.rpm
# rpm -ivh epel-release-5-4.noarch.rpm

  • This will create 3 files in /etc/yum.repos.d/ : epel.repo, epel-testing.repo, spacewalk.repo
  • Disable gpg check before using yum
# sed -i "s/gpgcheck=1/gpgcheck=0/g /etc/yum.repos.d/*

  • Clean yum :
# yum clean all

Oracle installation
  • Get oracle-xe-univ-10.2.0.1-1.0.386.rpm from http://www.oracle.com/technetwork/database/express-edition/downloads/102xelinsoft-102048.html
  • Get oracle-instantclient-sqlplus-10.2.0.4-1.i386.rpm and oracle-instantclient-basic-10.2.0.4-1.i386.rpm from http://www.oracle.com/technetwork/topics/linuxsoft-082809.html
  • Once you have it, just install it :
# /usr/sbin/groupadd -r dba
# /usr/sbin/useradd -r -M -g dba -d /usr/lib/oracle/xe -s /bin/bash oracle

  • Create a swap file for oracle :
# dd if=/dev/zero of=/var/swapfile bs=1M count=1100 
# mkswap /var/swapfile
# swapon /var/swapfile
%% 
* Install rpm :
%%(cmdline)
# yum -y install bc libc.so.6 libaio.so.1 
# yum -y localinstall --nogpgcheck oracle-xe-univ-10.2.0.1-1.0.i386.rpm
# yum -y localinstall --nogpgcheck oracle-instantclient-basic*.rpm oracle-instantclient-sqlplus*.rpm
# yum -y install oracle-lib-compat

  • Setup :
# /etc/init.d/oracle-xe configure

  • Setup tnsname :
#cat >> /etc/tnsnames.ora << 'EOF'
XE =
    (DESCRIPTION =
       (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
       )
       (CONNECT_DATA =
          (SERVICE_NAME = xe)
       )
    )

  • Create user and grant privileges :
# su - oracle
# export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/
# /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/sqlplus 'sys@xe as sysdba'
create user spacewalk identified by spacewalk default tablespace users;
grant dba to spacewalk;
quit

  • Test your database connection, and set some parameters :
# /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/sqlplus spacewalk/spacewalk@xe
alter system set processes = 400 scope=spfile; 
alter system set "_optimizer_filter_pred_pullup"=false scope=spfile; 
alter system set "_optimizer_cost_based_transformation"=off scope=spfile; 
quit

  • Restart oracle :
# service orcale-xe restart

Spacewalk installation
  • Install with yum :
# yum install spacewalk-oracle

  • Configure spacewalk :
spacewalk-setup --disconnected
* Setting up Oracle environment.
* Setting up database.
** Database: Setting up database connection for Oracle backend.
DB User? spacewalk
DB Password? spacewalk
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? root@localhost
* 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]? 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? CA
Organization Unit [inftst1]?
Email Address [root@localhost]?
City? Paris
State? FR
Country code (Examples: "US", "JP", "IN", or type "?" to see a list)? FR
** 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]?Y
httpd does not appear to be running and proxying cobbler
* Restarting services.
Installation complete.
Visit https://inftst1 to create the Spacewalk administrator account.

  • Stop and start service :
# spacewalk-service start
# spacewalk-service stop