Thursday 30 June 2022

How to Install Spacewalk Server on CentOS 7



Spacewalk tool is a free and open source Linux operating system management tool for system provisioning and configuration/management/updating tool of its clients. It is a community version of Red Hat Satellite Server and widely used on Red Had derived distributions.
This article describes How to Install Spacewalk on CentOS 7 – Part 1
 
Step 1. Enable EPEL Repository: Follow the article How to install EPEL repository on Centos7 to enable/install EPEL Repository as some dependencies are required to run Spacewalk Server:
 
Step 2. Java Installation: Follow the article How to install Java9/jdk1.9 on CentOS 7 – RPM File to install Java.
 
Step 3. Enable Repository for Spacewalk: Run the following command to enable/install repository for Spacewalk server installation:
 
[root@linuxcnf ~]# curl -s https://copr.fedorainfracloud.org/coprs/g/spacewalkproject/spacewalk-2.9/repo/epel-7/group_spacewalkproject-spacewalk-2.9-epel-7.repo > /etc/yum.repos.d/spacewalk.repo
[root@linuxcnf ~]#
 
[root@linuxcnf ~]# yum repolist
Loaded plugins: fastestmirror
……………………..
repo id                                                                                    repo name                                                              status
base/7/x86_64                                                                              CentOS-7 - Base                                                        10,072
copr:copr.fedorainfracloud.org:group_spacewalkproject:spacewalk-2.9/x86_64                 Copr repo for spacewalk-2.9 owned by @spacewalkproject                    206
epel/x86_64                                                                                Extra Packages for Enterprise Linux 7 - x86_64                         13,751
extras/7/x86_64                                                                            CentOS-7 - Extras                                                         512
updates/7/x86_64                                                                           CentOS-7 - Updates                                                      3,842
repolist: 28,383

[root@linuxcnf ~]#
 
Step 4. Spacewalk & Database Installation: Run the below commands to install Spacewalk embedded PostgreSQL database and Spacewalk:

[root@linuxcnf ~]# yum install spacewalk-setup-postgresql
Loaded plugins: fastestmirror
……………………..
Installed:
  spacewalk-setup-postgresql.noarch
……………………..
Complete!
[root@linuxcnf ~]#
 
Step 5. Spacewalk Configuration: Run the following command for initial configuration/installation and provide parameter values:
 

[root@linuxcnf ~]# spacewalk-setup
** 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: ############################
* 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? root@localhost
* Performing initial configuration.
** Package installation: Locking required rpm versions.
* Configuring apache SSL virtual host.
Should setup configure apache's default ssl server for you (saves original ssl.conf) [Y]?
** /etc/httpd/conf.d/ssl.conf has been backed up to ssl.conf-swsave
* Configuring jabberd.
* Creating SSL certificates.
CA certificate password?
Re-enter CA certificate password?
Cname alias of the machine (comma seperated)?
Organization? LinuxCNF
Organization Unit [linuxcnf]?
Email Address [root@localhost]?
City? GGN
State? KR
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..
Cobbler requires tftp and xinetd services be turned on for PXE provisioning functionality. Enable these services [Y]?
* Restarting services.
Installation complete.
Visit https://linuxcnf to create the Spacewalk administrator account.
[root@linuxcnf ~]#
 
Step 6. Firewall Configuration: Run the following command to enable ports in firewall rules:
 
[root@linuxcnf ~]# firewall-cmd --permanent --add-service=http
success
[root@linuxcnf ~]# firewall-cmd --permanent --add-service=https
success
[root@linuxcnf ~]# firewall-cmd --reload
success
[root@linuxcnf ~]#
 
Step 7. Spacewalk Configuration: Run the following command to start Spacewalk service and enable it across reboot:
 
[root@linuxcnf ~]# /usr/sbin/spacewalk-service [start|stop|status]
 
Spacewalk server has been installed and configured now. Open any web browser and navigate to https://host-name/ or https://IP-Address/
 




Done!!! Now enter the administrator account name, password, first name, last name, Email address and other details. Then, click Create Organization button to create login and configure as per environment/setup on CentOS 7.

No comments:

Post a Comment