본문 바로가기

카테고리 없음

OTRS 6.0.5. 버전 설치(UBUNTU 16.0.4)

https://www.vultr.com/docs/how-to-install-and-configure-otrs-on-ubuntu-16-04


여기에서 퍼왔는데, 신버전 적용하고, 오타 수정해서 올려 드립니다. 

OTRS는 헬프데스크 솔루션으로, 티켓 관리 시스템입니다. 장애 접수 등을 하게 되면, 그것을 관리해 주고, 담당자가 처리해 주죠. 

상당히 진화한 시스템 같으니, 관심 있으면, 한번 해 보시기 바랍니다. 


:: 우분투 16.0.4 / OTRS 6.0.5 / 

https://www.otrs.com/download-open-source-help-desk-software-otrs-free/

여기 가셔서 최신 버전 파악하시고, 최신판으로 설치하시는 것이 좋을 듯 합니다. 


설치 준비 Prerequisites

  • 우분투 16.0.4 LTS

설치 하기 Getting Started

설치하기 전에 wget 하고 unzip 정도는 설치하는 것이 좋겠죠? 

sudo apt-get install wget unzip -y

업데이트와 업그레이드를 실행합니다:

sudo apt-get update -y
sudo apt-get upgrade -y

:재시작 한번 하고 가면 좋겠네요. 

sudo shutdown -r now


아파치와 마리아디비 설치. Install Apache and MariaDB

동시 설치 합니다. :

sudo apt-get install apache2 libapache2-mod-perl2 mariadb-server -y


자동 시작을 설정합니다:

sudo systemctl start apache2
sudo systemctl start mysql
sudo systemctl enable apache2
sudo systemctl enable mysql


마리아디비 설정 Configure MariaDB

마리아디비 설정했으면, otrs를 위한 디비를 생성해 볼까요? 

After installing MariaDB, you will need to create a database for OTRS.

First, log in to MySQL shell with the following command:

mysql -u root -p

 먼저 , DB를 생성해 볼까요? Next, create a database for OTRS with the following command:

MariaDB [(none)]> CREATE DATABASE otrs_db;

 다음은 DB에 권한을 할당합니다. 'password'자리에 넣을 비번을 잘 기억해 주시고,  Next, create a user for OTRS and grant all privileges to OTRS database with the following command:

MariaDB [(none)]> GRANT ALL PRIVILEGES ON otrs_db.* TO 'otrs'@'localhost' IDENTIFIED BY 'password';

 플러시 해 줍니다.  Next, Flush the privileges with the following command:

MariaDB [(none)]> FLUSH PRIVILEGES;

 Exit를 해서 디비에서 나갑니다. Exit from the MySQL shell:

MariaDB [(none)]> exit;

 DB가 설정되면, 메모리나 로그 등 설정을 바꿔 줘야 합니다. Once the MariaDB is configured, you will need to change the default MySQL settings in my.cnf file. You can do this by editing my.cnf file as follows;

sudo vi /etc/mysql/my.cnf

 아래쪽에 다음 항목을 더해 줍니다. Add the following lines under:

[mysqld]
max_allowed_packet=64M
query_cache_size=36M
innodb_log_file_size=256M

 마리아 DB를 재시작 해 줘야겠죠? Save the file then restart MariaDB service to apply these changes:

sudo systemctl restart mysql

OTRS 설치 및 설정 Install and Configure OTRS

 OTRS는 perl로 제작되었습니다. 그래서 설치를 해 줘야 합니다. OTRS is written in Perl and uses number of Perl modules. So you will need to install all the required Perl module to your system. You can install all of them by running the following command:

sudo apt-get install libdbd-odbc-perl libauthen-ntlm-perl libxml-libxml-perl libxml-libxslt-perl libpdf-api2-simple-perl libyaml-libyaml-perl libencode-hanextra-perl libjson-xs-perl libmail-imapclient-perl libtemplate-perl libtemplate-perl libtext-csv-xs-perl libapache2-mod-perl2 libdbd-pg-perl libnet-dns-perl libnet-ldap-perl libio-socket-ssl-perl libpdf-api2-perl libsoap-lite-perl libgd-text-perl libgd-graph-perl libapache-dbi-perl libarchive-zip-perl libcrypt-eksblowfish-perl libcrypt-ssleay-perl libdatetime-perl -y

 모듈이 설치되면, 아파치를 재시작 해 줘야 합니다. Once all the modules are installed, then activate the Perl module for apache, then restart the apache service with the following command:

