Archive for the ‘Redhat’ Category

How to create SOSREPORT

Posted: May 4, 2011 in Redhat
Tags:

What is an “sosreport” and how do I create it in Red Hat Enterprise Linux 4.6 and later?

Issue

The “sosreport” command is a tool that collects information about a Red Hat Enterprise Linux system, such as what kernel is running, what drivers are loaded, and various configuration files for common services. It also does some simple diagnostics against known problematic patterns.

Environment

  • Red Hat Enterprise Linux 4.6 and later

Resolution

To run  “sosreport”, the “sos” package must be installed. The package should be installed by default, but if the package is not installed, follow the steps below:

Red Hat Enterprise Linux 4.6 and later

If the system is registered with Red Hat Network (RHN), “sos” can be installed using the up2date command:

# up2date sos

Red Hat Enterprise Linux 5 and later

If the system is registered with RHN, use the yum command:

# yum install sos

If the system is not registered with RHN, the “sos” package can be downloaded from the RHN website or found on the installation CDs. The RPM command can be used to install the package on any version of Red Hat Enterprise Linux:

# rpm -Uvh sos-<version>.<arch>.rpm 

Once the package has been installed, issue the following command:

Note: sosreport requires root permissions to run.

# sosreport

The sosreport will run for several minutes, according to different system, the running time maybe more longer.

Once completed, “sosreport” will generate a compressed a bz2 file under /tmp. Provide this file to the support representative.

Normally, the size of the bz2 file will be about 3MB, but if your system has a large amount of log files, it maybe very big.

The sosreport has some plugins which can be turn on/off, the following command lists the plugins:

# sosreport -l 

For example, turning off the rpmva plugin will save time running sosreport.

# sosreport -k rpm.rpmva=off 

Note:

1. Before Red Hat Enterprise Linux 4.5, please use “sysreport” instead: What is a sysreport and how do I run it ?

2. In the sos package, there is also a command called “sysreport”, but it is just a soft link to the sosreport command:

# ls -l /usr/sbin/sysreport lrwxrwxrwx 1 root root 19 Nov  3  2008 /usr/sbin/sysreport -> /usr/sbin/sosreport 

If you do want to use the legacy version of sysreport, please use the sysreport.legacy command in sos package.

Ref : Redhat.com

Adding Swap File in Linux

Posted: April 19, 2011 in Redhat
Tags:

Procedure to add a swap file

You need to use dd command to create swapfile. Next you need to use mkswap command to set up a Linux swap area on a device or in a file.

a) Login as the root user

b) Type following command to create 512MB swap file (1024 * 512MB = 524288 block size):
# dd if=/dev/zero of=/swapfile1 bs=1024 count=524288

c) Set up a Linux swap area:
# mkswap /swapfile1

d) Activate /swapfile1 swap space immediately:
# swapon /swapfile1

e) To activate /swapfile1 after Linux system reboot, add entry to /etc/fstab file. Open this file using text editor such as vi:
# vi /etc/fstab

Append following line:
/swapfile1 swap swap defaults 0 0

So next time Linux comes up after reboot, it enables the new swap file for you automatically.

g) How do I verify swap is activated or not?
Simply use free command:
$ free -m

Ref : http://www.cyberciti.biz

Installing MediaTomb uPnP Server

Posted: October 24, 2010 in Personal, Redhat

Installing latest MediaTomb on CentOS 5.x 32-bit

If I ever have to do it again.. since it turned out to be extremely easy (if you look a little longer and resists compiling it from source), here is how to install MediaTomb on CentOS (or in my case ”Installing MediaTomb on CentOS 5.4″);

“[MediaTomb is] an open source (GPL) UPnP MediaServer with a web user interface and AV transcoding support” (Wikipedia)

MediaTomb can be read about and downloaded (in source form) from  http://mediatomb.cc/

1. download MediaTomb RPM.

[root@mediatomb ~]# wget ftp://ftp.pbone.net/mirror/centos.karan.org/el5/extras/testing/i386/RPMS/mediatomb-0.11.0-1.el5.kb.i386.rpm

2. download Required lib;

[root@mediatomb ~]# wget ftp://ftp.pbone.net/mirror/centos.karan.org/el5/extras/testing/i386/RPMS/taglib-1.5-1.el5.kb.i386.rpm

3. Install the Library

[root@mediatomb ~]# rpm -ivh taglib-1.5-1.el5.kb.i386.rpm

