OTRS (Open source TRouble ticket System) is one of the most popular open source software used for help desk and IT Service Management. You can download, install, modify and use OTRS completely free of cost as it is licensed under the Affero General Public License V3 (AGPL). This article helps you with step-by-step instruction on how to install OTRS software on CentOS 7 Operating system.
Step 1: Update your system (optional)
Before you begin, update all installed packages in your system with the latest version available. Login to the system as root user and run the following command:
# yum update -y
Step 2: Setup and configure database
OTRS requires MySQL(or MariaDB), PostgresSQL or Oracle database in the backend. You can install the database in the same machine that runs OTRS or you can install it in a separate database server.
For the purpose of this tutorial we will install MariaDB database which is currently the most popular backend for OTRS installation. Run the following commands to install configure MariaDB database for OTRS.
Install MariaDB database
# yum install mariadb-server -y
vi /etc/my.cnf.d/myotrs.cnf
[root@bindserver ~]# cat /etc/my.cnf.d/myotrs.cnf
[mysqld]
character-set-server = utf8
max_allowed_packet = 64M
query_cache_size = 32M
innodb_log_file_size = 256M
[root@bindserver ~]#
# systemctl enable mariadb
# systemctl start mariadb
setting root password
[root@bindserver ~]# mysql_secure_installation
Step 3: Install and start the web server
OTRS needs Apache2 web server. Below are the commands to install and run Apache2 web server.
# yum install httpd -y
# systemctl enable httpd
# systemctl start httpd
Step 4: Configure firewall to allow webserver traffic
By default CentOS 7 will block all http and https traffic. We need to allow this traffic to be able to access the OTRS website from a remote system. Below are the commands:
# firewall-cmd --add-service=http --permanent
# firewall-cmd --add-service=https --permanent
# systemctl restart firewalld
or
# systemctl stop firewalld
# systemctl enable firewalld
Step 5: Disable SELinux
OTRS won't work if you have SELinux enabled on your system. To check the status of SELinux, run:
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
[root@bindserver ~]#
# sestatus
SELinux status: disabled
Step 6: Download and Install OTRS
Download OTRS rpm file from the OTRS Portal website. Copy it to a suitable folder and the run the following command from that folder location after substituting the RPM file name with the one that you downloaded.
# yum install -y wget otrs.org/pub/otrs/RPMS/rhel/7/otrs-6.0.19-02.noarch.rpm
# yum install otrs*
Step 7: Check and install additional Perl Modules
OTRS requires several Perl Modules which may not already be installed in your system. Run the below command to check which modules need to be installed.
# /opt/otrs/bin/otrs.CheckModules.pl
To install additional packages with yum :
# yum install httpd-devel
# yum install gcc
# yum install perl-YAML
# yum install perl-Encode-devel
# yum install perl-CPAN
You can install the missing Perl Modules using CPAN :
# perl -MCPAN -e shell;
cpan[1]> install YAML::XS
cpan[2]> install Text::CSV_XS
cpan[3]> install ModPerl::Util
cpan[4]> install Authen::NTLM
cpan[5]> install Mail::IMAPClient
cpan[6]> install JSON::XS
cpan[7]> install Encode::HanExtra
cpan[8]> install DBD::mysql
cpan[9]> install Crypt::Eksblowfish::Bcrypt
Finally you can check if all necessary modules are installed using the commands below:
# perl -cw /opt/otrs/bin/cgi-bin/installer.pl
/opt/otrs/bin/cgi-bin/installer.pl syntax OK
# perl -cw /opt/otrs/bin/cgi-bin/index.pl
/opt/otrs/bin/cgi-bin/index.pl syntax OK
# perl -cw /opt/otrs/bin/cgi-bin/customer.pl
/opt/otrs/bin/cgi-bin/customer.pl syntax OK
# perl -cw /opt/otrs/bin/otrs.Console.pl
/opt/otrs/bin/otrs.Console.pl syntax OK
Step 8: Setup and Configure OTRS
After the installation of the OTRS software and all the required modules are complete, you can start configuring OTRS database, email and other settings using the web installer. To start the web installer, open the below URL in a web browser:
Click Next on the Welcome screen.
In the database settings screen select Type → MySQL and Install Type → Create a new database for OTRS.
Enter the Database Credentials and click Check Database settings and you should see the message Database check successful.
Now you can enter a name for the OTRS database, database user name and password, then click Next.
Configure MySQL
Configure MySQL
Click Next when the database creation is completed.
Create Database
Create Database
In the System settings screen enter your Company name, email, language etc., and click Next.
System Settings
System Settings
The next screen allows you to configure Mail server settings. Input you mail server details and click Check Mail Configuration. You may skip this step for now if you haven't setup your mail server yet.
Mail Configuration
Mail Configuration
That's it!!..Your installation is now complete. Take note of the auto generated password for super user account root@localhost
Setup Completed
Setup Completed
Step 9: Start OTRS daemon and watchdog
Login as otrs user and start the daemon and watchdog.
# su - otrs
# /opt/otrs/bin/otrs.Daemon.pl start
# /opt/otrs/bin/Cron.sh start
Step 10: Install OTRS ITSM
OTRS ITSM is an open source ITIL compliant IT Service management solution that is built on top of OTRS core framework that consists of the ticketing system. There are different modules with in ITSM such as Incident managent, service level management and change and configuration management. You can install these modules seperately by signing in as an administrator and click on Admin tab then select Package Manager under System Administration section.
Package Manager
OTRS Package Manager
You can install the ITSM packages from the online repository or download the packages from the OTRS Portal then click Browse to select the downloaded package (.opm) file and click Install Pacakge.
First of all you should install the GeneralCatalog package and then the ITSMCore package before installing any ITSM module that you need.
What next?
Open a web browser and go to the URL:
Login using username root@localhost and the password that you saved earlier. You can then start customizing OTRS to suit your requirements. Enjoy!!
No comments:
Post a Comment