OTRS 5 - CentOS7 - Setup\DB question

Moderator: crythias

Locked
Ralph
Znuny newbie
Posts: 40
Joined: 17 Jun 2015, 13:40
Znuny Version: 3.3.9 (win)

OTRS 5 - CentOS7 - Setup\DB question

Post by Ralph »

Hello,

I've installed a new CentOS 7 server with OTRS 5 following these manuals:
https://huntingbears.nl/2014/12/11/how- ... -centos-7/
http://otrs.github.io/doc/manual/admin/ ... aller.html

Now I got to step 2 of the web installation where you have to enter your DB information. Here I choose for MySQL > New DB, however in the next section I have to fill in the User\Pwd\Address for the DB and here I feel I am missing something in the manuals.

When I fill in my linux root account info and 127.0.0.1 as address it gives me the error:
Result of database check. Can't connect to database, Perl module DBD::mysql not installed!
I can kind of understand this because I believe I still need to configure a DB and maybe a DB account, however I am new to Linux and databases.

In one point of the installer it tells me to make:
/etc/my.cnf.d/otrs.cnf which contains specific settings in order to make OTRS happy. The contents of this file is:
[server]
max_allowed_packet=20M
query_cache_size=32M
How does MariaDB know how to use this file?

How do I get the DB part up and running, I guess I still need an account to continue the web setup (looking at the manual you can setup a specific DB account + create a DB later)? And maybe the DB service isn't properly running?

I hope someone wants to help me out a bit more on this and that it's clear what kind of knowledge I am missing right now.
Sayannara
Znuny advanced
Posts: 118
Joined: 22 May 2012, 12:37
Znuny Version: OTRS 7.06
Real Name: Yann
Company: FVE
Contact:

Re: OTRS 5 - CentOS7 - Setup\DB question

Post by Sayannara »

Code: Select all

Perl module DBD::mysql not installed!
figure out how to install that. This is the module needed with mysql/mariaDB.

Also use /opt/otrs/bin/otrs.CheckModules.pl
Centos 7 / OTRS::ITSM 6 Business Solutions / MariaDB / Apache
root
Administrator
Posts: 4237
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: OTRS 5 - CentOS7 - Setup\DB question

Post by root »

yum install perl-DBD-MySQL
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
Giulio Soleni
Znuny wizard
Posts: 392
Joined: 30 Dec 2010, 14:35
Znuny Version: 6.0.x and 5.0.x
Real Name: Giulio Soleni
Company: IKS srl

Re: OTRS 5 - CentOS7 - Setup\DB question

Post by Giulio Soleni »

Hi, this is the procedure that I normally follow to setup OTRS 5 on CentOS 7 starting from a minimal OS provisioning:

* PROVIDE SUPPORT FOR ifconfig
yum install net-tools

* PROVIDE SUPPORT FOR wget
yum install wget

* PROVIDE SUPPORT FOR procmail
yum install procmail

* PROVIDE SUPPORT FOR perl
yum install perl-core

