Installing the ((OTRS)) Community Edition 5s on CentOS 7 Minimal with Apache and MariaDB
This article is an update of another post that already taught how to perform the installation of ((OTRS)) Community Edition 5 on CentOS 7. As the post was written over a year ago, I decided to redo it based on ((OTRS)) Community Edition 5s, which in short, is a patch release of ((OTRS)) Community Edition 5 with a series of improvements.
I also focused on performing the installation in the CentOS Minimal, which lighter and faster. Let's go, then!
Preparing the CentOS
a) Apache Setup
Execute the commands below:
sudo yum -y install epel-release sudo yum -y install httpd mod_perl
Now we're gonna enable the automatic startup of Apache:
sudo /sbin/chkconfig httpd on sudo service httpd start sudo firewall-cmd --zone=public --add-port=80/tcp --permanent sudo firewall-cmd --reload
b) MariaDB Setup
CentOS 7, by default, comes with the MariaDB database installed, a fork of MySQL.
Execute the commands below to install it:
sudo yum -y install mariadb mariadb-server
sudo /sbin/chkconfig mariadb on
sudo service mariadb start
sudo mysql_secure_installation
Will be asked the root password of MariaDB, just press Enter because at this moment, there is no keyword.
The system ask if you wish to change the root password, press Y:
Set root password? [Y/n]
Type the new password and confirm it.
Now, confirm all the actions below, just pressing Enter:
Remove anonymous users? [Y/n] (Enter)
Disallow root login remotely? [Y/n] (Enter)
Remove test database and access to it? [Y/n](Enter)
Reload privilege tables now? [Y/n](Enter)
Now we should change some parameters of MariaDB, which is recommended by the ((OTRS)) Community Edition. Edit the file /etc/my.cnf
sudo vi /etc/my.cnf
Press "i" and put the following content after the line "[mysqld]":
max_allowed_packet = 20M query_cache_size = 32M innodb_log_file_size = 256M
Record the changes by pressing "ESC" and the typing ":w" (without quotation marks) and pressing Enter. Exit from VIM by typing ":q" (without quotation marks) and pressing Enter.
Finally, restart MariaDB with the commands below:
sudo service mariadb stop
sudo rm /var/lib/mysql/ib_logfile0
sudo rm /var/lib/mysql/ib_logfile1
sudo service mariadb start
((OTRS)) Community Edition Setup
a) Downloading ((OTRS)) Community Edition
First, install wget and bzip2 with the command:
sudo yum -y install wget bzip2
Go the folder /opt:
cd /opt
sudo wget https://ftp.otrs.org/pub/otrs/otrs-latest-5.0.tar.gz
Hint for anyone using Windows: You can paste URL or any command in putty by right-clicking on the screen.
Now, let's extract the file with the following command:
sudo tar zxvpf otrs-latest-5.0.tar.gz sudo mv otrs-5.0.XX otrs
Note: change the XX above for the number of the most recent version of ((OTRS)) Community Edition which was extracted.
b) Creating the ((OTRS)) Community Edition User
Execute the commands below to create the ((OTRS)) Community Edition user, and add it to the Apache group:
sudo useradd -d /opt/otrs/ -c 'OTRS user' otrs sudo usermod -G apache otrs
c) Installing Perl Modules
The ((OTRS)) Community Edition demands from the system some Perl modules which don't come with CentOS by default. So, let's install them executing the following commands:
sudo yum -y install "perl(ExtUtils::MakeMaker)" "perl(Sys::Syslog)" "perl(Authen::NTLM)" sudo yum -y install "perl(Archive::Tar)" "perl(Archive::Zip)" "perl(Crypt::Eksblowfish::Bcrypt)" "perl(Crypt::SSLeay)" "perl(Date::Format)" "perl(DBD::Pg)" "perl(Encode::HanExtra)" "perl(IO::Socket::SSL)" "perl(JSON::XS)" "perl(Mail::IMAPClient)" "perl(IO::Socket::SSL)" "perl(ModPerl::Util)" "perl(Net::DNS)" "perl(Net::LDAP)" "perl(Template)" "perl(Template::Stash::XS)" "perl(Text::CSV_XS)" "perl(Time::Piece)" "perl(XML::LibXML)" "perl(XML::LibXSLT)" "perl(XML::Parser)" "perl(YAML::XS)" sudo yum -y install "perl(Crypt::Eksblowfish::Bcrypt)" "perl(Encode::HanExtra)" "perl(JSON::XS)" "perl(JSON::XS)" "perl(Mail::IMAPClient)" "perl(ModPerl::Util)" "perl(YAML::XS)"
d) Activating the default configuration file
Execute the following commands:
sudo -i cd /opt/otrs/ cp Kernel/Config.pm.dist Kernel/Config.pm ln -s /opt/otrs/scripts/apache2-httpd.include.conf /etc/httpd/conf.d/zzz_otrs.conf /opt/otrs/bin/otrs.SetPermissions.pl --web-group=apache systemctl restart httpd.service
e) Disabling SELinux
To disable SELinux temporarily, execute the following command:
setenforce 0
You will also need to permanently deactivate it, edit the file /etc/selinux/config
vi /etc/selinux/config
and change the parameter
SELINUX=enforcing
to
SELINUX=disabled
Hint: If you have never used the "VI", press the "i" button to enter edit mode and, when you are finished, press "ESC", type ":x" and press "enter" to save the file. Then type ":q" and "Enter" to exit the VI
f) Accessing the WEB Installer
Access the URL of your installation that is the IP of your virtual server plus the URL "/otrs/installer.pl". See below:
In the screen above, click Next to go to the screen that displays ((OTRS)) Community Edition License. If you agree, click "Accept License and Continue":
On the next screen, click "Next" to create a MySQL (MariaDB) database:
Insert the root password and click "Verify Configuration Database":
If all is correct, you will see the following screen, click Next:
If all happened well, you'll see a "success" warning. Click Next:
Fill the following screen with the administrator's email and your organization's name and click Next:
The next screen concerns the configuration of sending and receiving emails from the system. I suggest you skip this step. We have a specific manual on this item that can be configured later.
Done this, the setup is complete. Note the password generated for the user root@localhost of ((OTRS)) Community Edition and click on the link displayed to access the ((OTRS)) Community Edition for the first time:
Login for the first time:
If all gone all right, you'll see the main screen of the Agent:
g) Configuring the ((OTRS)) Community Edition Daemon
Now that we have the database configure, we're gonna to the last part of the setup, which is the enabling of the new ((OTRS)) Community Edition Daemon.
In the command line, execute:
sudo cp /opt/otrs/var/cron/otrs_daemon.dist /opt/otrs/var/cron/otrs_daemon sudo /opt/otrs/bin/Cron.sh start otrs
With this, we conclude the ((OTRS)) Community Edition 5s in CentOS 7 Minimal, using the MariaDB database and the page server Apache.
Comments
No comment yet.