웹사이트 검색

CentOS 7에 OTRS(OpenSource Trouble Ticket System)를 설치하는 방법


이 페이지에서

  1. 환경\n
  2. 준비
  3. Centos 7에 MariaDB 설치
  4. EPEL 설치
  5. OTRS 설치
  6. CentOS 7에서 OTRS 구성

OTRS(오픈 소스 문제 티켓 시스템 소프트웨어)는 고객 지원, 헬프 데스크, 콜 센터 등과 관련된 운영을 개선하기 위해 회사에서 사용하는 정교한 오픈 소스 소프트웨어입니다. OTRS는 PERL로 작성되었으며 다음과 같은 중요한 기능을 제공합니다.

  • 고객은 각 대기열(참석자/기술자 우체통)에서 고객 포털과 이메일, 전화 및 팩스를 통해 티켓을 등록하고 생성/상호작용할 수 있습니다.\n
  • 티켓은 우선 순위, 할당, 전송 및 후속 조치로 관리할 수 있습니다. 티켓을 분할, 병합할 수 있고 대량 작업을 적용할 수 있으며 서로 링크 및 알림을 설정할 수 있습니다. 서비스는 서비스 카탈로그를 통해 구성할 수 있습니다.\n
  • 팀 용량을 늘리기 위해 자동 이메일(자동 응답), 텍스트 템플릿 및 서명을 구성할 수 있습니다. 시스템은 티켓에 대한 메모 및 첨부 파일을 지원합니다.\n
  • 기타 기능에는 통계 및 보고서(CSV/PDF), SLA 및 기타 여러 기능이 포함됩니다.\n

환경

이 문서에서는 OTRS 5 설치 및 기본 구성에 대해 설명합니다. 이 문서는 CENTOS 7 Minimal, 2GB RAM, 8GB HD 및 2개의 네트워크 인터페이스(호스트 전용 및 NAT)가 있는 Virtual Box VM 환경을 기반으로 작성되었습니다.

준비

OTRS를 설치하기 전에 Centos 7 Minimal을 새로 설치했다고 가정하고 다음 명령을 실행하여 시스템을 업데이트하고 추가 패키지를 설치합니다.

yum update
Transaction Summary ================================================================================ Install 1 Package Upgrade 39 Packages Total download size: 91 M Is this ok [y/d/N]: y

텍스트 편집기를 설치하거나 VI를 사용하십시오. 이 문서에서는 VIM을 사용하고 다음 명령을 실행하여 설치합니다.

yum install vim

WGET 패키지를 설치하려면 다음 명령을 실행합니다.

yum install wget

Centos 7 네트워크를 구성하려면 다음 명령을 실행하여 NMTUI(Network Manager Text User Interface) 도구를 열고 필요한 경우 인터페이스와 호스트 이름을 편집합니다.

nmtui

CentOS 7에서 네트워크 설정 및 호스트 이름을 설정한 후 다음 명령을 실행하여 변경 사항을 적용합니다.

service networks restart

네트워크 정보를 확인하려면 다음 명령을 실행합니다.

ip addr

출력은 내 시스템에서 다음과 같습니다.

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 08:00:27:67:bc:73 brd ff:ff:ff:ff:ff:ff
    inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic enp0s3
       valid_lft 84631sec preferred_lft 84631sec
    inet6 fe80::9e25:c982:1091:90eb/64 scope link 
       valid_lft forever preferred_lft forever
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 08:00:27:68:88:f3 brd ff:ff:ff:ff:ff:ff
    inet 192.168.56.101/24 brd 192.168.56.255 scope global dynamic enp0s8
       valid_lft 1044sec preferred_lft 1044sec
    inet6 fe80::a00:27ff:fe68:88f3/64 scope link 
       valid_lft forever preferred_lft forever 

Centos 7에서 SELINUX(Security Enhanced Linux)를 비활성화하고 다음 구성 파일을 편집합니다.

vim /etc/selinux/config
"/etc/selinux/config" 14L, 547C# 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=enforcing
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are prootected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted  

