成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

如何在Ubuntu 16.04上安裝OTRS(開源問題單系統)

系統 Linux
在本教程中,我將介紹如何在 Ubuntu 16.04 上安裝和配置 OTRS。我將使用 PostgreSQL 作為 OTRS 的數據庫,將 Apache Web 服務器用作 Web 服務器。

[[192896]]

OTRS ,即開源問題單(ticket)申請系統,是一個用于客戶服務、幫助臺和 IT 服務管理的開源問題單軟件。該軟件是用 Perl 和 javascript 編寫的。對于那些需要管理票據、投訴、支持請求或其他類型的報告的公司和組織來說,這是一個問題單解決方案。OTRS 支持包括 MySQL、PostgreSQL、Oracle 和 SQL Server 在內的多個數據庫系統,它是一個可以安裝在 Windows 和 Linux 上的多平臺軟件。

在本教程中,我將介紹如何在 Ubuntu 16.04 上安裝和配置 OTRS。我將使用 PostgreSQL 作為 OTRS 的數據庫,將 Apache Web 服務器用作 Web 服務器。

先決條件

  • Ubuntu 16.04。
  • 最小 2GB 的內存。
  • root 權限

步驟 1 - 安裝 Apache 和 PostgreSQL

在***步中,我們將安裝 Apache Web 服務器以及 PostgreSQL。我們將從 ubuntu 倉庫中使用***的版本。

使用 SSH 登錄到你的 Ubuntu 服務器中:

  1. ssh root@192.168.33.14 

更新 Ubuntu 倉庫。

  1. sudo apt-get update 

使用 apt 安裝 Apache2 以及 PostgreSQL:

  1. sudo apt-get install -y apache2 libapache2-mod-perl2 postgresql 

通過檢查服務器端口確保 Apache 以及 PostgreSQL 運行了。

  1. netstat -plntu 

 

Install Apache and PostgreSQL

你可以看到 80 端口被 apache 使用了,5432 端口被 postgresql 數據庫使用了。

步驟 2 - 安裝 Perl 模塊

OTRS 基于 Perl,因此我們需要安裝一些 OTRS 需要的 Perl 模塊。

使用這個 apt 命令安裝 perl 模塊:

  1. sudo apt-get install -y 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 libencode-hanextra-perl libjson-xs-perl libmail-imapclient-perl libtemplate-perl libtemplate-perl libtext-csv-xs-perl libxml-libxml-perl libxml-libxslt-perl libpdf-api2-simple-perl libyaml-libyaml-perl 

安裝完成后,我們需要為 apache 激活 Perl 模塊,接著重啟 apache 服務。

  1. a2enmod perl 
  2. systemctl restart apache2 

接下來,使用下面的命令檢查模塊是否已經加載了:

  1. apachectl -M | sort 

Enable Apache Perl Module 

Enable Apache Perl Module

你可以在 “Loaded Modules” 部分下看到 perl_module。

步驟 3 - 為 OTRS 創建新用戶

OTRS 是一個基于 web 的程序并且運行與 apache web 服務器下。為了安全,我們需要以普通用戶運行它,而不是 root 用戶。

使用 useradd 命令創建一個 otrs 新用戶:

  1. useradd -r -d /opt/otrs -c 'OTRS User' otrs 
  • -r:將用戶作為系統用戶。
  • -d /opt/otrs:在 /opt/otrs 下放置新用戶的主目錄。
  • -c:備注。

接下來,將 otrs 用戶加入到 www-data 用戶組,因為 apache 運行于 www-data 用戶及用戶組。

  1. usermod -a -G www-data otrs 

在 /etc/passwd 文件中已經有 otrs 用戶了。

  1. grep -rin otrs /etc/passwd 

Create new user for OTRS 

Create new user for OTRS

OTRS 的新用戶已經創建了。

步驟 4 - 創建和配置數據庫

在這節中,我們會為 OTRS 系統創建一個新 PostgreSQL 數據庫,并對 PostgreSQL 數據庫的配置做一些小的更改。

登錄到 postgres 用戶并訪問 PostgreSQL shell。

  1. su - postgres
  2. psql 

創建一個新的角色 otrs,密碼是 myotrspw,并且是非特權用戶。

  1. create user otrs password 'myotrspw' nosuperuser; 

接著使用 otrs 用戶權限創建一個新的 otrs 數據庫:

  1. create database otrs owner otrs; 
  2. \q 

接下來為 otrs 角色驗證編輯 PostgreSQL 配置文件。

  1. vim /etc/postgresql/9.5/main/pg_hba.conf 

在 84 行后粘貼下面的配置:

  1. local   otrs            otrs                                    password 
  2. host    otrs            otrs            127.0.0.1/32            password 

