Install OTRS on CentOS
Install OTRS on CentOS in less than 20 min. In this tutorial you will learn how.
OTRS is an Open source Ticket Request System. It provides a single platform of contact for users, customers, IT personnel and IT services OTRS is written in Perl, supports a variety of databases (MariaDB, PostgreSQL, Oracle, and more…), and can integrate with LDAP directories and Google Authentication.
A CentOS 7 minimal installation fully working and a user with root permissions.
Step 1 — Prepare you server.
1.1 – Install basic packages
Install administration utilities using the following command:
yum install -y wget vim-enhanced htop tmpwatch mailx telnet unzip
1.2 – Install and configure additional repositories
Add rpmforge repositories.
rpm -ivh http://repository.it4i.cz/mirrors/repoforge/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
Edit the CentOS-Base.repo file and change centosplus to enabled =0 to 1
Add epel repositories.
rpm -Uvh http://espejos.ucr.ac.cr/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
1.3 – Update your system.
1.4 – Install administration utilities
yum install -y bash-completion net-tools
1.5 – Install MariaDB
Install MariaDB, start it and enabled for automatic start after of reboot your system.
yum install -y mariadb-server systemctl start mariadb systemctl enable mariadb.service
1.6 – Install apache
Install apache, start it and enabled for automatic start after of reboot your system.
yum install -y httpd mod_ssl systemctl start httpd systemctl enable httpd.service
1.7 – Disable SELINUX
Since the use of SELINUX is very intrusive in the operating system and can present complications to the correct operation of some services it has to be disabled. To disable SELINUX, perform the following:
Edit SELINUX config file and change SELINUX=enforcing to disabled
vim /etc/selinux/config setenforce 0
Yes! yes! I know it is not the most elegant but it works!!
And reboot your system.
shutdown -r now
Step 2 – Install and configure OTRS
2.1 – Configure MariaDB
Set a password for root user.
keep this password safe you will need it later
Edit the configuration file to allow larger sized packages.
Add this lines inside [mysqld] section:
systemctl restart mariadb
If the start fails (and I can assure you that it will fail) perform the folowing commands: BE EXTREMELY CAREFUL HERE
rm -f /var/lib/mysql/ibdata* rm -f /var/lib/mysql/ib_logfile*
And now start MariaDB service.
systemctl start mariadb
2.2 – Download OTRS
Download the latest version of OTRS, you can check it here:
In this case OTRS 6.0.17
2.3 – Install OTRS
rpm -ivh otrs-6.0.17-01.noarch.rpm
This will display a list of missing dependencies is highly recommended install then all before continue.
error: Failed dependencies:
perl(Archive::Zip) is needed by otrs-6.0.17-01.noarch
perl(Crypt::SSLeay) is needed by otrs-6.0.17-01.noarch
perl(Date::Format) is needed by otrs-6.0.17-01.noarch
perl(DateTime) is needed by otrs-6.0.17-01.noarch
perl(IO::Socket::SSL) is needed by otrs-6.0.17-01.noarch
perl(LWP::UserAgent) is needed by otrs-6.0.17-01.noarch
perl(Net::DNS) is needed by otrs-6.0.17-01.noarch
perl(Net::LDAP) is needed by otrs-6.0.17-01.noarch
perl(Template) is needed by otrs-6.0.17-01.noarch
perl(URI) is needed by otrs-6.0.17-01.noarch
perl(XML::LibXML) is needed by otrs-6.0.17-01.noarch
perl(XML::LibXSLT) is needed by otrs-6.0.17-01.noarch
perl(XML::Parser) is needed by otrs-6.0.17-01.noarch
perl-core is needed by otrs-6.0.17-01.noarch
procmail is needed by otrs-6.0.17-01.noarch
In this particular example (OTRS 6.0.17-01) do the following
yum install -y "perl(Archive::Zip)" "perl(Crypt::SSLeay)" "perl(Date::Format)" "perl(IO::Socket::SSL)" "perl(LWP::UserAgent)" "perl(Net::DNS)" "perl(Net::LDAP)" "perl(Template)" "perl(URI)" "perl(XML::LibXML)" "perl(XML::LibXSLT)" "perl(XML::Parser)" perl-core procmail "perl(DateTime)"
Once OTRS is installed on your server go to this directory
And perform the following command
This will show you all the missing modules and how to install then, some of then are recomendable for correct function of the system so please install then.
yum install -y "perl(Mail::IMAPClient)" "perl(ModPerl::Util)" "perl(Text::CSV_XS)" "perl(YAML::XS)" "perl(JSON::XS)" "perl(Crypt::Eksblowfish::Bcrypt)"
systemctl restart httpd
2.4 – Configure OTRS
Once the process is completed you can go to your browser enter the URL and perform the configuration.
Once the configuration is complete come back to your server and start the OTRS deamons doing the following:
su otrs /opt/otrs/bin/otrs.Daemon.pl start /opt/otrs/bin/Cron.sh start
So that it!!! enjoy OTRS 🙂
This article is free and open source. You have permission to republish it under a Creative Commons license with attribution to the author and Teknixx.com