* DISABLE AND STOP FIREWALL
systemctl mask firewalld
systemctl stop firewalld
systemctl disable firewalld
(otherwise you should take care to add a rule to the firewall to allow access to the web server... if that's an internal LAN server - as I hope - its private firewall could be safely disabled)

* DISABLE SELINUX
vi /etc/selinux/config
set the internal variable:
SELINUX=disabled
(or permissive as suggested in the blog of Michiel Beijen)

I suggest a reboot at this time

* SETUP NTPD
yum install ntp
systemctl enable ntpd
ntpdate pool.ntp.org or internal ntp server (e.g. time.yourdomain.org)
systemctl start ntpd
systemctl status ntpd

* SETUP APACHE
yum install httpd httpd-devel
systemctl enable httpd.service
systemctl restart httpd.service

* SETUP MARIADB
yum install mariadb-server mariadb-devel
systemctl start mariadb.service
systemctl enable mariadb.service
on the next command say Yes to all and set root sql password
/usr/bin/mysql_secure_installation
# vi /etc/my.cnf
(otherwise you may follow the steps suggested by Michiel Beijen and define a new /etc/my.cnf.d/otrs.cnf file... I personally prefer editing /etc/my.cnf and keep all the db configuration on a single file)
under [mysqld] section set the following:
# EDIT REQUIRED BY OTRS
max_allowed_packet=20M
query_cache_size=32M
innodb_log_file_size=256M

systemctl restart mariadb.service

if it fails delete both ib_logfile0 and ib_logfile1 in /var/lib/mysql and then restart mariadb service again

* PERFORM AN OS UPDATE
yum update

* INSTALL MINIMUM SET OF REQUIRED PERL PACKAGES
yum install "bash-completion"
yum install "perl(Archive::Zip)"
yum install "perl(Crypt::SSLeay)"
yum install "perl(Date::Format)"
yum install "perl(IO::Socket::SSL)"
yum install "perl(LWP::UserAgent)"
yum install "perl(Net::DNS)"
yum install "perl(Net::LDAP)"
yum install "perl(Template)"
yum install "perl(URI)" ( should be already installed with "perl(LWP::UserAgent)" )
yum install "perl(XML::LibXML)" ( should be already installed with "perl(Template)" )
yum install "perl(XML::LibXSLT)"

* CLEAN YUM CACHES
yum clean all

* INSTALL EPEL RELEASE 7 REPO
wget http://ftp-stud.hs-esslingen.de/pub/epe ... noarch.rpm
wget http://ftp-stud.hs-esslingen.de/pub/epe ... KEY-EPEL-7
mv RPM-GPG-KEY-EPEL-7 /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
yum install epel-release-7-5.noarch.rpm

* INSTALL OTRS
locally download the last available version of OTRS from http://ftp.otrs.org/pub/otrs/RPMS/rhel/7/ and then install it with yum
yum --nogpgcheck localinstall otrs-5.0.4-01.noarch.rpm (or the last available OTRS 5 release of course)

* CHECK OTHER STRONGLY SUGGESTED PERL MODULES
/opt/otrs/bin/otrs.CheckModules.pl
(many of the following are released by EPEL repository)
yum install "perl(YAML::XS)"
yum install "perl(Apache2::Reload)"
yum install "perl(Crypt::Eksblowfish::Bcrypt)"
yum install "perl(JSON::XS)"
yum install "perl(Mail::IMAPClient)"
yum install "perl(Text::CSV_XS)"

* FIRST START
systemctl restart httpd.service
su -c "/opt/otrs/bin/otrs.Daemon.pl start" -s /bin/bash otrs
su -c "/opt/otrs/bin/Cron.sh start" -s /bin/bash otrs

* WEB POST INSTALLATION CONFIGURATION
from a web browser
http://otrsserver.mydomain.local/otrs/installer.pl

continue with the steps you already mentioned here: http://otrs.github.io/doc/manual/admin/ ... aller.html
OTRS 6.0.x on CentOS 7.x with MariaDB 10.2.x database connected to an Active Directory for Agents and Customers.
ITSM and FAQ modules installed.
root
Administrator
Posts: 4237
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: OTRS 5 - CentOS7 - Setup\DB question

Post by root »

Small hint: did you ever tried?

Code: Select all

yum install epel-release
There's no need to download the epel repo from anywhere.
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
Ralph
Znuny newbie
Posts: 40
Joined: 17 Jun 2015, 13:40
Znuny Version: 3.3.9 (win)

Re: OTRS 5 - CentOS7 - Setup\DB question

Post by Ralph »

Giulio Soleni wrote:Hi, this is the procedure that I normally follow to setup OTRS 5 on CentOS 7 starting from a minimal OS provisioning:

* PROVIDE SUPPORT FOR ifconfig
yum install net-tools

* PROVIDE SUPPORT FOR wget
yum install wget

* PROVIDE SUPPORT FOR procmail
yum install procmail

* PROVIDE SUPPORT FOR perl
yum install perl-core

* DISABLE AND STOP FIREWALL
systemctl mask firewalld
systemctl stop firewalld
systemctl disable firewalld
(otherwise you should take care to add a rule to the firewall to allow access to the web server... if that's an internal LAN server - as I hope - its private firewall could be safely disabled)

* DISABLE SELINUX
vi /etc/selinux/config
set the internal variable:
SELINUX=disabled
(or permissive as suggested in the blog of Michiel Beijen)

I suggest a reboot at this time

* SETUP NTPD
yum install ntp
systemctl enable ntpd
ntpdate pool.ntp.org or internal ntp server (e.g. time.yourdomain.org)
systemctl start ntpd
systemctl status ntpd

* SETUP APACHE
yum install httpd httpd-devel
systemctl enable httpd.service
systemctl restart httpd.service

* SETUP MARIADB
yum install mariadb-server mariadb-devel
systemctl start mariadb.service
systemctl enable mariadb.service
on the next command say Yes to all and set root sql password
/usr/bin/mysql_secure_installation
# vi /etc/my.cnf
(otherwise you may follow the steps suggested by Michiel Beijen and define a new /etc/my.cnf.d/otrs.cnf file... I personally prefer editing /etc/my.cnf and keep all the db configuration on a single file)
under [mysqld] section set the following:
# EDIT REQUIRED BY OTRS
max_allowed_packet=20M
query_cache_size=32M
innodb_log_file_size=256M

systemctl restart mariadb.service

if it fails delete both ib_logfile0 and ib_logfile1 in /var/lib/mysql and then restart mariadb service again

* PERFORM AN OS UPDATE
yum update

* INSTALL MINIMUM SET OF REQUIRED PERL PACKAGES
yum install "bash-completion"
yum install "perl(Archive::Zip)"
yum install "perl(Crypt::SSLeay)"
yum install "perl(Date::Format)"
yum install "perl(IO::Socket::SSL)"
yum install "perl(LWP::UserAgent)"
yum install "perl(Net::DNS)"
yum install "perl(Net::LDAP)"
yum install "perl(Template)"
yum install "perl(URI)" ( should be already installed with "perl(LWP::UserAgent)" )
yum install "perl(XML::LibXML)" ( should be already installed with "perl(Template)" )
yum install "perl(XML::LibXSLT)"

* CLEAN YUM CACHES
yum clean all

* INSTALL EPEL RELEASE 7 REPO
wget http://ftp-stud.hs-esslingen.de/pub/epe ... noarch.rpm
wget http://ftp-stud.hs-esslingen.de/pub/epe ... KEY-EPEL-7
mv RPM-GPG-KEY-EPEL-7 /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
yum install epel-release-7-5.noarch.rpm

* INSTALL OTRS
locally download the last available version of OTRS from http://ftp.otrs.org/pub/otrs/RPMS/rhel/7/ and then install it with yum
yum --nogpgcheck localinstall otrs-5.0.4-01.noarch.rpm (or the last available OTRS 5 release of course)

* CHECK OTHER STRONGLY SUGGESTED PERL MODULES
/opt/otrs/bin/otrs.CheckModules.pl
(many of the following are released by EPEL repository)
yum install "perl(YAML::XS)"
yum install "perl(Apache2::Reload)"
yum install "perl(Crypt::Eksblowfish::Bcrypt)"
yum install "perl(JSON::XS)"
yum install "perl(Mail::IMAPClient)"
yum install "perl(Text::CSV_XS)"

* FIRST START
systemctl restart httpd.service
su -c "/opt/otrs/bin/otrs.Daemon.pl start" -s /bin/bash otrs
su -c "/opt/otrs/bin/Cron.sh start" -s /bin/bash otrs

* WEB POST INSTALLATION CONFIGURATION
from a web browser
http://otrsserver.mydomain.local/otrs/installer.pl

continue with the steps you already mentioned here: http://otrs.github.io/doc/manual/admin/ ... aller.html
Thanks allot! All up and running now. Kudos to you sir!

@Root, thanks for the hint. Installed that part with the single command.
Locked