保存文件并退出 vim

Database Authentication OTRS 

Database Authentication OTRS

使用 exit 回到 root 權限并重啟 PostgreSQL:

  1. exit 
  2. systemctl restart postgresql 

PostgreSQL 已經為 OTRS 的安裝準備好了。

Configure PostgreSQL for OTRS 

Configure PostgreSQL for OTRS

步驟 5 - 下載和配置 OTRS

在本教程中,我們會使用 OTRS 網站中***的版本。

進入 /opt 目錄并使用 wget 命令下載 OTRS 5.0:

  1. cd /opt/ 
  2. wget http://ftp.otrs.org/pub/otrs/otrs-5.0.16.tar.gz 

展開該 otrs 文件,重命名目錄并更改所有 otrs 的文件和目錄的所屬人為 otrs。

  1. tar -xzvf otrs-5.0.16.tar.gz 
  2. mv otrs-5.0.16 otrs 
  3. chown -R otrs:otrs otrs 

接下來,我們需要檢查系統并確保可以安裝 OTRS 了。

使用下面的 otrs 腳本命令檢查 OTRS 安裝需要的系統軟件包:

  1. /opt/otrs/bin/otrs.CheckModules.pl 

確保所有的結果是對的,這意味著我們的服務器可以安裝 OTRS 了。

OTRS Chek Module needed for Installation 

OTRS Chek Module needed for Installation

OTRS 已下載,并且我們的服務器可以安裝 OTRS 了。

接下,進入 otrs 目錄并復制配置文件。

  1. cd /opt/otrs/ 
  2. cp Kernel/Config.pm.dist Kernel/Config.pm 

使用 vim 編輯 Config.pm 文件:

  1. vim Kernel/Config.pm 

更改 42 行的數據庫密碼:

  1. $Self->{DatabasePw} = 'myotrspw'

注釋 45 行的 MySQL 數據庫支持:

  1. # $Self->{DatabaseDSN} = "DBI:mysql:database=$Self->{Database};host=$Self->{DatabaseHost};"

取消注釋 49 行的 PostgreSQL 數據庫支持:

  1. $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};"

保存文件并退出 vim。

接著編輯 apache 啟動文件來啟用 PostgreSQL 支持。

  1. vim scripts/apache2-perl-startup.pl 

取消注釋 60 和 61 行:

  1. # enable this if you use postgresql 
  2. use DBD::Pg (); 
  3. use Kernel::System::DB::postgresql; 

保存文件并退出編輯器。

***,檢查缺失的依賴和模塊。

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

你可以在下面的截圖中看到結果是 “OK”:

 

Check all modules again

步驟 6 - 導入樣本數據庫

在本教程中,我們會使用樣本數據庫,這可以在腳本目錄中找到。因此我們只需要將所有的樣本數據庫以及表結構導入到第 4 步創建的數據庫中。

登錄到 postgres 用戶并進入 otrs 目錄中。

  1. su - postgres
  2. cd /opt/otrs/ 

作為 otrs 用戶使用 psql 命令插入數據庫以及表結構。

  1. psql -U otrs -W -f scripts/database/otrs-schema.postgresql.sql otrs 
  2. psql -U otrs -W -f scripts/database/otrs-initial_insert.postgresql.sql otrs 
  3. psql -U otrs -W -f scripts/database/otrs-schema-post.postgresql.sql otrs 

在需要的時候輸入數據庫密碼 myotrspw。

Import OTRS Sample Database 

Import OTRS Sample Database

步驟 7 - 啟動 OTRS

數據庫以及 OTRS 已經配置了,現在我們可以啟動 OTRS。

將 otrs 的文件及目錄權限設置為 www-data 用戶和用戶組。

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

通過創建一個新的鏈接文件到 apache 虛擬主機目錄中啟用 otrs apache 配置。

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

啟用 otrs 虛擬主機并重啟 apache。

  1. a2ensite otrs 
  2. systemctl restart apache2 

確保 apache 啟動沒有錯誤。

Enable OTRS Apache Virtual Host 

Enable OTRS Apache Virtual Host

步驟 8 - 配置 OTRS 計劃任務

OTRS 已經安裝并運行在 Apache Web 服務器中了,但是我們仍然需要配置 OTRS 計劃任務。

登錄到 otrs 用戶,接著以 otrs 用戶進入 var/cron 目錄。

  1. su - otrs 
  2. cd var/cron/
  3. pwd 

使用下面的命令復制所有 .dist 計劃任務腳本:

  1. for foo in *.dist; do cp $foo `basename $foo .dist`; done 

