How to install the latest otrs
I recently tried to install otrs, which is a flexible Help Desk and IT-Service Management Software, but was faced with an error during its installation.
Error:Sub-process /usr/bin/dpkg returned an error code (1)
I could not continue the installation nore could i complete the installation. I installed otrs via commandline like so sudo apt-get install otrs
. how I fixed the before mentioned error, was to remove the otrs2
? package.(sudo apt-get remove otrs2
) but, there is a but. You will not be able to restart the apache server after you have installed cause, otrs leaves allot of files behind, that render apache useless. To remove those files run the command's below:
Removing faulty otrs
- sudo rm /etc/apache2/sites-available/otrs.conf
- sudo rm /etc/apache2/sites-enabled/otrs.conf
- sudo rm /home/$USER/.cache/software-center/piston-helper/rec.ubuntu.com,api,1.0,recommend_app,otrs,,81384ef50f6b1038436de465afd51202
- sudo rm /home/$USER/.cache/software-center/rnrclient/reviews.ubuntu.com,reviews,api,1.0,reviews,filter,nl,any,any,any,otrs,page,1,helpful,,251358f9bbc99053ed71c6082e485827
- sudo rm /home/$USER/.cache/software-center/rnrclient/reviews.ubuntu.com,reviews,api,1.0,reviews,filter,nl,ubuntu,quantal,any,otrs,page,1,helpful,,7af23859b6e91926d3623a0d118dbf90
- sudo rm /var/cache/apt/archives/otrs2_3.1.7+dfsg1-5_all.deb
- sudo rm /var/cache/apt/archives/otrs_3.1.7+dfsg1-5_all.deb
- sudo rm /var/crash/otrs2.0.crash
- sudo rm /var/crash/otrs2.0.upload
- sudo rm /var/crash/otrs2.0.uploaded
I am not sure how it got so messed up, that I have to remove and older version while the version number in the repository is 3.1.7?!
I reported this bug, but so far no response, but that might change over time. Now that we fixed and removed a faulty otrs. we will install the latest (3.2.3) Manually.
Installation
First, startup your gnome-terminal. press on your keyboard: ctrl-alt-del. Then create a working directory, mkdir /tmp/otrs/
then cd in to that directorycd /tmp/otrs/
. We will download and extract otrs via command-line, like so:
- wget ftp://ftp.otrs.org/pub/otrs/otrs-3.2.3.tar.gz
- tar xf otrs-3.2.3.tar.gz
After it downloaded and extracted we will move the otrs folder to the /opt
folder like so:sudo mv otrs-3.2.3 /opt/otrs
. Some dependencies need to be installed(Perl modules/web server/database). Without these it wont work.
- sudo apt-get install -y libapache2-mod-perl2 libdbd-mysql-perl libnet-dns-perl libnet-ldap-perl libio-socket-ssl-perl libpdf-api2-perl libsoap-lite-perl libgd-text-perl libgd-graph-perl libapache-dbi-perl mysql-server
We will also create a user en group for otrs so it can run cron jobs etc... properly.
- sudo useradd -r -d /opt/otrs/ -c 'OTRS user' otrs
- sudo usermod -g www-data otrs
The next commands will copy the otrs configuration file into the /opt/otrs/Kernel/
folder. This is so you have your own brand new copy.
- cd /opt/otrs/Kernel
- sudo cp Config.pm.dist Config.pm
- sudo cp Config/GenericAgent.pm.dist Config/GenericAgent.pm
To be able to run properly, the permissions need to be set right. A built in script does just that. Copy/Paste the following codes:
- cd /opt/otrs
- sudo bin/otrs.SetPermissions.pl --otrs-user=otrs --otrs-group=otrs --web-user=www-data --web-group=www-data /opt/otrs
You need to restart apache: sudo service apache2 restart
. After restart typ in the follwowing url in your browser: https://127.0.0.1/otrs/installer.pl
, complete the wizard and you are done.
Here is an automated script for the lazy ones among us.