Installing OTRS 5 in CentOS 7

Share

OTRS Intro

As per Wikipedia :

OTRS, an initialism for Open-source Ticket Request System, is a free and open-source trouble ticket system software package that a company, organization, or other entity can use to assign tickets to incoming queries and track further communications about them. It is a means of managing incoming inquiries, complaints, support requests, defect reports, and other communications.

OTRS written in Perl. For web interface it mostly use JavaScript. OTRS is compatible with most popular database system system such as MySQL, PostgreSQL or Oracle. OTRS can be installed in either Linux base server or windows server

For my case I install OTRS in CentOS V7

Update and Upgrade CentOS after a fresh installation

After installing CentOS it is suggested to update and upgrade the OS. Update and upgrade can be done by the following command:

yum update && yum upgrade

Disabling SELinux:

Before start it is required to disable ‘SELinux’. SELinux can be disable from /etc/selinux/config file. To open the file type vi /etc/selinux/config in command line. By default SELINUX is set to enforcing. Set SELinux to disable (SELINUX=disabled) save it and reboot the system. After re-start check whether SELinux is correctly disable type getenforce. If it correctly execute then it should display Disable.

Database for OTRS:

Different database can be used for OTRS system (MySQL, PostgreSQL or Oracle). For my case, i will be using MySQL (Marid DB). To install MySQL (or MariaDB) executing the following command as root user from command line:

yum -y install mariadb-server

For OTRS to work it needs to change some default configuration to change its configuration creat a file in /etc/my.cnf.d/zotrs.cnf and set its with following content

[mysqld]
max_allowed_packet   = 20M
query_cache_size     = 32M
innodb_log_file_size = 256M

Afterwards restart Maria DB and apply the change by

systemctl start mariadb

Afterwards execute the below command to set root password of MySQL

/usr/bin/mysql_secure_installation

If you are doing for the first time and yet to set root password for MySQL then press enter without putting anything. You will be asked to choose a new password and confirm it. Keep it secret. After choosing your root password you will be asked whether you want to remove anonymous user, whether you want to disallow root login remotely, remove test database and access to it and Remove priviledge table. Choose your option wisely.

Installing OTRS:

After database is installed it’s time to install a fresh version of OTRS.

To install OTRS first download latest version of OTRS by the following command

wget http://ftp.otrs.org/pub/otrs/RPMS/rhel/6/otrs-5.x.x-x.noarch.rpm

If wget is not available on your system then install wget by the following command

Yum -y install wget

Please remember in which directory you download the rpm file. To install OTRS execute the following command:

yum install --nogpgcheck otrs-5.0.20-01.noarch.rpm

However, if you install OTRS on Centos or RHEL 7.x  you need to setup EPEL Repo

Install epel using the following command:

yum -y install epel-release
Refresh repo by typing the following command:

yum repolist

After that execute the below command

yum -y install http://download.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-8.noarch.rpm

And then execute the OTRS installation command while you are at the same directory where you download the latest version of OTRS. After basic installation is completed you need to check what module is left to install manually. To check type sudo /opt/otrs/bin/otrs.CheckModules.pl

You can either install required package individually or in a single go. To install all the package in single command execute the below command:

sudo yum install "perl(Apache2::Reload)" "perl(Crypt::Eksblowfish::Bcrypt)" "perl(Encode::HanExtra)" "perl(JSON::XS)" "perl(Mail::IMAPClient)" "perl(ModPerl::Util)" "perl(Text::CSV_XS)" "perl(YAML::XS)"

Configuration of OTRS:

First, we need to restart Apache to load the configuration changes for OTRS. To restart use the below command:

sudo systemctl restart httpd.service

The next step is to configure OTRS using the web installer, To install from web installer type the following url in your browser

http://your_server_ip/otrs/installer.pl

If you are accessing your server remotely then you need to allow http through the firewall. To allow type the below commands

sudo firewall-cmd --permanent --add-port=80/tcp
sudo firewall-cmd --permanent --add-port=443/tcp
sudo firewall-cmd --reload
systemctl restart httpd.service

Be sure that Apache starts at boot:

sudo systemctl enable httpd

Now you should access the site from browser. From browser follow the process as described in this Web Installer section.

Now you can start the OTRS daemon and activate corresponding watchdog cron job (this must be done by the otrs user) :

/opt/otrs/bin/otrs.Daemon.pl start
/opt/otrs/bin/Cron.sh start

 

Leave a Reply

Your email address will not be published. Required fields are marked *