https://doc.otrs.com/doc/manual/admin/6.0/zh_CN/html/installation.html#installation-on-centos
1、禁用SELinux
在文件/etc/selinux/config中配置SELINUX=disabled
2、准备OTRS所需的数据库环境
shell> yum -y install mariadb-server
这会在你的系统上使用默认选项安装MySQL,你需要修改默认设置以适用于OTRS。使用文本编辑器来创建一个新文件/etc/my.cnf.d/zotrs.cnf,包含如下内容:
[mysqld]
max_allowed_packet = 64M
query_cache_size = 32M
innodb_log_file_size = 256M
character-set-server=utf8
collation-server=utf8_general_ci
[mysql]
default-character-set=utf8
现在执行systemctl start mariadb来重启数据库服务器并激活刚才的修改内容。然后运行命令/usr/bin/mysql_secure_installation,并按照屏幕上的指令来设置数据库的root密码、移除匿名访问及删除test数据库。
注意请注意,OTRS需要utf8作为数据库存储编码。
3、下载安装 OTRS
https://ftp.otrs.org/pub/otrs/RPMS/rhel/7/otrs-6.0.29-02.noarch.rpm
我们可以通过https://ftp.otrs.org/pub/otrs/RPMS/rhel/7/查看可下载的otrs版本
或者https://portal.otrs.com/external/download-center
使用yum通过命令行来安装OTRS,它还会拉入一些依赖包如Apache WEB服务器和一些Perl模块。确保你已经将OTRS RPM文件复制到了当前目录。
shell> yum install --nogpgcheck otrs-x.x.*.rpm
现在使用命令systemctl restart httpd.service重启Apache以载入为OTRS修改的配置。
4、安装额外的perl模块
除了通过RPM包安装的Perl模块外,OTRS还需要一些其它的Perl模块,你可以手动安装。通过执行位于目录/opt/otrs下的文件bin/otrs.CheckModules.pl来检查缺失的模块。一些模块只是可选的功能才需要,比如与IMAP服务器通讯或生成PDF。在RedHat或CentOS上我们推荐从EPEL软件仓库安装这些模块,EPEL是由Fedora项目维护的一个软件仓库,为RHEL及其分支提供高质量的软件包。可在EPEL网站上查看更多信息。
yum install -y “perl(Archive::Zip)” “perl(Crypt::SSLeay)” “perl(Date::Format)” “perl(IO::Socket::SSL)” “perl(LWP::UserAgent)” “perl(Net::DNS)” “perl(Net::LDAP)” “perl(Template)” “perl(URI)” “perl(XML::LibXML)” “perl(XML::LibXSLT)” “perl(XML::Parser)” perl-core procmail “perl(DateTime)”
cd /opt/otrs/bin/
./otrs.CheckModules.pl
yum install -y “perl(Mail::IMAPClient)” “perl(ModPerl::Util)” “perl(Text::CSV_XS)” “perl(YAML::XS)” “perl(JSON::XS)” “perl(Crypt::Eksblowfish::Bcrypt)”
yum -y install perl-namespace-clean
如果你使用的是RHEL 7或CentOS 7,你可以从https://dl.fedoraproject.org/pub/epel/这个网址获得最新的EPEL软件包。你可以执行下面的命令添加EPEL软件仓库到yum源:
yum remove epel-release
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum clean all && yum makecache
先确保使用Yum安装了cpan
perl -MCPAN -e shell
如果升级时报错退出后重新执行perl -MCPAN -e shell
cpan[1]> upgrade IO::Socket::SSL
cpan[1]> upgrade DateTime::TimeZone
cpan[1]> upgrade Net::SMTP
cpan[1]> install Moo
yum install “perl(DBD::mysql)”
5、下一步是使用WEB安装器来配置OTRS,其过程本章另有描述。
http://localhost/otrs/installer.pl
https://doc.otrs.com/doc/manual/admin/6.0/zh_CN/html/web-installer.html
配置完毕后,现在你可以启动OTRS守护进程并激活相应的监控此进程的cron任务(必须以otrs用户执行):
shell> /opt/otrs/bin/otrs.Daemon.pl start
shell> /opt/otrs/bin/Cron.sh start
可以从OTRS官网下载ITSM组件或者从以下ftp中下载
ftp://ftp.otrs.org/pub/otrs/itsm
安装itsm
su otrs
/opt/otrs/bin/otrs.Console.pl Admin::Package::Install ITSM-6.0.29.opm
ITSM-6.0.29.opm 是一个捆绑包,包括了
| After a successful installation, the following packages will be installed and shown by the package manager:
| GeneralCatalog 6.0.29 ITSMCore 6.0.29 ITSMIncidentProblemManagement 6.0.29
| ITSMConfigurationManagement 6.0.29 ITSMChangeManagement 6.0.29
| ITSMServiceLevelManagement 6.0.29 ImportExport 6.0.29
如果 ITSM-6.0.29.opm安装一直报错,也可以将每个子附件安装上
su otrs
/opt/otrs/bin/otrs.Console.pl Admin::Package::Install GeneralCatalog-6.0.29.opm
/opt/otrs/bin/otrs.Console.pl Admin::Package::Install ITSMCore-6.0.29.opm
/opt/otrs/bin/otrs.Console.pl Admin::Package::Install ITSMChangeManagement-6.0.29.opm
/opt/otrs/bin/otrs.Console.pl Admin::Package::Install ITSMConfigurationManagement-6.0.29.opm
/opt/otrs/bin/otrs.Console.pl Admin::Package::Install ITSMIncidentProblemManagement-6.0.29.opm
/opt/otrs/bin/otrs.Console.pl Admin::Package::Install ITSMServiceLevelManagement-6.0.29.opm
/opt/otrs/bin/otrs.Console.pl Admin::Package::Install ImportExport-6.0.29.opm
bug讨论
https://bugs.otrs.org
otrs产品文档说明地址:
https://doc.otrs.com/
otrs历史版本下载地址:
https://ftp.otrs.org/pub/otrs/
更新OTRS在线仓库
由于otrs不在维护6版本,因此,在线仓库地址可能会无效,需要我们手工更改为可用的在线仓库地址
在系统配置中有两个配置内容需要更改:
Package::RepositoryRoot
https://ftp.otrs.org.cn/pub/otrs/misc/packages/repository.xml
Package::RepositoryList
https://ftp.otrs.org.cn/pub/otrs/itsm/bundle6
这是我自己搭建的一个访问地址
https://resource-sea.xx.net/download/resource/test/repository.xml
最后更新为以下地址即可:
https://download.znuny.org/releases/misc/packages/repository.xml
https://download.znuny.org/releases/itsm/bundle6