centos7安裝OTRS6


1、在文件/etc/selinux/config中配置SELINUX=disabled

重啟系統。重啟后確認命令getenforce返回為Disabled

2、配置數據庫

我們這里使用MariaDB

以root用戶執行下列的命令來安裝MariaDB(或mysql):

yum -y install mariadb-server

修改默認設置以適用於OTRS。使用文本編輯器來創建一個新文件/etc/my.cnf.d/zotrs.cnf,包含如下內容:

[mysqld]

max_allowed_packet = 64M

query_cache_size = 32M

innodb_log_file_size = 256M

執行systemctl start mariadb來重啟數據庫服務器並激活剛才的修改內容。然后運行命令/usr/bin/mysql_secure_installation,並按照屏幕上的指令來設置數據庫的root密碼

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL

SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we'll need the current

password for the root user. If you've just installed MySQL, 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):<–初次運行直接回車

OK, successfully used password, moving on…

Setting the root password ensures that nobody can log into the MySQL

root user without the proper authorisation.

Set root password? [Y/n] <– 是否設置root用戶密碼,輸入y並回車或直接回車

New password: <– 設置root用戶的密碼

Re-enter new password: <– 再輸入一次你設置的密碼

Password updated successfully!

Reloading privilege tables..

… Success!

By default, a MySQL installation has an anonymous user, allowing anyone

to log into MySQL 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] <– 是否刪除匿名用戶,生產環境建議刪除,所以直接回車

… 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] <–是否禁止root遠程登錄,根據自己的需求選擇Y/n並回車,建議禁止

… Success!

By default, MySQL 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] <– 是否刪除test數據庫,直接回車

- 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] <– 是否重新加載權限表,直接回車

… Success!

Cleaning up…

All done! If you've completed all of the above steps, your MySQL

installation should now be secure.

Thanks for using MySQL!

請注意,OTRS需要utf8作為數據庫存儲編碼。

進入數據庫進行查看

 

若不是utf8的話先關閉數據庫,然后在配置文件里面增加以及配置

character_set_server=utf8  

init_connect='SET NAMES utf8'  

 

3、安裝 OTRS

地址:http://ftp.otrs.org/pub/otrs/RPMS/fedora/26/

使用yum通過命令行來安裝OTRS,會自動拉入一些依賴包如Apache WEB服務器和一些Perl模塊

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

安裝完成之后 現在使用命令systemctl restart httpd.service重啟Apache以載入為OTRS修改的配置。

4、安裝額外的perl模塊

除了通過RPM包安裝的Perl模塊外,OTRS還需要一些其它的Perl模塊,你可以手動安裝。通過執行位於目錄/opt/otrs/bin/otrs.CheckModules.pl來檢查缺失的模塊。

yum -y install https://mirrors.tuna.tsinghua.edu.cn/epel/7/x86_64/Packages/e/release-7-12.noarch.rpm

然后可以通過像下面這樣安裝上面檢測到的缺失的模塊

yum -y install "perl(Text::CSV_XS)"

 

5、WEB安裝器來配置OTRS
在安裝完OTRS軟件后,可以使用OTRS的WEB安裝器來設置和配置OTRS數據庫。WEB安裝器是一個能通過瀏覽器訪問的WEB頁面。WEB安裝器的地址是: http://10.10.15.133 /otrs/installer.pl

 

下一步

 

同意許可並繼續

 

選擇mysql(MariaDB)並創建一個新的數據庫

 

然后就會創建一個新庫otrs,並生成密碼,這個密碼后面再修改,接着下一步

 

繼續下一步配置系統配置,這里日志也可以直接建一個文件夾存放

 

下一步配置郵箱

 

 

 

 

檢查郵件配置

后面再解決了,先跳過這一步

 

安裝完成,先記下密碼,后面密碼自行修改

登錄下

 

 

 

啟動OTRS守護進程

首先切換到otrs用戶 su otrs

啟動OTRS守護進程並激活相應的監控此進程的cron任務(必須以otrs用戶執行):

/opt/otrs/bin/otrs.Daemon.pl start

/opt/otrs/bin/Cron.sh start

添加開機啟動

在/data/scripts/目錄下編寫腳本 vim daemon_otrs_protect.sh 如下:

 

添加到開機啟動任務:

vim /etc/rc.d/rc.local

su -otrs -c "./data/scripts/daemon_otrs_protect.sh"

賦權:chmod 755 /etc/rc.d/rc.local

 

 Otrs6就安裝好了

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM