How To Install SpaceWalk on CentOS 6 / RHEL 6
Spacewalk is the package, and system management solution for Red Hat derived Linux operating system such as CentOS, Scientific Linux and Fedora, by the spacewalk community. It is released under GPLv2 license.
It offers a more flexible way to do
- Inventory of the systems
- Install and Update system packages.
- Configuring for Kick-start installation.
- Deploy and Manage the configuration files from a single location
- Start / Stop / Configure the guests.
- Distribute the content across the multiple Geographical location using spacewalk proxy.
Spacewalk provides the web interface to manage and view the updates for the system that are registered, and we can initiate tasks such as install, update, inventory, and so on.
Here is the tutorial about installing SpaceWalk on CentOS 6 / RHEL 6.
Before installing SpaceWalk on the CentOS, the system must be set up to have the required repositories to download the dependencies. Lets first setup the SpaceWalk repository.
rpm -Uvh https://copr-be.cloud.fedoraproject.org/results/@spacewalkproject/spacewalk-2.9/epel-6-x86_64/00830557-spacewalk-repo/spacewalk-repo-2.9-4.el6.noarch.rpm
Enable Red Hat Optional server channel (RHEL 6).
subscription-manager repos --enable=rhel-6-server-optional-rpms
Setup the EPEL repository on CentOS 6.
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
Configure the firewall for Spacewalk.
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 5222 -j ACCEPT iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 5269 -j ACCEPT iptables -I INPUT -p udp -m udp --dport 69 -j ACCEPT service iptables save
Setup SpaceWalk Database
SpaceWalk supports either PostgreSQL (8.4 or higher) or Oracle ( 10g or higher) database, and you can skip the following embedded database setup to use the external database.
SpaceWalk has the embedded setup for PostgreSQL database which will do the automatic SpaceWalk installation without having user intervention to enter the database information. Embedded database method is straightforward to set up and run the SpaceWalk in no time, and this is very useful for those who do not have any database knowledge.
Here, we will use PostgreSQL (embedded) database.
yum -y install spacewalk-setup-postgresq
You can use the external PostgreSQL or Oracle database to install SpaceWalk, and you can find the tons of documents online to set up the database.
If you are planning to use the PostgreSQL database.
yum -y install spacewalk-postgresql
Run the Spacewalk set up to begin the configuration. It will ask you to enter the admin mail and organization details to generate the self-signed certificate for secured access.
* Setting up SELinux.. ** Database: Setting up database connection for PostgreSQL backend. Database "rhnschema" does not exist ** 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: ########################## * Configuring tomcat. * 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? email@example.com * Performing initial configuration. * Configuring apache SSL virtual host. Should setup configure apache's default ssl server for you (saves original ssl.conf) [Y]? Y << Press Y ** /etc/httpd/conf.d/ssl.conf has been backed up to ssl.conf-swsave * Configuring jabberd. * Creating SSL certificates. CA certificate password? << Enter Certificate Password Re-enter CA certificate password? << Re Enter Certificate Password Cname alias of the machine (comma seperated)? server.itzgeek.local,server << Certificate Subject Name (Your Domain Name) Organization? ITzGeek << Your Organization Name Organization Unit [server.itzgeek.local]? IT << Your Organization Unit Email Address [firstname.lastname@example.org]? << Email Address City? Albany << Your City State? NY << Your State # Country code (Examples: "US", "JP", "IN", or type "?" to see a list)? US << Your Country ** 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]? Y << Press Y * Restarting services. Installation complete. Visit https://server.itzgeek.local to create the Spacewalk administrator account.
Once the installation is complete, check the status of SpaceWalk service.
postmaster (pid 4403) is running... router (pid 4425) is running... sm (pid 4433) is running... c2s (pid 4441) is running... s2s (pid 4449) is running... tomcat6 (pid 4511) is running... [ OK ] httpd (pid 4659) is running... osa-dispatcher (pid 4687) is running... rhn-search is running (4709). cobblerd (pid 4751) is running... RHN Taskomatic is running (4778).
Start the services if not started automatically.
Now you can access the SpaceWalk via a web browser.
You need to add exceptions for the self-signed certificate.
You need to create an administrator account for the spacewalk. Fill up details and then click on Create Organization.
Upon successful creation, it will take you to the home page of spacewalk where you can do all the administrative activities.
In our next tutorial, we will see about Configuring the SpaceWalk to distribute the updates for CentOS clients.