How to Install and Configure OTRS on Ubuntu 16.04

Requirements

  1. A fresh Alibaba cloud instance with Ubuntu 16.04 server installed.
  2. A static IP address 192.168.0.103 is configured on the instance.
  3. A Root password is setup on the server.

Launch Alibaba Cloud ECS Instance

First, log in to your https://ecs.console.aliyun.com">Alibaba Cloud ECS Console. Create a new ECS instance, choosing Ubuntu 16.04 as the operating system with at least 2GB RAM. Connect to your ECS instance and log in as the root user.

apt-get update -y

Install LAMP Server

Before starting, you will need to install Apache and MariaDB to your system. You can install them with the following command:

apt-get install apache2 libapache2-mod-perl2 mariadb-server -y
systemctl start apache2
systemctl start mysql
systemctl enable apache2
systemctl enable mysql

Configure MariaDB

By default, MariaDB is not secured. You can secure it by running the following command:

mysql_secure_installation
mysql -u root -p
MariaDB [(none)]> CREATE DATABASE otrs_db;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON otrs_db.* TO 'otrs'@'localhost' IDENTIFIED BY 'password';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> exit;
nano /etc/mysql/my.cnf
systemctl restart mysql

Install OTRS

OTRS is written in Perl, so you will need to install all the required Perl modules to your system. You can install all of them by running the following command:

apt-get install libdbd-odbc-perl libauthen-ntlm-perl libxml-libxml-perl libarchive-zip-perl libcrypt-eksblowfish-perl libcrypt-ssleay-perl  libxml-libxslt-perl libpdf-api2-simple-perl libyaml-libyaml-perl libencode-hanextra-perl libjson-xs-perl libmail-imapclient-perl libtemplate-perl libtemplate-perl libtext-csv-xs-perl libapache2-mod-perl2 libdbd-pg-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 -y
a2enmod perl
systemctl restart apache2
wget http://ftp.otrs.org/pub/otrs/otrs-5.0.22.zip
unzip otrs-5.0.22.zip
mv otrs-5.0.22 /opt/otrs
/opt/otrs/bin/otrs.CheckModules.pl
o Apache::DBI......................ok (v1.12)
o Apache2::Reload..................ok (v0.13)
o Archive::Tar.....................ok (v2.04)
o Archive::Zip.....................ok (v1.56)
o Crypt::Eksblowfish::Bcrypt.......ok (v0.009)
o Crypt::SSLeay....................ok (v0.73_04)
o Date::Format.....................ok (v2.24)
o DBI..............................ok (v1.634)
o DBD::mysql.......................ok (v4.033)
o DBD::ODBC........................ok (v1.52)
o DBD::Pg..........................ok (v3.5.3)
o Digest::SHA......................ok (v5.95)
o Encode::HanExtra.................ok (v0.23)
o IO::Socket::SSL..................ok (v2.024)
o JSON::XS.........................ok (v3.01)
o List::Util::XS...................ok (v1.41)
o Mail::IMAPClient.................ok (v3.38)
o IO::Socket::SSL................ok (v2.024)
o Authen::SASL...................ok (v2.16)
o Authen::NTLM...................ok (v1.09)
o ModPerl::Util....................ok (v2.000009)
o Net::DNS.........................ok (v0.81)
o Net::LDAP........................ok (v0.65)
o Template.........................ok (v2.24)
o Template::Stash::XS..............ok (undef)
o Text::CSV_XS.....................ok (v1.21)
o Time::HiRes......................ok (v1.9726)
o XML::LibXML......................ok (v2.0123)
o XML::LibXSLT.....................ok (v1.94)
o XML::Parser......................ok (v2.44)
o YAML::XS.........................ok (v0.41)
useradd -d /opt/otrs -c 'OTRS user' otrs
usermod -G www-data otrs
cd /opt/otrs/Kernel
cp Config.pm.dist Config.pm
nano Config.pm
# The database name
$Self->{Database} = 'otrs_db';
# The database user
$Self->{DatabaseUser} = 'otrs';
# The password of database user. You also can use bin/otrs.Console.pl Maint::Database::PasswordCrypt
# for crypted passwords
$Self->{DatabasePw} = 'password';
nano /opt/otrs/scripts/apache2-perl-startup.pl
use DBD::mysql ();
use Kernel::System::DB::mysql;
/opt/otrs/bin/otrs.SetPermissions.pl --web-group=www-data

Configure Apache for OTRS

Next, you will need to create an Apache virtual host file for OTRS. You can do this by running the following command:

ln -s /opt/otrs/scripts/apache2-httpd.include.conf /etc/apache2/sites-available/otrs.conf
a2ensite otrs
a2enmod headers
a2enmod filter
a2enmod version
a2enmod deflate
systemctl restart apache2

Access OTRS Web Installation Wizard

OTRS is now installed, it’s time to install OTRS through a Web browser.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com