[root@mediatomb ~]# rpm -ivh mediatomb-0.11.0-1.el5.kb.i386.rpm

4. Find out which netword card to use (most likely its ‘eth0′)

[root@mediatomb ~]# ifconfig -a|egrep "inet addr|eth|wlan"
eth0 Link encap:Ethernet  HWaddr 00:0F:EA:8A:F7:76
inet addr:10.1.1.90 Bcast:10.255.255.255  Mask:255.0.0.0
inet addr:127.0.0.1  Mask:255.0.0.0
wlan0     Link encap:Ethernet  HWaddr 00:0F:B5:4F:79:71
In my case you see the only card with an IP address is ‘eth0′

5. Change the config and select your network card;

[root@mediatomb ~]# vi /etc/mediatomb.conf
In my case, change FROM;
MT_INTERFACE="NOT_SET"
TO:
MT_INTERFACE="eth0"

6. See which port it runs on;

[root@mediatomb ~]# grep MT_PORT /etc/mediatomb.conf
MT_PORT="50500"

7. Start it;

[root@mediatomb ~]# /etc/init.d/mediatomb start

8. Make sure Mediatomb is up and running;

[root@mediatomb ~]# /etc/init.d/mediatomb status
[root@mediatomb ~]# cat /var/log/mediatomb
2010-02-23 22:15:55    INFO: MediaTomb configuration was created in: /etc/mediatomb/config.xml
2010-02-23 22:15:55    INFO: Loading configuration from: /etc/mediatomb/config.xml
2010-02-23 22:15:55    INFO: UUID generated: 384f1086-4063-4390-acdf-b79771c60b6d
2010-02-23 22:15:55    INFO: Checking configuration...
2010-02-23 22:15:55    INFO: Setting filesystem import charset to UTF-8
2010-02-23 22:15:55    INFO: Setting metadata import charset to UTF-8
2010-02-23 22:15:55    INFO: Setting playlist charset to UTF-8
2010-02-23 22:15:55    INFO: Configuration check succeeded.
2010-02-23 22:15:55 WARNING: Sqlite3 database seems to be corrupt or doesn't exist yet.
2010-02-23 22:15:55    INFO: no sqlite3 backup is available or backup is corrupt. automatically creating database...
2010-02-23 22:15:55    INFO: database created successfully.
2010-02-23 22:15:55    INFO: Initialized port: 50500
2010-02-23 22:15:55    INFO: Server bound to: 10.1.1.90
2010-02-23 22:15:56    INFO: MediaTomb Web UI can be reached by following this link:
2010-02-23 22:15:56    INFO: http://10.1.1.90:50500/

9. You can see its available now on;

10. Go to that address above in a browser and have fun!

(remember if your firewall is enabled, you must open the port – do this in GNOME if you have the UI under “System” -> “Administration” -> “Security Level and Firewall”)

Just added a 1.5 TB HDD in one of my RHEL Server but fdisk -l does not show me the New HDD. Check below.

Here is the way to scan the scsi for the new HDD

Now I can see the 1.5 TB HDD . Click here for my post of how to format it and make partition.

Redhat login banner

Posted: August 17, 2010 in Redhat

You must be wondering how to change the system login banner. It is a very simple task. You login banner is stored in /etc/issue file. It is a text file which contains a message or system identification to be printed before the login prompt. Just open file in vi text editor:
# vi /etc/issue

Add/modify text as per your needs. In your /etc/issue file you can include certain escape codes to display the system name, date and time etc. All escape codes consist of a backslash (\) immediately followed
by one of the letters explained below:

  • d : Insert the current date.
  • s : Insert the system name, the name of the operating system.
  • l : Insert the name of the current tty line.
  • m : Insert the architecture identifier of the machine, eg. i486
  • n :Insert the nodename of the machine, also known as the hostname.
  • o :Insert the domainname of the machine.
  • r : Insert the release number of the OS, eg. 1.1.9.
  • t :Insert the current time.
  • u : Insert the number of current users logged in.
  • U : Insert the string “N user(s)” or “N users” where N is the number of current users logged in
  • v : Insert the version of the OS, eg. the build‐date etc.

An example of /etc/issue file with escape codes:

1) Open /etc/issue file
# vi /etc/issue

2) Append/edit/add following text to file:
This is \n.\o (\s \m \r) \t

3) Save file and exit to shell prompt.

My baaner printed before the login prompt as follows:

This is server.nixcraft.in (Linux i686 2.6.13-web100) 20:01:30

