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 or 2.2 server to Spacewalk 2.4:
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 about using the Recovery Manager (RMAN) to create a backup,refer to the following documents:
Getting Started with RMAN (Oracle Database 11gR2)
Getting Started with RMAN (Oracle Database 12c)
Disable access to the Spacewalk Server 2.0 or 2.2 packages and enable access to the Spacewalk Server 2.4 packages.
If the Spacewalk server is registered as a client of itself, do the following:
Create a Spacewalk Server 2.4 channel as a child of the Oracle Linux 6 base channel.
Create a Spacewalk Server 2.4 repository that accesses the Spacewalk Server 2.4 channel on the Oracle Linux yum server (
https://yum.oracle.com/repo/OracleLinux/OL6/spacewalk24/server/x86_64/
) by using the same GPG settings as for Oracle Linux 6.Associate the Spacewalk Server 2.4 repository with the Spacewalk Server 2.4 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.0or 2.2 channel to the Spacewalk Server 2.4 channel.
If the Spacewalk server is configured to obtain Spacewalk Server 2.0 or 2.2 packages from the Oracle Linux yum server:
Disable the Spacewalk Server 2.0 or 2.2 repository in the Oracle yum repository configuration file, or delete your Spacewalk Server 2.0 or 2.2
.repo
file.Download the latest the yum repository configuration file (https://yum.oracle.com/yum-ol6.repo) to the yum repositories directory (by default
/etc/yum.repos.d
) and enable theol6_spacewalk24_server
repository in that file.Alternatively, create a
yum
repository configuration file, for example/etc/yum.repos.d/spacewalk24.repo
, with the following content:[ol6_spacewalk24_server] name=Spacewalk Server 2.4 for Oracle Linux 6 ($basearch) baseurl=https://yum.oracle.com/repo/OracleLinux/OL6/spacewalk24/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.
#
/usr/sbin/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>If you are upgrading a Spacewalk 2.0 server, 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.Restart the Spacewalk services.
#
/usr/sbin/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.