How to Install and Configure OTRS on Ubuntu 16.04

Requirements

Launch Alibaba Cloud ECS Instance

apt-get update -y

Install LAMP Server

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

Configure MariaDB

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

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

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

--

--

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