Skip to main content

OTRS Upgrade Notes



First things first, we need to download the latest and that’s usually from the public FTP site on OTRS’ site. Here is a good place to start: https://www.otrs.com/download-open-source-help-desk-software-otrs-free/ I always grab the source .tar.gz file and usually with this command:

# wget -c http://ftp.otrs.org/pub/otrs/otrs-5.0.13.tar.gz (for the latest one anyway – which at time of writing I 5.0.13)

The upgrade direction is here: http://otrs.github.io/doc/manual/admin/5.0/en/html/upgrading.html and I want this to be my summarized version of this for ease of use both for myself and for you, gentle reader.

I have a script that starts off the upgrade process with some of the basic stuff (note – run this as root):


#!/bin/bash
service cron stop
service apache2 stop
service postfix stop
NOW=`date +%F`
mkdir /root/backup/$NOW
BDIR=/root/backup/$NOW
cp -R /opt/otrs/Kernel/Config.pm $BDIR
cp -R /opt/otrs/Kernel/Config/GenericAgent.pm $BDIR
cp -R /opt/otrs/Kernel/Config/Files/ZZZAuto.pm $BDIR
cp -R /opt/otrs/var/ $BDIR
/opt/otrs/scripts/backup.pl -d $BDIR


Now what this does is to stop the services in Step 1 of the upgrade documentation.
Then we set the “date” variable and create a backup folder for it and instantiate a variable to make the script shorter – the “BDIR” variable.
Now I simply step through the guide and backup what I need to in Step 2 and then run a full backup into the backup directory with the backup.pl -d $BDIR command.
Now it’s time for the command line work to begin. I typically download the source file into an OTRS folder in my root home directory (yes I do this all as root) so I will run:

# tar -zxf otrs-5.0.13.tar.gz

Once the tarball is extracted I copy the resultant directory to the /opt/ folder:

# cp -R otrs-5.0.13 /opt/

In the directory are all the other OTRS installs I’ve done but haven’t cleaned up. An ls of the /opt/ directory usually looks like this:

root@otrs:/opt# ls
otrs        otrs-4.0.11  otrs-5.0.1   otrs-5.0.13
otrs-4.0.1  otrs-4.0.7   otrs-5.0.10  otrs-5.0.5
root@otrs:/opt#


The bolded otrs is a logical link. I delete that:

# rm otrs

And create a new one:

# ln -s /opt/otrs-5.0.13 otrs

We need to copy stuff back now and I have a bit of a script that will do it:

#!/bin/bash
BDIR=/root/backup/`date +%F`
cp -R $BDIR/Config.pm /opt/otrs/Kernel/
cp -R $BDIR/ZZZAuto.pm /opt/otrs/Kernel/Config/Files/


It copies back the files we need to and moves us through Step 4.
Now to set permissions on the new OTRS directory:

# /opt/otrs/bin/otrs.SetPermissions.pl –web-group=www-data (for Ubuntu)

And this sorts out the permissions. I also find it very useful to change the ownership of files at a more macro level too, so I will also run:

# chown -R otrs:www-data /opt/otrs*
# chmod -R g+w /opt/otrs*

This has solved some issues in the past and seems like a handy thing to do.
Step 4 is finished and Step 5 has us checking Perl modules out:

# /opt/otrs/bin/otrs.CheckModules.pl

We can skip to Step 7 now and we have to change to the OTRS user:

# su otrs

As OTRS, Step 7 gets us to refresh the config cache and then delete the other caches:

$ /opt/otrs/bin/otrs.Console.pl Maint::Config::Rebuild
$ /opt/otrs/bin/otrs.Console.pl Maint::Cache::Delete

Annoyingly we have to change back to root and restart services. I just CTRL-D out of otrs and then run:

# services apache2 start
# services cron start
# services postfix start

And then su back to OTRS

# su otrs
$

Step 12 – restart the OTRS Daemon (as otrs – don’t forget!)

$ /opt/otrs/bin/otrs.Daemon.pl start

And then Step 13 which updates cron for the OTRS user:

$ cd /opt/otrs/var/cron
$ for foo in *.dist; do cp $foo `basename $foo .dist`; done
$ /opt/otrs/bin/Cron.sh start

And that’s it for the command line stuff.

Log into the website and go to Admin and then Package Manager. I usually find that at least three packages need to be either re-installed or updated. While these are not right, the website will run terribly slowly. Fixing the problem here will give you back some performance and set it on the right track.

That’s pretty much it. Done!

Comments

Popular posts from this blog

Plone - the open source Content Management System - a review

One of my clients, a non-profit, has a lot of files on it's clients. They need a way to digitally store these files, securely and with availability for certain people. They also need these files to expire and be deleted after a given length of time - usually about 7 years. These were the parameters I was given to search for a Document Management System (DMS) or more commonly a Content Management System (CMS). There are quite a lot of them, but most are designed for front facing information delivery - that is, to write something, put it up for review, have it reviewed and then published. We do not want this data published ever - and some CMS's make that a bit tricky to manage. So at the end of the day, I looked into several CMS systems that looked like they could be useful. The first one to be reviewed was OpenKM ( www.openkm.com ). It looked OK, was open source which is preferable and seemed to have solid security and publishing options. Backing up the database and upgradin

elementary OS 5.1 Hera - a review and a revisit

 It's been ages since I used a desktop Linux distribution - being up to my ears in the horror of implementing ISO 27001 doesn't leave you much time to play around with computers - too busy writing policies, auditing and generally trying to improve security to a formally acceptable and risk managed level. I need a quick, small OS though to do the occasional network scan, view the contents of a dodgy file on and for general, low impact activities. I remembered reviewing elementary OS ( elementary.io ) some time ago ( see  https://www.ryv.id.au/2015/01/elementary-os-review.html ) from 2015 so I thought it was worth a revisit.  I downloaded the ISO from their website, forgoing to donation for the moment while I review it. If it turns out I'm going to keep using it, I'll send them some love. The ISO is 1.38GB in size and I booted it in a VMware Player instance. From go to whoa (I won't include the install photos here) it took about 10 minutes with a dual vCPU and 4GB of

Musings on System Administration

I was reading an article discussing forensic preparation for computer systems. Some of the stuff in there I knew the general theory of, but not the specifics of how to perform. As I thought about it, it occurred to me that Systems Administration is such a vast field. There is no way I can know all of this stuff. I made a list of the software and operating systems I currently manage. They include: - Windows Server 2003, Standard and Enterprise - Exchange 2003 - Windows XP - Windows Vista - Windows 2000 - Ubuntu Linux - OpenSuSE Linux - Mac OSX (10.3 and 10.4) - Solaris 8 - SQL 2005 - Various specialised software for the transport industry I have specific knowledge on some of this, broad knowledge on all of it, and always think "There's so much I *don't* know". It gets a bit down heartening sometimes. For one thing - I have no clue about SQL 2005 and I need to make it work with another bit of software. All complicated and nothing straightforward. Irritating doesn&