在Linux下安装OTRS系统

来自YTYZX有图有真相的百科
跳转至: 导航搜索

OTRS的名字是由Open-source Ticket Request System首字母缩略字而来,是一个开源的缺陷跟踪管理系统软件。可将之理解为工单提交跟踪系统。详情请点击维基百科。本例中以最小化(minimal)安装的CentOS 7为例说明安装步骤。

1.安装完毕后,确保网络正常,建议输入“yum upgrade”进行更新。
2.更新完毕后输入“vi /etc/selinux/config”并按回车键。
   备注:必须禁止SELinux。

OTRS1.png

3.配置文件里默认为“SELINUX=enforcing”。

OTRS2.png

4.按“i”键进入编辑状态,并修改为“SELINUX=disabled”,确认无误后按ESC键,并输入“:x”保存退出。

OTRS3.png

5.输入“reboot”重启。

OTRS4.png

6.重启后登录输入“getenforce”确认是否为Disabled状态。

OTRS5.png

7.输入“yum -y install mariadb-server”开始安装数据库。
   注意:CentOS7默认数据库为MariaDB,亦可自行安装MySQL如何在CentOS7中安装MySQL

OTRS6.png

8.提示已经安装完毕。
   注意:暂时请勿启动数据库,设置好配置文件后再启动,以防发生错误。

OTRS7.png

9.输入“vi /etc/my.cnf.d/zotrs.cnf”新建一个配置文件。

OTRS8.png

10.按“i”键进入编辑状态,并添加以下内容,确认无误后按ESC键,并输入“:x”保存退出。
     文件内容:   [mysqld]
                         max_allowed_packet   = 20M
                         query_cache_size     = 32M
                         innodb_log_file_size = 256M

OTRS9.png

11.输入“systemctl start mariadb”启动MariaDB数据库服务。

OTRS10.png

12.输入“mysql_secure_installation”对数据库进行安全配置。
     详细设置请点击如何提高全新安装MySQL的安全性

OTRS11.png

13.输入“systemctl enable mariadb”设置MariaDB数据库服务为开机自动启动。

OTRS12.png

14.输入“yum -y install httpd”安装Apache网页服务器软件。

OTRS13.png

15.提示已经安装完毕。

OTRS14.png

16.输入“systemctl start httpd”启动Apache。

OTRS15.png

17.输入“firewall-cmd --zone=public --add-port=80/tcp --permanent”将80端口开放。

OTRS16.png

18.输入“firewall-cmd --reload”使规则生效。

OTRS17.png

19.输入“iptables-save | grep 80”查看是否生效。

OTRS18.png

20.输入“ip addr”查看本机IP地址,本例中为192.168.1.102。

OTRS19.png

21.在浏览器里输入“192.168.1.102”(本机IP地址),如出现类似“Testing 123...”画面则表示设置成功。

OTRS20.png

22.输入“systemctl enable httpd”设置Apache网页服务为开机自动启动。

OTRS21.png

23.输入“https://www.otrs.com/download-open-source-help-desk-software-otrs-free”查看OTRS软件下载地址。

OTRS22.png

24.建议下载到/tmp目录,输入“cd /tmp/”进入目录。

OTRS23.png

25.输入“wget http://ftp.otrs.org/pub/otrs/RPMS/rhel/6/otrs-5.0.20-01.noarch.rpm”尝试下载,提示command not found(无法找到命令)。

OTRS24.png

26.输入“yum -y install wget”安装wget。

OTRS25.png

27.提示已经安装成功。

OTRS26.png

28.再次输入“wget http://ftp.otrs.org/pub/otrs/RPMS/rhel/6/otrs-5.0.20-01.noarch.rpm ”开始下载OTRS软件。
     注意:实际使用中请以有效地址为准。

OTRS27.png

29.下载完毕后可输入“ls”查看,文件名为otrs-5.0.20-01.noarch.rpm。

OTRS28.png

30.5.输入“rpm -Uvh  https://mirrors.ustc.edu.cn/centos/7/extras/x86_64/Packages/epel-release-7-6.noarch.rpm ”从中国科技大学镜像更新EPEL。
  注意:EPEL(Extra Packages for Enterprise Linux,企业版Linux的额外软件包)是一个由特别兴趣小组创建、维护并管理的,针对 红帽企业版 Linux(RHEL)及其衍生发
            行版(比如 CentOS、Scientific Linux、Oracle Enterprise Linux)的一个高质量附加软件包项目。

OTRS29.png

31.输入“rpm -Uvh https://centos7.iuscommunity.org/ius-release.rpm ”并按回车键开始更新源。

OTRS30.png

32.输入“yum install --nogpgcheck otrs-5.0.20-01.noarch.rpm”开始安装OTRS。
     备注:必须在下载的OTRS源文件目录里面安装。

OTRS31.png

33.输入“y”开始安装。

OTRS32.png

34.提示已经安装完毕。

OTRS33.png

35.输入“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)””安装必备模块。

OTRS34.png

36.提示已经安装完毕。

OTRS35.png

37.输入”/opt/otrs/bin/otrs.CheckModules.pl“用OTRS自带工具来检查系统模块安装要求。

OTRS36.png

38.检查结果类似下图。
     备注:如必须模块没有安装则再次运行YUM命令安装缺失模块。

OTRS37.png

39.输入”su -c "/opt/otrs/bin/otrs.Daemon.pl start" -s /bin/bash otrs“以otrs用户启动OTRS。
    备注:必须使用otrs用户启动,使用其他账号将报错。

OTRS38.png

40.输入”su -c "/opt/otrs/bin/Cron.sh start" -s /bin/bash otrs“以otrs用户激活监控此进程的cron任务。
    备注:必须使用otrs用户启动,使用其他账号将报错。

OTRS39.png

41.输入”systemctl restart httpd“重新启动Apache。

OTRS40.png

42.在浏览器地址栏输入”192.168.1.102/otrs/installer.pl“继续安装。
     备注:实际使用中以服务器地址代替192.168.1.102。

OTRS41.png

43.网页显示OTRS联系信息,点击”下一步“按钮即可。

OTRS42.png

44.阅读许可证后如认可则点击”同意许可并继续“按钮。

OTRS43.png

45.本例中选择创建新的MySQL数据库,确认无误后点击”下一步“按钮。

OTRS44.png

46.输入数据库root用户密码并点击”测试数据库设置“按钮。

OTRS45.png

47.新建数据库信息如下,点击”下一步“按钮继续。

OTRS46.png

48.提示数据库已经设置成功,点击”下一步“按钮继续。

OTRS47.png

49.根据您的实际需求输入对应信息。

OTRS48.png

50.如需OTRS系统外发邮件则输入相应信息,本例中选择不外发邮件,故点击”跳过这一步“按钮。

OTRS49.png

51.安装成功,显示登录地址及管理员账号密码。

OTRS50.png

52.在浏览器地址栏输入”192.168.1.102/otrs/index.pl“并按回车键确定。

OTRS51.png

53.输入账号”root@localhost“及上面显示的密码并按”登录“按钮。

OTRS52.png

54.登录后界面如下。

OTRS53.png