지시어 SELINUX의 적용 값을 비활성화로 변경하고 파일을 저장한 다음 서버를 재부팅합니다.

Centos 7에서 SELinux의 상태를 확인하려면 다음 명령을 실행하십시오.

getenforce

출력은 다음과 같아야 합니다.

Disabled

Centos 7에 MariaDB 설치

Centos 7에 MariaDB를 설치하려면 다음 명령을 실행합니다.

yum -y install mariadb-server

다음 디렉터리에 zotrs.cnf라는 이름으로 파일을 만듭니다.

/etc/my.cnf.d/

파일을 만들고 편집하려면 다음 명령을 실행합니다.

vim /etc/my.cnf.d/zotrs.cnf

다음 내용으로 파일을 채우고 저장합니다.

max_allowed_packet = 20M
query_cache_size = 32M
innodb_log_file_size = 256M

MariaDB를 시작하려면 다음 명령을 실행합니다.

systemctl start mariadb

MariaDB의 보안을 강화하려면 다음 명령을 실행하십시오.

/usr/bin/mysql_secure_installation

다음 출력에 따라 옵션을 설정합니다.

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):<Press Enter>
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] <Press Y>

루트 비밀번호를 설정합니다.

New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..
 ... Success!

By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] <Press Y>
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] <Choose acording your needs>
 ... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] <Press Y>
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] <Press Y>
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!
 

부팅 시 자동으로 시작되도록 MariaDB를 설정합니다.

systemctl enable mariadb.service

OTRS를 다운로드하려면 다음 명령을 실행합니다.

wget http://ftp.otrs.org/pub/otrs/RPMS/rhel/7/otrs-5.0.15-01.n oarch.rpm

EPEL 설치

OTRS를 설치하기 전에 Centos 7에 EPEL 리포지토리를 설정합니다. 다음 명령을 실행하여 설정합니다.

[ ~]# yum -y http://mirror.globo.com/epel/7/x86_64/e/epel-r release-7-9.noarch.rpm

OTRS 설치

다음 명령으로 OTRS를 설치합니다.

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

예를 들어 소프트웨어 패키지 목록이 설치됩니다. Apache와 모든 종속성은 출력이 끝날 때 Y를 누르면 자동으로 해결됩니다.

Transaction Summary
================================================================================
Install  1 Package (+143 Dependent packages)

Total size: 148 M
Total download size: 23 M
Installed size: 181 M
Is this ok [y/d/N]: y 

Apache(httpd)를 시작하려면 다음 명령을 실행합니다.

systemctl start httpd.service

Centos7에서 systemd로 Apache(httpd) 시작을 활성화하려면 다음 명령을 실행합니다.

systemctl enable httpd.service

Apache에서 SSL을 활성화하고 SelfSigned 인증서를 구성합니다. Apache HTTP Server용 Mod_SSL 모듈을 설치하고 다음 명령을 실행합니다.

yum -y install mod_ssl

자체 서명된 SSL 인증서를 생성하려면 다음 디렉터리로 이동하세요.

cd /etc/pki/tls/certs/

그리고 다음 명령을 실행하여 키를 생성합니다(centos7.key는 내 인증서의 이름이므로 자유롭게 변경하십시오).

make centos7.key
umask 77 ; \ /usr/bin/openssl genrsa -aes128 2048 > centos7.key Generating RSA private key, 2048 bit long modulus .+++ .........................................................................................+++ e is 65537 (0x10001) Enter pass phrase: <Insert your Own Password>
Verifying - Enter pass phrase:<Retype the Password>

OpenSSL로 서버 SSL 개인 키를 생성하려면 다음 명령을 실행하십시오.

openssl rsa -in centos7.key -out centos7.key
Enter pass phrase for centos7.key: <Type the Password> writing RSA key

다음 명령을 실행하여 CSR(Certificate Signing Request) 파일을 만듭니다(centos7.csr은 내 인증서의 이름이므로 자유롭게 변경하세요).

make centos7.csr

