Upgrading the PSM Server
This procedure describes how to upgrade the PSM server to Release 7.8 using an installation DVD or ISO image.
Obtain the PSM DVD or ISO image.
Do not use this procedure if you are upgrading from Release 5.2 or earlier. Follow the procedure in Upgrading the PSM Server instead.
Before starting this procedure, consult the proNX Service Manager Release Notes for this release. The proNX Service Manager Release Notes contains important information relating to installing and upgrading software for this release, and might require you to take additional steps prior to or after executing this procedure.
The proNX Service Manager Release Notes specifies the allowed upgrade paths for this release. Contact Juniper Networks Support when upgrading from releases that are not explicitly specified.
- Log in to the PSM server.
- Ensure the current PSM server version is one
of the releases from which upgrade to this release is supported. For
example:
[root@mgtServ3 ~]# rpm -q ems9001 ems9001-7.1-0.x86_64
- Optionally,
save any configuration that will be overwritten.
If you have made any changes to the property values in the
workers.xml
file, save that file so that they do not get overwritten during the server upgrade.Locate the
workers.xml
file in directory/usr/local/ems9001/resources/serverConfigurations/
and copy it to a location where it will not be overwritten during the server upgrade, preferably onto another machine.If you have developed any custom server scripts, save those files so that they do not get overwritten during the server upgrade.
Locate the scripts in the directory
/usr/local/ems9001/conf/serverScripts
and copy them to a location in which they will not be overwritten during the server upgrade, preferably onto another machine.Scheduled discoveries are also lost during the upgrade. If you have any scheduled discoveries, ensure you have the information to reschedule those discoveries so that you can restore them when you launch the new client.
- Generate a backup of the existing PSM server
database as follows:
Stop the server by entering the following command:
psm-stop
The stop command is successful when the 'Ems-' processes all change to 'not monitored' state. Type <ctrl> c to exit the Linux watch command window.
Export the PSM server database. For example:
cd /tmp mysqldump -u<user> -p<password> --databases ems emsquartz > dbbackup.sql
The database backup file is stored in the /tmp directory.
Note If a problem occurs during the upgrade that prevents the database from being automatically imported, import the database manually after you have finished upgrading. For example:
mysql –u<user> -p<password> < dbbackup.sql
For information on how to restore the database from a backup, see Restoring the PSM Server Database from a Backup .
- Insert the PSM DVD into the DVD drive of the server or copy the PSM ISO image onto the server.
- Mount the DVD or the ISO. The mount directory (
/media
) in the following commands can be changed.To mount the DVD:
mount -t iso9660 /dev/cdrom /media
To mount the ISO:
mount -t iso9660 -o loop PSM-xxx.iso /media
where
PSM-xxx.iso
is the name of the ISO file (for example,PSM-7.8.0.iso
). - Copy the RPM file from the mounted DVD or ISO to any location
on the server workstation. For example:
cp /media/ems9001-7.8-0.x86_64.rpm /usr/local
- Upgrade to the new PSM server.
To reduce the risk of database corruption while installing, execute the installation within the Linux screen terminal. Commands launched within the screen terminal continue to run even if your connection to the server is lost.
screen
The screen terminal is launched.
In the screen terminal, navigate to the location where the RPM file was copied, and start the installation. For example:
cd /usr/local rpm -Uvh ems9001-7.8-0.x86_64.rpm
Note If your connection to the server is lost during this step, log back in from any machine and type screen -r to reattach the screen.
Tip If you do not want to wait around for the installation to finish executing, you can detach the screen and reattach it at a later time. To detach the screen, type <ctrl> a then d. The screen is detached and the installation command executes in the background. To reattach the screen, type screen -r.
The following is an example of the upgrade output. Your output might differ depending on release and configuration:
# rpm -Uvh ems9001-7.8-0.x86_64.rpm Preparing... ########################################### [100%] Stopping TC Server...Done Stopping Server(all) ...Done Stopping dashboard... Done 1:ems9001 ########################################### [100%] Creating PSM iptables rules Add PSM iptable rule for udp port 123 Add PSM iptable rule for udp port 161 Add PSM iptable rule for udp port 1620 Add PSM iptable rule for udp port 1812 Add PSM iptable rule for udp port 1813 Add PSM iptable rule for tcp port 20 Add PSM iptable rule for tcp port 21 Add PSM iptable rule for tcp port 22 Add PSM iptable rule for tcp port 2003 Add PSM iptable rule for tcp port 2004 Add PSM iptable rule for tcp port 2812 Add PSM iptable rule for tcp port 3306 Add PSM iptable rule for tcp port 8080 Add PSM iptable rule for tcp port 9000:10100 Reloaded iptables with PSM rules Dropping databases Synchronising database schema Checking Schema ...Done Initialising database 2015-03-26 15:17:12,534 INFO [main] ems.database.Initializer.execute():65 - Complete Done Adding database triggers...Done Configure Radius for PSM Alter PSM Account Radius Configuration Complete Add crontab entries Configure Graphite for PSM Reloading system logger...[ OK ] Reinitializing monit daemon Installation Successful - ems9001-7.8 Uninstall Successful - ems9001-5.3
The output indicates that the following events occurred:
The PSM server is stopped and the software is uninstalled.
The new RPM package is expanded
The operating system firewall is updated with new rules for PSM
The MySQL database is dropped and reinitialized with new schemas
The Monit process manager is re-initialized to start managing the PSM
Other necessary third-party or open source software packages start
The following directory is created:
/usr/local/ems9001-7.8
Note The proNX Service Manager files are installed in the above directory. A softlink is created to this directory at:
/usr/local/ems9001
Exit the screen terminal.
exit
This closes the Linux screen terminal and returns you to the original shell.
- Unmount the DVD or ISO. Enter:
umount /media
- Reboot the server.
reboot
- After the server machine has rebooted, log back in and
confirm that the PSM server is up and running.
[user ~]# psm-status Every 2.0s: monit summary Tue Jun 21 15:51:22 2016 The Monit daemon 5.14 uptime: 14d 2h 57m Process 'SSH' Running Process 'radiusd' Running Process 'SNMPD' Running Process 'MySQL' Running Process 'proftpd' Running Filesystem 'rootfs' Accessible Filesystem 'logfs' Accessible Filesystem 'varfs' Accessible Filesystem 'pmsfs' Accessible Process 'Ems-Server-Masters' Running Process 'Ems-Server-Workers' Running Process 'Ems-Server-Discovery' Running Process 'Ems-Dashboard' Running Process 'CROND' Running Process 'carbon' Running System 'psm.example.com' Running
The 'Ems-' processes should all be in the "Running" state. You might need to wait a few minutes before the 'Ems-' processes all change to the "Running" state. Type <ctrl> c to exit the Linux watch command window.
- To confirm that the new version of the server is installed,
check the version information:
[user ~]# rpm -q ems9001 ems9001-7.8-0.x86_64
Look for the 'ems9001-' entry and confirm that the version is indeed the correct release.
If you do not have any configuration you need to restore from 3, then you have completed the server installation. Otherwise, proceed to the next step.
- If you have to restore changes to the property values
in the
workers.xml
file, do the following:Reapply the changes from the old
workers.xml
file that you saved in 3. Do not simply overwrite the new file with the old ones, as there might be new properties defined in the new file that are required in the new software release. Instead, edit the file, identify the changes in the old file that you want to keep, and make those changes in the newworkers.xml
file. When you are done, save and close the newworkers.xml
file. - If you have to restore custom server scripts, copy the
scripts back to the
/usr/local/ems9001/conf/serverScripts
directory. - To activate these changes, restart the PSM server.
psm-restart
The restart command successfully completes when the 'Ems-' processes all change to the "Running" state. Type <ctrl> c to exit the Linux watch command window.
You have successfully upgraded the PSM server.