The software described in this documentation is either no longer supported or is in extended support.
Oracle recommends that you upgrade to a current supported release.
To upgrade a Spacewalk 2.0 server to Spacewalk 2.2:
Back up the Spacewalk configuration files in the following directories:
/etc/jabberd
/etc/rhn
/etc/sysconfig/rhn
server SSL build directory, typically
/root/ssl-build
For example, you could use the tar command to create a backup:
#
tar -cvf preSWupgrade.tar /etc/jabberd /etc/rhn /etc/sysconfig/rhn /root/ssl-build
Back up the Spacewalk database.
For more information on how to use the Recovery Manager (RMAN) to create a backup, see:
Getting Started with RMAN (Oracle Database 11gR2)
Getting Started with RMAN (Oracle Linux 12c)
Disable access to the Spacewalk Server 2.0 packages and enable access to the Spacewalk Server 2.2 packages.
If the Spacewalk server is registered as a client of itself:
Create a Spacewalk Server 2.2 channel as a child of the Oracle Linux 6 base channel.
Create a Spacewalk Server 2.2 repository that accesses the Spacewalk Server 2.2 channel on the Oracle Linux yum server (
https://yum.oracle.com/repo/OracleLinux/OL6/spacewalk22/server/x86_64/
), using the same GPG settings as for Oracle Linux 6.Associate the Spacewalk Server 2.2 repository with the Spacewalk Server 2.2 channel and synchronize the repository's packages from the Oracle Linux yum server.
Change the channel subscription of the Spacewalk server in Spacewalk from the Spacewalk Server 2.0 channel to the Spacewalk Server 2.2 channel.
If the Spacewalk server is configured to obtain Spacewalk Server 2.0 packages from the Oracle Linux yum server:
Disable the Spacewalk Server 2.0 repository in the yum repository configuration file, or delete your Spacewalk Server 2.0
.repo
file.Download the latest yum repository configuration file (https://yum.oracle.com/public-yum-ol6.repo) to the yum repositories directory (by default
/etc/yum.repos.d
) and enable theol6_spacewalk22_server
repository in that file.Alternatively, create a yum repository configuration file, for example
/etc/yum.repos.d/spacewalk22.repo
, with the following content:[ol6_spacewalk22_server] name=Spacewalk Server 2.2 for Oracle Linux 6 ($basearch) baseurl=https://yum.oracle.com/repo/OracleLinux/OL6/spacewalk22/server/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=1
Upgrade the Spacewalk packages.
#
yum upgrade
You can safely ignore any SELinux
restorecon
messages that are displayed when the packages are installed.Install the
rpmconf
package and use the rpmconf command to copy any customizations you want to preserve to the upgraded configuration files.#
yum install rpmconf
#rpmconf -a
Stop the Spacewalk services.
#
spacewalk-service stop
Shutting down spacewalk services... Stopping RHN Taskomatic... Stopped RHN Taskomatic. Stopping cobbler daemon: [ OK ] Stopping rhn-search... Stopped rhn-search. Shutting down osa-dispatcher: [ OK ] Stopping httpd: [ OK ] Stopping tomcat6: [ OK ] Terminating jabberd processes ... Stopping s2s: [ OK ] Stopping c2s: [ OK ] Stopping sm: [ OK ] Stopping router: [ OK ] Done.Upgrade the Spacewalk database schema.
On the Oracle Database server, log in as a database administrator (typically,
SYSDBA
) and verify that the database is running.$
sqlplus / as SYSDBA
SQL*Plus: Release 12.1.0.2.0 Production on Tue Jun 2 11:25:42 2015 Copyright (c) 1982, 2014, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options SQL>Grant the additional system privileges
CREATE TABLE
andCREATE TRIGGER
to the Spacewalk database user.SQL>
grant create table, create trigger to
sw_user
;On the Spacewalk server, enter the following command to upgrade the database schema.
#
/usr/bin/spacewalk-schema-upgrade
The output of the spacewalk-schema-upgrade command confirms whether or not the schema upgrade was successful. In the event of a failure:
Check the log files in the
/var/log/spacewalk/schema-upgrade
directory to establish the cause.Restore the database from the backup.
Fix the cause of the problem, for example by extending the tablespaces if there is insufficient space.
Upgrade the database schema.
Upgrade the Spacewalk configuration for the Oracle Database.
#
spacewalk-setup --disconnected --external-oracle --upgrade
If you previously customized the Spacewalk installation, for example in the file
/etc/rhn/rhn.conf
, restore the customizations from your backup.(Optional) Enable monitoring and the monitoring scout.
NoteMonitoring is a deprecated feature that will be removed in a future release.
To enable monitoring without enabling the monitoring scout, enter:
#
/usr/share/spacewalk/setup/upgrade/rhn-enable-monitoring.pl
To enable monitoring and the monitoring scout, enter:
#
/usr/share/spacewalk/setup/upgrade/rhn-enable-monitoring.pl --enable-scout
Restart the Spacewalk services.
#
spacewalk-service start
Starting spacewalk services... Initializing jabberd processes ... Starting router: [ OK ] Starting sm: [ OK ] Starting c2s: [ OK ] Starting s2s: [ OK ] Starting tomcat6: [ OK ] Waiting for tomcat to be ready ... Starting httpd: [ OK ] Starting osa-dispatcher: [ OK ] Starting rhn-search... Starting cobbler daemon: [ OK ] Starting RHN Taskomatic... Done.