필요에 따라 질문을 작성하십시오.

umask 77 ; \ /usr/bin/openssl req -utf8 -new -key centos7.key -out centos7.csr You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. -----
Country Name (2 letter code) [XX]:
State or Province Name (full name) []:
Locality Name (eg, city) [Default City]:
Organization Name (eg, company) [Default Company Ltd]:
Organizational Unit Name (eg, section) []:
Centos7 Common Name (eg, your name or your server's hostname) []:
Email Address []:
Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: <press enter>
An optional company name []:

OpenSSL 도구를 사용하여 서버에 대한 CSR(인증서 서명 요청)을 생성합니다.

openssl x509 -in centos7.csr -out centos7.crt -req -signkey centos7.key

출력은 다음과 같습니다.

Signature ok subject=/C=BR/ST=SP/L=Campinas/O=Centos7/OU=Centos7/CN=centos7.local Getting Private key

ssl.conf 파일을 편집하기 전에 다음 명령을 사용하여 파일 사본을 만드십시오.

cp /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/ssl.conf.old

그런 다음 파일을 편집합니다.

vim /etc/httpd/conf.d/ssl.conf

다음 지시문을 찾아 각각의 주석을 제거하고 다음과 같이 편집합니다.

SSLCertificateKeyFile /etc/pki/tls/certs/centos7.key
SSLCertificateFile /etc/pki/tls/certs/centos7.csr
SSLProtocol -All +TLSv1 +TLSv1.1 +TLSv1.2
ServerName centos7.local:443

다음 명령을 사용하여 Apache를 다시 시작합니다.

systemctl restart httpd

OTRS를 https 모드에서 강제로 실행하려면 다음 파일을 편집하십시오.

vim /etc/httpd/conf/httpd.conf

파일 끝에서 다음 지시문을 주석 처리 해제합니다.

IncludeOptional conf.d/*.conf

zzz_otrs.conf 파일을 편집합니다.

vim /etc/httpd/conf.d/zzz_otrs.conf

26행 뒤(mod_version.c 모듈 전)에 다음 지시문을 추가합니다.

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

아파치를 다시 시작합니다.

[ ~]# systemctl restart httpd

OTRS에서 확장 기능을 사용하려면 일부 PERL 모듈을 설치해야 합니다. 다음 명령을 실행하여 설치합니다.

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

OTRS 시스템에는 PERL 모듈을 확인하는 도구가 있습니다. 다음과 같이 실행하여 시스템 요구 사항을 확인하십시오.

cd /opt/otrs/bin

실행:

./otrs.CheckModules.pl

구성의 출력은 다음과 같아야 합니다.

o Apache::DBI......................ok (v1.12) o Apache2::Reload..................ok (v0.13) o Archive::Tar.....................ok (v1.92) o Archive::Zip.....................ok (v1.30) o Crypt::Eksblowfish::Bcrypt.......ok (v0.009) o Crypt::SSLeay....................ok (v0.64) o Date::Format.....................ok (v2.24) o DBI..............................ok (v1.627) o DBD::mysql.......................ok (v4.023) o DBD::ODBC........................Not installed! (optional - Required to connect to a MS-SQL database.) o DBD::Oracle......................Not installed! (optional - Required to connect to a Oracle database.) o DBD::Pg..........................Not installed! Use: 'yum install "perl(DBD::Pg)"' (optional - Required to connect to a PostgreSQL database.) o Digest::SHA......................ok (v5.85) o Encode::HanExtra.................ok (v0.23) o IO::Socket::SSL..................ok (v1.94) o JSON::XS.........................ok (v3.01) o List::Util::XS...................ok (v1.27) o LWP::UserAgent...................ok (v6.13) o Mail::IMAPClient.................ok (v3.37) o IO::Socket::SSL................ok (v1.94) o ModPerl::Util....................ok (v2.000010) o Net::DNS.........................ok (v0.72) o Net::LDAP........................ok (v0.56) o Template.........................ok (v2.24) o Template::Stash::XS..............ok (undef) o Text::CSV_XS.....................ok (v1.00) o Time::HiRes......................ok (v1.9725) o Time::Piece......................ok (v1.20_01) o XML::LibXML......................ok (v2.0018) o XML::LibXSLT.....................ok (v1.80) o XML::Parser......................ok (v2.41) o YAML::XS.........................ok (v0.54)

"otrs" 사용자로 OTRS 데몬을 시작하려면 다음 명령을 실행하십시오.

su -c "/opt/otrs/bin/otrs.Daemon.pl start" -s /bin/bash otrs

CentOS 7 방화벽을 비활성화하려면 다음 명령을 실행합니다.

systemctl stop firewalld

CentOS 7 방화벽을 비활성화하여 자동으로 시작하려면 다음을 실행하십시오.

systemctl disable firewalld.service

다음을 사용하여 OTRS 데몬을 시작합니다.

su -c "/opt/otrs/bin/otrs.Daemon.pl start" -s /bin/bash otrsCron.sh

명령의 출력은 다음과 같아야 합니다.

/opt/otrs/bin Cron.sh - start/stop OTRS cronjobs Copyright (C) 2001-2012 OTRS AG, http://otrs.org/ (using /opt/otrs) done

OTRS Daemon 상태를 확인하려면 다음 명령을 실행하십시오.

su -c "/opt/otrs/bin/otrs.Daemon.pl status" -s /bin/bash otrsCron.sh

crontab에서 OTRS 구성. 사용자 루트를 otrs로 변경하고 crontab 편집을 시작합니다.

su otrs
crontab -e

다음 내용으로 crontab을 채우고 저장합니다.

# --
# Copyright (C) 2001-2016 OTRS AG, http://otrs.com/
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# Who gets the cron emails?
MAILTO=""
# --
# Copyright (C) 2001-2016 OTRS AG, http://otrs.com/
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# check OTRS daemon status
*/5 * * * *    $HOME/bin/otrs.Daemon.pl start >> /dev/null

CentOS 7에서 OTRS 구성

웹 브라우저를 열고 URL https://centos7.local/otrs/installer.pl을 엽니다. centos7.local은 내 서버의 이름임을 기억하세요. 호스트 이름 또는 IP 주소를 입력하세요. 첫 번째 화면에는 OTRS 설치를 완료하는 4단계가 표시되며 다음을 누릅니다.

라이선스: 계속하려면 라이선스를 읽고 동의해야 합니다.

데이터베이스 선택: MySQL 옵션을 선택하고 설치 유형에서 OTRS용 새 데이터베이스 생성 옵션을 선택하고 다음 버튼을 클릭합니다.

MySQL 구성: 사용자, 암호 및 호스트 필드를 채우고(우리가 만든 MariaDB 구성 데이터 기억) 데이터베이스 설정 확인을 누릅니다.

OTRS 설치 프로그램이 MariaDB에 데이터베이스를 생성하고 다음 버튼을 누릅니다.

OTRS 데이터베이스가 성공적으로 생성됨:

시스템 설정 구성: 자신의 정보로 필드를 채우고 다음을 누릅니다.

OTRS 이메일 구성: 이메일 서버에 해당하는 필드를 채우십시오. 내 설정에서 아웃바운드 이메일의 경우 SMPTTLS 및 포트 587을 사용하고 인바운드 이메일의 경우 pop3을 사용하므로 이메일 계정이 필요합니다. 메일 구성을 확인하거나 이 단계를 건너뜁니다.

완료하려면 OTRS에 액세스하기 위한 사용자 및 비밀번호를 기록해 두십시오. 로그인 후 비밀번호를 변경할 수 있습니다.

OTRS URL 로그인은 https://centos7.local/otrs/index.pl?입니다. centos7.local은 내 서버의 이름임을 기억하세요. 호스트 이름이나 IP 주소를 입력하세요.:

OTRS에 로그인:

OTRS가 설치되었으며 지원 규칙 또는 비즈니스 모델로 구성할 준비가 되었습니다.