Tuesday 2 December 2014

Install/Configure spacewalk - CentOS 6.6


Spacewalk is an open source Linux systems management solution.Spacewalk is the upstream community project from which the Red Hat Satellite product is derived​.

Differences between Spacewalk and Red Hat Satellite​:



What Can Spacewalk Do?​

- Inventory your systems (hardware and software information)
- Install and update software on your systems
- Collect and distribute your custom software packages into manageable groups
- Provision (kickstart) your systems
- Manage and deploy configuration files to your systems
- Monitor your systems
- Provision and start/stop/configure virtual guests
- Distribute content across multiple geographical sites in an efficient manner.


Prerequisites:

- Outbound open ports 80, 443, 4545 (only if you want to enable monitoring)
- Inbound open ports 80, 443, 5222 (only if you want to push actions to client machines) and 5269 (only for push actions to a Spacewalk Proxy), 69 udp if you want to use tftp
- Storage for database: 250 KiB per client system + 500 KiB per channel + 230 KiB per package in -channel (i.e. 1.1GiB for channel with 5000 packages)
- Storage for packages (default /var/satellite): Depends on what you're storing; Red Hat recommend 6GB per channel for their channels
- 2GB RAM minimum, 4GB recommended
- Make sure your underlying OS is fully up-to-date.​


​My Environment :
Hostname: spacewalk
Environment: CentOS 6.6 x86_64
Spacewalk version : 2.2​

Setting up Spacewalk repo:
​​
[root@spacewalk ~]# rpm -Uvh http://yum.spacewalkproject.org/2.2/RHEL/6/x86_64/spacewalk-repo-2.2-1.el6.noarch.rpm
Retrieving http://yum.spacewalkproject.org/2.2/RHEL/6/x86_64/spacewalk-repo-2.2-1.el6.noarch.rpm
warning: /var/tmp/rpm-tmp.rexVMa: Header V4 DSA/SHA1 Signature, key ID 863a853d: NOKEY
Preparing...                ########################################### [100%]
   1:spacewalk-repo         ########################################### [100%]

[root@spacewalk ~]# 

Jpackage repository:

For Spacewalk on EL 6, a couple of additional dependencies are needed from jpackage configure the following yum repository before beginning your Spacewalk installation
​.
​​
root@spacewalk:~]# 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

root@spacewalk:~]# 

Spacewalk requires a Java Virtual Machine with version 1.6.0 or greater. ​EPEL - Extra Packages for Enterprise Linux contains a version of the openjdk that works with Spacewalk. Other dependencies can get installed from EPEL as well. To get packages from EPEL just install this RPM:



Retrieving http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
warning: /var/tmp/rpm-tmp.1MCWEN: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing...                ########################################### [100%]
   1:epel-release           ########################################### [100%]

​​[root@spacewalk ~]# 

Database server:
You can let Spacewalk setup the PostgreSQL server on your machine without any manual intervention.​
​​
[root@spacewalk ~]# yum install spacewalk-setup-postgresql
Loaded plugins: fastestmirror, security
Setting up Install Process
.
.
Dependency Installed:
  postgresql-pltcl.x86_64 0:8.4.20-1.el6_5                            postgresql-server.x86_64 0:8.4.20-1.el6_5                            tcl.x86_64 1:8.5.7-6.el6                           
Complete!

[root@spacewalk ~]# 

Installing Spacewalk:

yum to install the necessary packages. This will pull down and install the set of RPMs required to get Spacewalk to run
​​
[root@spacewalk ~]# yum install spacewalk-postgresql
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
.
.
Transaction Summary
==============================================================================================================================================================================================
Install     323 Package(s)
Upgrade       2 Package(s)

Total download size: 241 M
Is this ok [y/N]:y
.
.
.
warning: rpmts_HdrFromFdno: Header V4 DSA/SHA1 Signature, key ID 863a853d: NOKEY
Retrieving key from http://yum.spacewalkproject.org/RPM-GPG-KEY-spacewalk-2012
Importing GPG key 0x863A853D:
 Userid: "Spacewalk <spacewalk-devel@redhat.com>"
 From  : http://yum.spacewalkproject.org/RPM-GPG-KEY-spacewalk-2012
Is this ok [y/N]: y
warning: rpmts_HdrFromFdno: Header V3 DSA/SHA1 Signature, key ID c431416d: NOKEY
Retrieving key from http://www.jpackage.org/jpackage.asc
Importing GPG key 0xC431416D:
 Userid: "JPackage Project (JPP Official Keys) <jpackage@zarb.org>"
 From  : http://www.jpackage.org/jpackage.asc
Is this ok [y/N]: y
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
 Userid : CentOS-6 Key (CentOS 6 Official Signing Key) <centos-6-key@centos.org>
 Package: centos-release-6-6.el6.centos.12.2.x86_64 (@anaconda-CentOS-201410241409.x86_64/6.6)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Is this ok [y/N]: y
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Importing GPG key 0x0608B895:
 Userid : EPEL (6) <epel@fedoraproject.org>
 Package: epel-release-6-8.noarch (installed)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : libgcj-4.4.7-11.el6.x86_64                                                                                                                                              1/327 
  Updating   : 1:java-1.6.0-openjdk-1.6.0.33-1.13.5.1.el6_6.x86_64        
.
.
.
Dependency Updated:
  java-1.6.0-openjdk.x86_64 1:1.6.0.33-1.13.5.1.el6_6                                              policycoreutils.x86_64 0:2.0.83-19.47.el6_6.1                                             
Complete!

[root@spacewalk ~]#

Configuring Spacewalk:
​​
[root@spacewalk ~]# spacewalk-setup --disconnected
** Database: Setting up database connection for PostgreSQL backend.
** Database: Installing the database:
** Database: This is a long process that is logged in:
** Database:   /var/log/rhn/install_db.log
*** Progress: #
** Database: Installation complete.
** 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.
* Configuring jabberd.
* Creating SSL certificates.
CA certificate password? 
Re-enter CA certificate password? 
Organization? oratestlabs.com
Organization Unit [spacewalk]?                   
Email Address [root@localhost]? 
City? bancross
State? KA
Country code (Examples: "US", "JP", "IN", or type "?" to see a list)? IN
** 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..
Processing /etc/cobbler/modules.conf
`/etc/cobbler/modules.conf' -> `/etc/cobbler/modules.conf-swsave'
Processing /etc/cobbler/settings
`/etc/cobbler/settings' -> `/etc/cobbler/settings-swsave'
Cobbler requires tftp and xinetd services be turned on for PXE provisioning functionality. Enable these services [Y]? y
* Restarting services.
Installation complete.
Visit https://spacewalk to create the Spacewalk administrator account.
[root@spacewalk ~]# 

​Post Installation:​

[root@spacewalk ~]#  spacewalk-service status
postmaster (pid 7077) is running...
router (pid 7104) is running...
sm (pid 7114) is running...
c2s (pid 7124) is running...
s2s (pid 7134) is running...
tomcat6 (pid 7207) is running... [ OK ]
httpd (pid 7335) is running...
osa-dispatcher (pid 7352) is running...
rhn-search is running (7406).
cobblerd (pid 7437) is running...
RHN Taskomatic is running (7464).
[root@spacewalk ~]#  


Login to the web ​interface ​and create first user login.





spacewalk was installed successfully.

No comments:

Post a Comment