server login:

Please note that other Linux distrobution such as Debian also support /etc/issue file, so you can edit it to display login banner.

Ref : http://theos.in/hakuna-matata/


Problem :

I dont use CUPS for printing that much but I have to set it up for some of our development guys . It was working ok and I am kinda start loving it 😦 . Hence one of the server is comming up with error while printing . It is basically comming as “Segmentation Fault”

I got more error from the following location .

/var/log/cups

localhost – root [05/Aug/2010:11:05:06 +1000] “POST /printers/AUHOPRN01 HTTP/1.1” 200 18602 Print-Job client-error-not-possible
localhost – root [05/Aug/2010:11:05:06 +1000] “POST /classes/AUHOPRN01 HTTP/1.1” 200 18601 Print-Job client-error-not-possible

Solution :

Tried to restart Cups to get rid of the problem but it was failing each time .Then I have cleared the queue  with: sudo lprm – and it starts working ok .

Still need to find out more . This is for a heads up.


Adding a new disk to a Linux

Senario:

I am using a Vmware Virtual Box and just added a new HDD on that . I am not going through how I have done it . You can check this post for reference on that . Assuming the HDD is added and now go through the following.

[root@aurhel05 ~]# fdisk /dev/sdb

The number of cylinders for this disk is set to 3916.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sdb: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System

Command (m for help): n
Command action
e   extended
p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-3916, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-3916, default 3916):
Using default value 3916

Command (m for help): p

Disk /dev/sdb: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        3916    31455238+  83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@aurhel05 ~]# fdisk -l

Disk /dev/sda: 32.2 GB, 32259548160 bytes
255 heads, 63 sectors/track, 3922 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         131     1052226   83  Linux
/dev/sda2             132         784     5245222+  83  Linux
/dev/sda3             785        1437     5245222+  83  Linux
/dev/sda4            1438        3918    19928632+   5  Extended
/dev/sda5            1438        1698     2096451   83  Linux
/dev/sda6            1699        1959     2096451   82  Linux swap / Solaris
/dev/sda7            1960        2220     2096451   82  Linux swap / Solaris
/dev/sda8            2221        2481     2096451   83  Linux
/dev/sda9            2482        2612     1052226   83  Linux
/dev/sda10           2613        3918    10490413+  83  Linux

Disk /dev/sdb: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        3916    31455238+  83  Linux

[root@aurhel05 ~]# mkfs.ext3 /dev/sdb1

mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
3932160 inodes, 7863809 blocks
393190 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
240 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 25 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

[root@aurhel05 ~]# mkdir /u02

[root@aurhel05 ~]# mount /dev/sdb1 /u02

[root@aurhel05 ~]# mkdir /u02

[root@aurhel05 ~]# mount /dev/sdb1 /u02

[root@aurhel05 ~]# df -h

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda9            1020M  632M  337M  66% /
/dev/sda10             10G  5.1G  4.4G  54% /u01
/dev/sda8             2.0G   36M  1.9G   2% /tmp
/dev/sda5             2.0G  161M  1.8G   9% /home
/dev/sda3             5.0G  5.0G     0 100% /var
/dev/sda2             5.0G  2.4G  2.4G  50% /usr
/dev/sda1            1020M   42M  927M   5% /boot
tmpfs                  12G     0   12G   0% /dev/shm
/dev/sdb1              30G  173M   28G   1% /u02

[root@aurhel05 ~]# vi /etc/fstab

LABEL=/                 /                       ext3    defaults        1 1
LABEL=/u01              /u01                    ext3    defaults        1 2
LABEL=/u02              /dev/sdb1                    ext3    defaults        1 2
LABEL=/tmp              /tmp                    ext3    defaults        1 2
LABEL=/home             /home                   ext3    defaults        1 2
LABEL=/var              /var                    ext3    defaults        1 2
LABEL=/usr              /usr                    ext3    defaults        1 2
LABEL=/boot             /boot                   ext3    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
LABEL=SWAP-sda6         swap                    swap    defaults        0 0
LABEL=SWAP-sda7         swap                    swap    defaults        0 0

Save and exit . This will mount that pertition automatically after next reboot.


Problem :

I added one of no use syntax in /etc/fstab and  after reboot to single mode and then use vi to edit /etc/fstab that display this file
is read-only mode, so I cannot edit it ….. now I cannot go back to  normal boot up.

Solution :

In Single user mode type the following ,