sudo a2enmod perl
sudo systemctl restart apache2

 다음에 otrs 최신 버전을 다운 받습니다. 이 글 제작 시점에 6.0.5 이므로, 다음과 같이 다운 받습니다. Next, you will need to download the latest version of the OTRS from their website. To do so, run the following command:

wget http://ftp.otrs.org/pub/otrs/otrs-6.0.5.zip

 압축을 해제해 주고, Once the download is complete, extract the downloaded file with the following command:

unzip otrs-6.0.5.zip

 압축 풀린 파일을 opt 폴더에 넣습니다. Next, move the extracted directory to the /opt/:

sudo mv otrs-6.0.5 /opt/otrs

 모듈을 실행해 줍니다. Finally, you can check the missing modules by running the following script:

sudo /opt/otrs/bin/otrs.CheckModules.pl

 OTRS에서 사용할 사용자를 생성해 줍니다. Next, create a OTRS user with the following command:

sudo useradd -d /opt/otrs -c 'OTRS user' otrs
sudo usermod -G www-data otrs 

 OTRS 설정 파일을 복사하고 설정합니다. Next, you will need to copy OTRS default configuration file and make some changes inside it. You can do this by running the following command:

cd /opt/otrs/Kernel
sudo cp Config.pm.dist Config.pm
sudo vi Config.pm

 다음 라인을 적절하게 고칩니다. 제 기준으로 34번째 라인입니다.  Change the following lines:

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

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

 그리고, 파일 하나를 편집할껀데요. Next, enable MySQL support by editing apache2-perl-startup.pl file:

sudo vi /opt/otrs/scripts/apache2-perl-startup.pl

 #로 주석처리 되어 있는 아래 두 라인의 주석을 해제합니다. '#' => ' '로 수정 Change the file as shown below:

# enable this if you use mysql
use DBD::mysql ();
use Kernel::System::DB::mysql;

 저장하고 닫습니다. Save and close the file, when you are finished.

 다음에 퍼미션을 조정합니다. Next, you will need to give proper permissions to the /opt/otrs directory. You can do this by running the following command:

sudo /opt/otrs/bin/otrs.SetPermissions.pl --web-group=www-data

 아파치 설정 조정 Configure Apache for OTRS

 OTRS에서 심볼릭 링크를 설정합니다. Once everything is configured, you will need to create a symlink for OTRS to the Apache web configuration directory. You can do this by running the following command:

sudo ln -s /opt/otrs/scripts/apache2-httpd.include.conf /etc/apache2/sites-available/otrs.conf

 OTRS에서 가상 호스트를 설정합니다. Next, enable the OTRS virtual host with the following command:

sudo a2ensite otrs

 OTRS에서 아파치 모듈을 다음과 같이 조정합니다. Next, you will also need to enable some Apache modules required by the OTRS. You can enable all of them by running the following command:

sudo a2enmod headers
sudo a2enmod version
sudo a2enmod deflate
sudo a2enmod filter

 최종적으로 아파치를 재시작 합니다. Finally, restart the Apache web server to apply all the changes:

sudo systemctl restart apache2

 웹 설정 조정 Access OTRS Web Interface

 80 포트 방화벽 조정 Before starting, you will need to allow port 80 through firewall. You can do this by running the following command:

sudo ufw enable
sudo ufw allow 80

 방화벽 조정이 완료되었으면, http://ip/otrs/installer.pl 을 쳐서 다음 항목을 진행합니다.  Once the firewall is configured, open your web browser and type the URL http://your-server-ip/otrs/installer.pl and complete the required steps to finish the installation.

 인스톨이 완료되면, 다음 항목을 진행합니다. Once the installation is complete, start the OTRS daemon and activate its cronjob with the following command:

 sudo su - otrs -c "/opt/otrs/bin/otrs.Daemon.pl start"
 sudo su - otrs -c "/opt/otrs/bin/Cron.sh start"