使用 exit 回到 root 權限,并使用 otrs 用戶啟動計劃任務腳本。

  1. exit 
  2. /opt/otrs/bin/Cron.sh start otrs 

Enable OTRS Cron 

Enable OTRS Cron

接下來,手動收取電子郵件的 PostMaster 創建一個新的計劃任務。我會配置為每 2 分鐘收取一次郵件。

  1. su - otrs 
  2. crontab -e 

粘貼下面的配置:

  1. */2 * * * *    $HOME/bin/otrs.PostMasterMailbox.pl >> /dev/null 

保存并退出。

現在停止 otrs 守護進程并再次啟動。

  1. bin/otrs.Daemon.pl stop 
  2. bin/otrs.Daemon.pl start 

Enable OTRS Fetching Email 

Enable OTRS Fetching Email

OTRS 安裝以及配置完成了。

步驟 9 - 測試 OTRS

打開你的 web 瀏覽器并輸入你的服務器 IP 地址: http://192.168.33.14/otrs/

使用默認的用戶 root@localhost 以及密碼 root 登錄。

 

Installation Successfully OTRS Home Page

使用默認的 root 賬戶你會看到一個警告。點擊警告信息來創建一個新的 admin root 用戶。

下面是用另外的 admin root 用戶登錄后出現的 admin 頁面,這里沒有出現錯誤信息。

 

OTRS Admin Dashboard Without Error Messages

如果你想作為客戶登錄,你可以使用 customer.pl :http://192.168.33.14/otrs/customer.pl

你會看到客戶登錄界面,輸入客戶的用戶名和密碼。

OTRS Customer Login Page 

OTRS Customer Login Page

下面是一個創建新單據的客戶頁面。

Customer Open Ticket 

Customer Open Ticket

步驟 10 - 疑難排查

如果你仍舊看到 “OTRS Daemon is not running” 的錯誤,你可以像這樣調試 OTRS 守護進程。

  1. su - otrs 
  2. cd /opt/otrs/ 

停止 OTRS 守護進程:

  1. bin/otrs.Daemon.pl stop 

使用 --debug 選項啟動 OTRS 守護進程。

  1. bin/otrs.Daemon.pl start --debug 

參考

責任編輯:龐桂玉 來源: Linux中國
相關推薦

2017-08-02 15:15:55

UbuntuNoSQLOrientDB

2018-02-25 11:03:00

LinuxUbuntuEncryptpad

2019-08-02 15:30:42

UbuntuMongoDB命令

2017-05-10 10:37:55

2018-02-23 14:50:30

2017-02-22 10:06:11

UbuntuCeph存儲

2010-09-08 13:49:36

2018-10-15 15:23:50

UbuntupipPython

2019-08-30 11:20:28

UbuntuVirtualBoxLinux

2024-01-04 11:50:00

UbuntuDocker

2023-08-08 12:38:52

2016-07-28 13:30:49

UbuntuQQWine

2015-10-16 10:07:22

Justniffer安裝Ubuntu

2020-08-14 07:00:00

RudderIT工具

2017-08-09 13:13:25

LinuxUbuntuZabbix

2013-07-29 13:49:23

UbuntuLAMP服務器

2021-09-26 10:11:14

Ubuntu樹莓派

2013-07-25 10:00:30

UbuntuVirtualBox

2017-03-29 16:18:11

LinuxUbuntuRedmine

2021-09-11 15:41:55

UbuntuDropbox云服務
點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 成人3d动漫一区二区三区91 | www.日本在线 | 亚洲大片在线观看 | 伊人影院在线观看 | 国产精品久久一区二区三区 | h视频在线免费 | 中文字幕乱码一区二区三区 | 日韩欧美在线视频播放 | 在线观看成人小视频 | 久免费视频| 久久久久久久一区 | www.久| 久久在线视频 | 亚洲国产一区二区三区在线观看 | 亚洲精品一 | 欧美一区二区三区一在线观看 | 日本中文字幕在线观看 | 天天干天天干 | 中文字幕在线免费视频 | 亚洲先锋影音 | 成人三级av | 中文字幕第三页 | 国产精品永久在线观看 | 国产激情视频网站 | 亚洲网站在线观看 | h在线免费观看 | 成人精品鲁一区一区二区 | 亚洲不卡一 | 亚洲日本成人 | 美女网站视频免费黄 | 97国产在线观看 | 在线视频 中文字幕 | 男人天堂网av | 麻豆久久久久久久久久 | 中文字幕91av | 久久久久久91香蕉国产 | 欧美日韩视频在线第一区 | 国产在线观看一区二区三区 | 精品久久久久久亚洲精品 | 黄色片免费在线观看 | 盗摄精品av一区二区三区 |