mount -o remount,rw /

Then vi /etc/fstab and then you will be able to amend the file again .


This will monitor the Disk space of a Linux system and send an email to ADMIN . Admin , and Thresold is a variable , so that it can be change accordingly.

===================================================

#!/bin/bash
#       This script determines the percentage of disk usage.
#       If that percentage is greater than 90% a user is emailed
#       a report notifying them of the usage.
#

emailUser=”it.support@au.specsavers.com,brandont@au.specsavers.com”
typeset -i error=”70″
if [ -e temp.txt ]; then
rm temp.txt
fi
for disc in `mount| egrep ‘^/dev’ | egrep -iv ‘cdrom|proc|sys|pts’ |awk ‘{print $3}’`
do
typeset -i discUsage=`df -h $disc|cut -c40-42|grep -i [^a-z]`
if [ “$discUsage” -ge “$error” ]; then
echo “Disc usage for $disc is at $discUsage. Need your attention !!%” >> temp.txt
fi
done
if [ -e temp.txt ]; then
message=`cat temp.txt`
fi
if [ ${#message} -gt 0 ]; then
cat temp.txt | mail  -s “Disc Usage exceed 70% for : $HOSTNAME” $emailUser
fi

===================================================

Installing Spacewalk on CentOS-5

Posted: July 3, 2010 in Redhat

I was trying to install Spacewalk for last few days and seems to be very difficult at the begining but at the end it was finaly installed . Here is the jest of my Successfull installation . This is my version from CentOS wiki to install Spacewalk.

Spacewalk is the upstream community project from which the Red Hat Network Satellite product is derived. It provides a management interface for software content across registered servers and desktops.

1. Server Requirement.

  • CentOS 5 (i386 or x86_64)
  • 1024 MB of swap space
  • 20 GB of free space, 80 GB recommended
  • A fully qualified domain name (FQDN) – In this example, we use the IANA reserved example.com domain: spacewalk.xxx.com.au
  • Also Try to add the Module under HTTP–> mod_nss while installing Centos . I have the problem because of that while finishing my installation and it fails while activating my RHN server . It will save lot of your time for troubleshooting.Check Below

My Server Setup:

I have used CentOS 5.4 32BIT on Vmware with 2 GB of RAM , 2 VCPU

2. Selinux

  • I personally Disable SElinux on my server . This is my choice but not recommanded.

3. Firewall

The following inbound TCP ports should be open on the Spacewalk server:

  • 69: TFTP (PXE provisioning)
  • 80: Spacewalk web interface
  • 443: Spacewalk web interface (SSL)
  • 4545: Spacewalk monitoring
  • 5222: If you plan to push actions to client systems
  • 5269: If you push actions to a Spacewalk Proxy Server
  • 9055: Oracle XE web access

4. Oracle Database

In this guide Spacewalk will be installed with an Oracle 10g database server; supporting PostgreSQL as backend is a work in progress and we will update here whenever will be a viable option. Oracle Express Edition server works fine even if it has some limitations:

  • 1 GB memory (max) – even if more is available
  • 4 GB disk space (max)
  • 1 database (max)
  • 1 cpu (max) – processing resources equivalent to one CPU will be consumed at peak even if more than one CPU is available

The following packages are required by the Oracle database. This will install bc, plus glibc and libaio in 32bit variant which is required even on the x86_64 architecture:

yum install bc glibc.i686 libaio.i386

Download Oracle XE from the Oracle website. You will need to register in order to download the RPMS. Choose the Oracle Database 10g Express Edition (Universal):

  • oracle-xe-univ-10.2.0.1-1.0.i386.rpm

You will also need a client to access the database. Download the Oracle Instant Client: i386 client or x86_64 according to the architecture of your server. Download the following two (2) RPM packages:

  • oracle-instantclient-basic-10.2.0.4-1.*.rpm
  • oracle-instantclient-sqlplus-10.2.0.4-1.*.rpm
 ATTENTION: Spacewalk version 1.0 is  known to work correctly with version 10.2.0.4 of the Oracle Instant  Client.
 This is the place where I made the Mistake downloading the latest Version of Oracel Instant Client which was 11.4.
 Please try to download version 10.2

Install the downloaded RPM on the Spacewalk server:

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

Before configuring the Oracle database, we need to pull some packages from the Spacewalk Yum repository.

Edit /etc/yum.repos.d/spacewalk.repo:

=========================================================

[spacewalk]
name=Spacewalk for Enterprise Linux – $basearch
baseurl=http://spacewalk.redhat.com/yum/1.0/RHEL/5/$basearch/
gpgkey=http://spacewalk.redhat.com/yum/RPM-GPG-KEY-spacewalk
enabled=1
gpgcheck=1

=========================================================

Or

you can create that automatically via RPM .

rpm -Uvh http://spacewalk.redhat.com/yum/1.0/RHEL/5/i386/spacewalk-repo-1.0-2.el5.noarch.rpm

Install the following packages from the Spacewalk repository:

yum install oracle-lib-compat

Configure the Oracle database:

/etc/init.d/oracle-xe configure

 *** The default values are fine except for the HTTP port. Use 9055 instead  of 8080.

5. Client Configuration

We need to configure the tns names entry for our database. Edit /etc/tnsnames.ora: (Some time the File dows not exists , Just create it Manually)

This is what My one Look Like.

=========================================================

# tnsnames.ora Network Configuration File:

XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
# (SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)

=========================================================

Test the connection with the Oracle database server:

sqlplus system@xe

Enter the password for the system user when prompted. You should see the following message:

SQL*Plus: Release 10.2.0.1.0 – Production on Wed Dec 17 09:41:18 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 – Production
SQL>

Type “quit” to exit the client interface.

Creating the spacewalk database user:

Create the spacewalk database user with the sqlplus command-line interface:

sqlplus ‘sys@xe as sysdba’
SQL> create user spacewalk identified by spacewalk default tablespace users;
User created.
SQL> grant dba to spacewalk;
Grant succeeded.
SQL> PASSWORD spacewalk;
Changing password for spacewalk
New password:
Retype new password:
Password changed
SQL> quit

Restart the Oracle database:

/etc/init.d/oracle-xe restart

6. Yum

6.1. EPEL
Spacewalk requires packages available from the EPEL repository. Edit /etc/yum.repos.d/epel.repo:

=========================================================

[epel]
name=Extra Packages for Enterprise Linux 5 – $basearch
#baseurl=http://download.fedora.redhat.com/pub/epel/5/$basearch
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch
failovermethod=priority
gpgkey=http://download.fedora.redhat.com/pub/epel/RPM-GPG-KEY-EPEL
gpgcheck=1
enabled=1
includepkgs=bea-stax* cobbler editarea gc gc-devel git* jabberd jabberpy* jakarta-commons-cli jcommon \
jfreechart libapreq2 libgsasl* libntlm* libyaml perl-Algorithm-Diff perl-Apache-DBI \
perl-BerkeleyDB perl-Cache-Cache perl-Class-MethodMaker perl-Class-Singleton \
perl-Convert-BinHex perl-Config-IniFiles perl-Crypt-DES perl-Crypt-GeneratePassword \
perl-DateTime perl-DateTime-Format-Mail perl-DateTime-Format-W3CDTF perl-Error \
perl-FreezeThaw perl-Frontier-RPC perl-GD perl-Git perl-Math-FFT perl-HTML-TableExtract \
perl-IO-Capture perl-IO-stringy perl-IPC-ShareLite perl-libapreq2 perl-MIME-Lite \
perl-MIME-tools perl-Net-IPv4Addr perl-Net-SNMP perl-Params-Validate perl-Proc-Daemon \
perl-SOAP-Lite perl-TermReadKey perl-Text-Diff perl-Unix-Syslog perl-XML-RSS perl-version \
perlAlgorithm-Diff python-cheetah python-dmidecode python-hashlib python-netaddr PyYAML \
python-simplejson rhino tzdata-java udns*

=========================================================

6.2. Spacewalk

The packages rhn-client-tools and rhnlib are needed by Spacewalk, but they were removed from CentOS as part of CentOS changed to the updater [to avoid an old upstream updater behaviour of un-configured CentOS units, that placed load on the upstream vendor due to some hard coded repository names]. To address this, edit /etc/yum.repos.d/spacewalk-client.repo and add the following lines:

=========================================================

[spacewalk-client]
name=Spacewalk Client Tools for Enterprise Linux – $basearch
baseurl=http://spacewalk.redhat.com/yum/1.0-client/RHEL/5/$basearch/
gpgkey=http://spacewalk.redhat.com/yum/RPM-GPG-KEY-spacewalk
enabled=1
gpgcheck=1

=========================================================

6.3. Partial yum repositories

If you want to use your Spacewalk server to manage partial yum repositories,
we recommend to create a file named /etc/reposync.conf. Below is an example file used to manage both EPEL
and RPMforge i386 repositories. We strongly recommend using the includepkgs directive to protect the base distro packages and limit the occupied disk space:

=========================================================

[epel32]
name=Extra Packages for Enterprise Linux 5 – i386
baseurl=http://download.fedora.redhat.com/pub/epel/5/i386
#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=i386
failovermethod=priority
gpgkey=http://download.fedora.redhat.com/pub/epel/RPM-GPG-KEY-EPEL
gpgcheck=1
enabled=1
includepkgs=bea-stax* cobbler editarea gc gc-devel git* jabberd jabberpy* jakarta-commons-cli jcommon \
jfreechart libapreq2 libgsasl* libntlm* libyaml perl-Algorithm-Diff perl-Apache-DBI \
perl-BerkeleyDB perl-Cache-Cache perl-Class-MethodMaker perl-Class-Singleton \
perl-Convert-BinHex perl-Config-IniFiles perl-Crypt-DES perl-Crypt-GeneratePassword \
perl-DateTime perl-DateTime-Format-Mail perl-DateTime-Format-W3CDTF perl-Error \
perl-FreezeThaw perl-Frontier-RPC perl-GD perl-Git perl-Math-FFT perl-HTML-TableExtract \
perl-IO-Capture perl-IO-stringy perl-IPC-ShareLite perl-libapreq2 perl-MIME-Lite \
perl-MIME-tools perl-Net-IPv4Addr perl-Net-SNMP perl-Params-Validate perl-Proc-Daemon \
perl-SOAP-Lite perl-TermReadKey perl-Text-Diff perl-Unix-Syslog perl-XML-RSS perl-version \
perlAlgorithm-Diff python-cheetah python-dmidecode python-hashlib python-netaddr PyYAML \
python-simplejson rhino tzdata-java udns*

[rpmforge32]
name = RPMforge for Enterprise Linux 5 – i386
baseurl = http://apt.sw.be/redhat/el5/en/i386/dag
gpgkey = http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
gpgcheck=1
includepkgs=amavisd-new arc cabextract clamav* clamd freeze lha lzop nomarch perl-Archive-Zip perl-Convert-TNEF \
perl-Convert-UUlib perl-MailTools perl-Net-Server ripole unarj zoo

=========================================================

6.4. GPG keys

By default, Spacewalk will refuse to distribute unsigned RPMS or RPMS signed with an unknown key.

We make sure we have all the relevant GPG keys installed:

=========================================================

wget http://download.fedora.redhat.com/pub/epel/RPM-GPG-KEY-EPEL
mv RPM-GPG-KEY-EPEL /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
wget http://www.redhat.com/security/37017186.txt
mv 37017186.txt /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
wget http://spacewalk.redhat.com/yum/RPM-GPG-KEY-spacewalk
mv RPM-GPG-KEY-spacewalk /etc/pki/rpm-gpg/RPM-GPG-KEY-spacewalk
rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-spacewalk
wget http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
mv RPM-GPG-KEY.dag.txt /etc/pki/rpm-gpg/RPM-GPG-KEY-dag
rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-dag

=========================================================

7. Spacewalk Server

7.1. Installation

Remove the specspo package if present since it conflicts with Spacewalk.

rpm -e specspo

We use yum to fetch the rather long list of dependencies for the Spacewalk software:

yum install spacewalk-oracle
yum update

7.2. Configuration

Configure the Spacewalk application:

=========================================================

#spacewalk-setup –disconnected

* Setting up Oracle environment.
* Setting up database.
** Database: Setting up database connection.
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.
You must enter an email address.
Admin Email Address? webmaster@example.com
* 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]?
* Configuring jabberd.
* Creating SSL certificates.
CA certificate password?
Re-enter CA certificate password?
Organization? example.com
Organization Unit [spacewalk.example.com]?
Email Address [webmaster@example.com]?
City? Montreal
State? Quebec
Country code (Examples: “US”, “JP”, “IN”, or type “?” to see a list)? CA
** 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]?
* Restarting services.
Installation complete.

=========================================================

Use a web browser to view https://spacewalk.example.com/ to create the Spacewalk administrator account.

Point your web browser at https://spacewalk.example.com to create the satellite administrator account
[where example.com is the local DNS domain under your local control]

This is the End of My installation . Now you need to concentrate on Configuring and AAdministration of  Spacewalk