{"id":280,"date":"2015-09-07T16:18:47","date_gmt":"2015-09-07T16:18:47","guid":{"rendered":"http:\/\/onlinelab.info\/?p=280"},"modified":"2015-09-07T16:18:47","modified_gmt":"2015-09-07T16:18:47","slug":"how-to-install-spacewalk-on-centos-7-rhel-7","status":"publish","type":"post","link":"https:\/\/www.asianux.org.vn\/index.php\/2015\/09\/07\/how-to-install-spacewalk-on-centos-7-rhel-7\/","title":{"rendered":"How to install SpaceWalk on CentOS 7 \/ RHEL 7"},"content":{"rendered":"<figure id=\"attachment_9224\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-9224\" src=\"http:\/\/www.itzgeek.com\/wp-content\/uploads\/2015\/09\/Spacewalk.png\" alt=\"Install Spacewalk\" width=\"200\" height=\"200\" title=\"\"><figcaption class=\"wp-caption-text\">Install Spacewalk<\/figcaption><\/figure>\n<p>Spacewalk is an open source package and system management solution for RedHat derivative distributions like CentOS, Scientific Linux and <a href=\"http:\/\/www.itzgeek.com\/category\/how-tos\/linux\/fedora-how-tos\" target=\"_blank\" rel=\"noopener\">Fedora<\/a>, developed by the spacewalk community. Spacewalk is the upstream project for the source of \u200bRed Hat Satellite, It is released under GPLv2 license.<\/p>\n<p>Spacewalk provides the web interface to manage and view the updates for the system that are registered with Spacewalk, we can initiate the task such as install, update, inventory, and so on. Here is the small tutorial about installing Spacewalk on <a href=\"http:\/\/www.itzgeek.com\/tag\/centos-7\" target=\"_blank\" rel=\"noopener\">CentOS 7 \/ RHEL 7<\/a>.<\/p>\n<h2>Features:<\/h2>\n<ul>\n<li>Inventory of the systems<\/li>\n<li>Install and Update system packages.<\/li>\n<li>Configuring Kick-start installation.<\/li>\n<li>Deploy and Manage the configuration files from singe location<\/li>\n<li>Start \/ Stop \/ Configure the guests.<\/li>\n<li>Distribute the content across the multiple Geo graphical location using spacewalk proxy.<\/li>\n<\/ul>\n<h2><strong>Prerequsites<\/strong><\/h2>\n<ul>\n<li>Outbound open ports 80, 443<\/li>\n<li>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<\/li>\n<li>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)<\/li>\n<li>Storage for packages (default \/var\/satellite): Depends on what you\u2019re storing; Red Hat recommend 6GB per channel for their channels<\/li>\n<li>2GB RAM minimum, 4GB recommended<\/li>\n<li>Underlying (SpaceWalk Server) OS is fully up-to-date.<\/li>\n<\/ul>\n<h2>Environment:<\/h2>\n<p>HostName :\u00a0 server.itzgeek.local<\/p>\n<p>IP Address : 192.168.12.3<\/p>\n<p>OS : CentOS Linux release 7.1.1503 (Core)<\/p>\n<h2>Setup Repositories:<\/h2>\n<p>Before installing Spacewalk on CentOS, we must configure required repositories for Spacewalk setup.<\/p>\n<p>Lets first setup Spacewalk repository, at the time of writing, latest available Spacewalk version was 2.3.<\/p>\n<pre>rpm -Uvh http:\/\/yum.spacewalkproject.org\/2.3\/RHEL\/7\/x86_64\/spacewalk-repo-2.3-4.el7.noarch.rpm<\/pre>\n<p>Setup Jpackage Repo:<\/p>\n<pre>vi \/etc\/yum.repos.d\/jpackage-generic.repo<\/pre>\n<p>Add the following.<\/p>\n<pre>[jpackage-generic]\nname=JPackage generic\n#baseurl=http:\/\/mirrors.dotsrc.org\/pub\/jpackage\/5.0\/generic\/free\/\nmirrorlist=http:\/\/www.jpackage.org\/mirrorlist.php?dist=generic&amp;type=free&amp;release=5.0\nenabled=1\ngpgcheck=1\ngpgkey=http:\/\/www.jpackage.org\/jpackage.asc<\/pre>\n<p><a href=\"http:\/\/www.itzgeek.com\/how-tos\/linux\/centos-how-tos\/enable-epel-repository-for-centos-7-rhel-7.html\" target=\"_blank\" rel=\"noopener\">Setup EPEL repo on CentOS 7.<\/a><\/p>\n<pre>rpm -Uvh https:\/\/dl.fedoraproject.org\/pub\/epel\/epel-release-latest-7.noarch.rpm<\/pre>\n<p>Your Spacewalk server should have a resolvable fully-qualified domain name (FQDN) such as \u201chostname.domain.com\u201d, to do that; edit \/etc\/hosts file.<\/p>\n<pre>vi \/etc\/hosts<\/pre>\n<p>Modify it according to your environment.<\/p>\n<pre>127.0.0.1\u00a0\u00a0 localhost localhost.localdomain localhost4 localhost4.localdomain4\n::1\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 localhost localhost.localdomain localhost6 localhost6.localdomain6\n<strong># Your Spacewalk Server<\/strong>\n<strong>192.168.12.3 server.itzgeek.local server<\/strong><\/pre>\n<h2>Configure Firewall:<\/h2>\n<p>As said in the prerequisites, we need to have outbound port opened. Run the following on terminal to allow the required ports.<\/p>\n<div class=\"wp_syntax\">\n<table>\n<tbody>\n<tr>\n<td class=\"code\">\n<pre class=\"dos\">firewall-cmd --add-service=http ; firewall-cmd --add-service=https<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>Add port 5222 if you want to push actions to client machines and 5269 for push actions to a Spacewalk Proxy, 69 udp if you want to use tftp.<\/p>\n<p>Restart firewall service using command:<\/p>\n<pre>firewall<span class=\"crayon-o\">-<\/span>cmd <span class=\"crayon-o\">--<\/span>reload<\/pre>\n<h2><strong>SpaceWalk Database:<\/strong><\/h2>\n<p>SpaceWalk supports PostgreSQL (version 8.4 or higher) or Oracle ( version 10g or higher) as a database for storing its data.<\/p>\n<h4><strong>Embedded Database:<\/strong><\/h4>\n<p>Spacewalk has the embedded setup for PostgrSQL database which will do the automatic Spacewalk installation without having user intervention to enter the database information. Embedded database method is very easy to setup and run the Spacewalk in no time; this is very useful for those who do not have any database knowledge.<\/p>\n<pre>yum install spacewalk-setup-postgresql<\/pre>\n<h4><strong>External Database:<\/strong><\/h4>\n<p>You can use the external PostgreSQL or Oracle database to install Spacewalk, you can find the tons of documents online to <a href=\"https:\/\/fedorahosted.org\/spacewalk\/wiki\/HowToInstall#InstallingSpacewalk\" target=\"_blank\" rel=\"noopener\">setup database<\/a>.<\/p>\n<h2>Installing SpaceWalk:<\/h2>\n<p>If you are planning use PostgreSQL database (Either Embedded or External PostgreSQL database).<\/p>\n<pre>yum install spacewalk-postgresql<\/pre>\n<p>If you are planning to use Oracle database.<\/p>\n<pre>yum install spacewalk-oracle<\/pre>\n<h2>Configuring SpaceWalk:<\/h2>\n<p>If you have installed embedded database, then use below command. It will ask you to enter the admin mail and organization details to generate the self signed certificate for secured access.<\/p>\n<pre>spacewalk-setup --disconnected<\/pre>\n<p>if you have setup database manually, then use below commands depend on database type. It will ask you to enter external database details.<\/p>\n<p>Oracle:<\/p>\n<pre>spacewalk-setup --disconnected --external-oracle<\/pre>\n<p>PostgreSQL:<\/p>\n<pre>spacewalk-setup --disconnected --external-postgresql<\/pre>\n<p>Since i am using embedded postgresql database, an example session is as follows;<\/p>\n<pre># spacewalk-setup --disconnected\n\n* Setting up SELinux..\n** Database: Setting up database connection for PostgreSQL backend.\n** Database: Installing the database:\n** Database: This is a long process that is logged in:\n** Database:\u00a0\u00a0 \/var\/log\/rhn\/install_db.log\n*** Progress: ###\n** Database: Installation complete.\n** Database: Populating database.\n*** Progress: ############################\n* Configuring tomcat.\n* Setting up users and groups.\n** GPG: Initializing GPG and importing key.\n** GPG: Creating \/root\/.gnupg directory\nYou must enter an email address.\nAdmin Email Address? <strong>itzgeek.web@gmail.com<\/strong> <strong>## Email Address ##<\/strong>\n* Performing initial configuration.\n* Activating Spacewalk.\n** Loading Spacewalk Certificate.\n** Verifying certificate locally.\n** Activating Spacewalk.\n* Configuring apache SSL virtual host.\nShould setup configure apache's default ssl server for you (saves original ssl.conf) [Y]? <strong>## Press Y ##<\/strong>\n** \/etc\/httpd\/conf.d\/ssl.conf has been backed up to ssl.conf-swsave\n* Configuring jabberd.\n* Creating SSL certificates.\nCA certificate password? <strong>## Enter Certificate Password ##<\/strong>\nRe-enter CA certificate password? <strong>## Re Enter Certificate Password ##<\/strong>\nOrganization? <strong>ITzGeek<\/strong> <strong>## Your Organization Name ##<\/strong>\nOrganization Unit [server.itzgeek.local]? <strong>Linux<\/strong> <strong>## Your Organization Unit ##<\/strong>\nEmail Address [itzgeek.web@gmail.com]? <strong>## Email Address ##<\/strong>\nCity? <strong>Albany<\/strong> <strong>## Your City ##<\/strong>\nState? <strong>NY<\/strong> <strong>## Your State ##<\/strong>\nCountry code (Examples: \"US\", \"JP\", \"IN\", or type \"?\" to see a list)? <strong>US<\/strong> <strong>## Your Country ##<\/strong>\n** SSL: Generating CA certificate.\n** SSL: Deploying CA certificate.\n** SSL: Generating server certificate.\n** SSL: Storing SSL certificates.\n* Deploying configuration files.\n* Update configuration in database.\n* Setting up Cobbler..\nCobbler requires tftp and xinetd services be turned on for PXE provisioning functionality. Enable these services [Y]? <strong>## Press Y ##<\/strong>\n* Restarting services.\nInstallation complete.\nVisit <strong>https:\/\/server.itzgeek.local<\/strong> to create the Spacewalk administrator account\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 .<\/pre>\n<p>On complete, start the Spacewalk service if not started automatically.<\/p>\n<pre>\/usr\/sbin\/spacewalk-service start<\/pre>\n<p>Open up your browser and navigate it to <strong>https:\/\/ip-add-ress<\/strong> or <strong>https:\/\/your-domain-name<\/strong>.<\/p>\n<p>You will be asked to create administrator account for spacewalk, fill up details and click on Create Login.<\/p>\n<figure id=\"attachment_9222\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-9222\" src=\"http:\/\/www.itzgeek.com\/wp-content\/uploads\/2015\/09\/Install-Spacewalk-on-CentOS-7-Create-Spacewalk-Administrator.png\" alt=\"Install Spacewalk on CentOS 7 - Create Spacewalk Administrator\" width=\"640\" height=\"341\" title=\"\"><figcaption class=\"wp-caption-text\">Install Spacewalk on CentOS 7 \u2013 Create Spacewalk Administrator<\/figcaption><\/figure>\n<p>Once administrator account is created, it will take you to home page of spacewalk where you can do all administration activities.<\/p>\n<figure id=\"attachment_9223\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-9223\" src=\"http:\/\/www.itzgeek.com\/wp-content\/uploads\/2015\/09\/Install-Spacewalk-on-CentOS-7-Overview-of-Spacewalk.png\" alt=\"Install Spacewalk on CentOS 7 - Overview of Spacewalk\" width=\"640\" height=\"341\" title=\"\"><figcaption class=\"wp-caption-text\">Install Spacewalk on CentOS 7 \u2013 Overview of Spacewalk<\/figcaption><\/figure>\n<p>That\u2019s All!!!, you have sucessfully installed Spacewalk on <a href=\"http:\/\/www.itzgeek.com\/tag\/centos-7\" target=\"_blank\" rel=\"noopener\">CentOS 7 \/ RHEL 7<\/a>. Next tutorial is about Configuring the SpaceWalk to distribute the updates for CentOS clients.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Install Spacewalk Spacewalk is an open source package and system management solution for RedHat derivative distributions like CentOS, Scientific Linux and Fedora, developed by the spacewalk community. Spacewalk is the upstream project for the source&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-280","post","type-post","status-publish","format-standard","hentry","category-solution"],"_links":{"self":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts\/280","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/comments?post=280"}],"version-history":[{"count":0,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts\/280\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/media?parent=280"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/categories?post=280"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/tags?post=280"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}