How to Install ((OTRS)) Community Edition Ticketing System on Alma Linux 8

OTRS ((Community Edition)) stands for "Open Source Trouble Ticket System" is a free and open-source service management suite. It is one of the most popular ticketing tools used by help desks, call centers, and IT service management teams. It is written in the PERL programming language and uses MariaDB as a database backend. OTRS ((Community Edition)) is made from three components including, an admin dashboard, agent portal, and customer portal. It has intuitive mechanisms that allow you to easily migrate from popular solutions to OTRS ((Community Edition)).

In this post, we will show you how to install OTRS ((Community Edition)) Community Edition Ticketing Software on Alma Linux 8.

Prerequisites

  • A server running Alma Linux 8.
  • A root password is configured on the server.

Install Required Dependency

Before starting, you will need to install the EPEL repo and other dependencies to your server.

First, install the EPEL repo and enable the Powertools repo with the following command:

dnf install epel-release -y 
dnf config-manager --set-enabled powertools

Next, install other required dependencies with the following command:

dnf install gcc expat-devel procmail mod_perl perl perl-core sharutils -y

Once all the dependencies are installed, you can proceed to the next step.

Install Apache and MariaDB

Next, you will need to install the Apache webserver and MariaDB database server to your system. You can install both with the following command:

dnf install httpd mariadb-server -y

After the successfull installation, start and enable Apache and MariaDB service with the following command:

systemctl start httpd mariadb
systemctl enable httpd mariadb

Once you are finished, you can proceed to the next step.

Create Database for OTRS

First, you will need to secure the MariaDB installation and set the root password. You can do it with the following command:

mysql_secure_installation

Answer all the questions as shown below:

Enter current password for root (enter for none): 
Set root password? [Y/n] Y
New password: 
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y

Once the MariaDB is secured, log into the MariaDB shell with the following command:

mysql -u root -p

Once you are log in, create a database and user for OTRS with the following command:

MariaDB [(none)]> CREATE DATABASE otrs character set UTF8 collate utf8_bin;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON otrs.* TO 'otrs'@'localhost' IDENTIFIED BY 'password';

Next, flush the privileges and exit from the MariaDB shell with the following command:

MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;

Next, edit the MariaDB configuration file with the following command:

nano /etc/my.cnf.d/mariadb-server.cnf

Add the following lines below [mysqld] section:

max_allowed_packet=256M
character-set-server=utf8
collation-server=utf8_general_ci
innodb_buffer_pool_size=4G
innodb_log_file_size=1G

Save and close the file then restart the MariaDB service to apply the changes:

systemctl restart mariadb

Once you are finished, you can proceed to the next step.

Install OTRS

First, create a dadicated user for OTRS using the following command:

useradd otrs

Next, add the OTRS user to Apache group using the following command:

usermod -G apache otrs

Next, download the latest version of OTRS using the following command:

wget https://otrscommunityedition.com/download/otrs-community-edition-6.0.33.zip

Once the download is completed, unzip the downloaded file with the following command:

unzip otrs-community-edition-6.0.33.zip

Next, move the extracted directory to /opt with the following command:

mv otrs-community-edition-6.0.33 /opt/otrs

Next, check all Perl modules required for OTRS with the following command:

perl /opt/otrs/bin/otrs.CheckModules.pl

Read the generated output and install all required Perl modules using the following command:

cpan Date::Format
cpan DateTime
cpan DateTime::TimeZone
cpan Mail::IMAPClient
cpan Moo
cpan Net::DNS
cpan Template
cpan Template::Stash::XS
cpan XML::LibXML
cpan YAML::XS

Configure OTRS

Next, you will need to define your database settings in the OTRS configuration file. First, rename the configuration file with the following command:

cp /opt/otrs/Kernel/Config.pm.dist /opt/otrs/Kernel/Config.pm

Next, edit the configuration file with the following command:

nano /opt/otrs/Kernel/Config.pm

Define your database settings as shown below:

# The database name
$Self->{Database} = 'otrs';

# 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';

Save and close the file then edit the Apache perl configuration file and define the name of your database:

nano /opt/otrs/scripts/apache2-perl-startup.pl

Uncomment the following lines:

use DBD::mysql ();
use Kernel::System::DB::mysql;

Save and close the file then verify all configuration file for any syntax error with the following command:

perl -cw /opt/otrs/bin/cgi-bin/index.pl
perl -cw /opt/otrs/bin/cgi-bin/customer.pl
perl -cw /opt/otrs/bin/otrs.Console.pl

Next, set proper permissions using the following command:

/opt/otrs/bin/otrs.SetPermissions.pl

Configure Apache for OTRS

OTRS provide an Apache configuration file to access it over the internet. You can copy it to the Apache configuration directory using the following command:

ln -s /opt/otrs/scripts/apache2-httpd.include.conf /etc/httpd/conf.d/otrs.conf

Next, restart the Apache service to apply the changes:

systemctl restart httpd

You can also check the Apache status using the following command:

systemctl status httpd

You will get the following output:

? httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
   Active: active (running) since Sat 2022-02-19 08:11:23 UTC; 8min ago
     Docs: man:httpd.service(8)
 Main PID: 39353 (/usr/sbin/httpd)
   Status: "Total requests: 113; Idle/Busy workers 100/0;Requests/sec: 0.236; Bytes served/sec: 2.9KB/sec"
    Tasks: 278 (limit: 23696)
   Memory: 577.3M
   CGroup: /system.slice/httpd.service
           ??39353 /usr/sbin/httpd -DFOREGROUND
           ??39492 /usr/sbin/httpd -DFOREGROUND
           ??39493 /usr/sbin/httpd -DFOREGROUND
           ??39494 /usr/sbin/httpd -DFOREGROUND
           ??39496 /usr/sbin/httpd -DFOREGROUND
           ??39722 /usr/sbin/httpd -DFOREGROUND

Next, start the OTRS daemon with the following command:

sudo -u otrs /opt/otrs/bin/otrs.Daemon.pl start

You will get the following output:

Manage the OTRS daemon process.

Daemon started

Access OTRS Web Installer

Now, open your web browser and access the OTRS web installation wizard using the URL http://you-server-ip-address/otrs/installer.pl. You should see the following page:

Click on the Next button. You should see the License term page.

Click on the Accept license and continue button. You will get the database selection page:

Select MySQL and click on the Next button. You should see the database configuration page:

Provide your database information and click on the Check database settings. Once the database connection is successful. You should see the following page:

Click on the Next button. You should see the following page:

Click on the Next button. You should see the system setting page:

Provide all required information and click on the Next button. You should see the email configuration page:

Click on the skip this step. You should see the following page:

Now, click on the start page URL. You will be redirected to the OTRS login page:

Provide your login credentials and click on the Login button. You should see the OTRS dashboard on the following page:

Conclusion

Congratulations! you have successfully installed OTRS ((Community Edition)) on Alma Linux 8. You can now implement OTRS ((Community Edition)) in your organization and start using it as a ticketing tool. Feel free to ask me if you have any questions.

Share this page:

Suggested articles

1 Comment(s)

Add comment

Comments

By: Bernd Maus at: 2022-03-02 08:29:28

Hello,can you please change the wotrding from "OTRS" to "((OTRS)) Communty Edition", as this is the software version you are talking about. OTRS is exklusivly distributet by the OTRS  Group. Please check otrs.com for further infos and https://otrs.com/services/faq/otrs-community-edition/ for details about the difference between OTRS and ((OTRS)) Community Edition.Kind regards Bernd