zoukankan      html  css  js  c++  java
  • Centos6.9部署ORTS5.0.22

    1.安装数据库

    为了使用默认InnoDB引擎,Centos6.9上默认yum安装mysql5.1.73版本的,orts在初始化数据库时要求log大小要大于250M以上,因此干净安装Centos后,先安装MariaDB5.5版本。

    1)在/etc/yum.repos.d/目录创建MariaDB.repo文件,内容如下:

    # MariaDB 5.5 CentOS repository list - created 2014-03-04 11:20 UTC
    # http://mariadb.org/mariadb/repositories/
    [mariadb]
    name = MariaDB
    baseurl = http://yum.mariadb.org/5.5/centos6-amd64
    gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
    gpgcheck=1
    

    2)在Shell环境下执行命令

    # yum install MariaDB-server MariaDB-client
    

    3)启动MariaDB

    /etc/init.d/mysql start
    Starting MySQL.170914 16:06:17 mysqld_safe Logging to '/var/lib/mysql/BlueTek-testapp-OTRS-01-WEB.err'.
    170914 16:06:17 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    . SUCCESS! 
    

    4)设置密码

    /usr/bin/mysqladmin -uroot password 'glpuser1!'
    

    5)设置相关权限

    MySQL [(none)]> use mysql;
    MySQL [mysql]> update user set host='%' where user='root' and host='127.0.0.1';
    MySQL [mysql]> grant all privileges on *.* to 'root'@'%' identified by 'adminadmin' with grant option;
    MySQL [mysql]> flush privileges; 

    6)安全相关(实际上是关闭了)

    # vi /etc/sysconfig/iptables
    #iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
    # service iptables restart
    

    关闭防火墙:

    # service iptables stop
    # sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config # chkconfig --del ip6tables # chkconfig --del iptables

    关闭Selinux:

    # setenforce 0
    setenforce: SELinux is disabled
    # getenforce
    Disabled
    

    7)设置MariaDB:

    使用文本编辑器来创建一个新文件/etc/my.cnf.d/zotrs.cnf,包含如下内容: 

    [mysqld]
    max_allowed_packet   = 20M
    query_cache_size     = 32M
    innodb_log_file_size = 256M
    

    注:改了innodb_log_file_size参后,启动下面报错,然来是改了这个参数后需要关闭MYSQLSQL并删除ib_logfile0, ib_logfile1这些文件,再启动MYSQL,否则无法启动,为此折腾了一会。

    2、安装otrs

    1)先下载安装包

    wget http://ftp.otrs.org/pub/otrs//RPMS/rhel/6/otrs-5.0.22-01.noarch.rpm
    

    2)使用yum通过命令行来安装OTRS,它还会拉入一些依赖包如Apache WEB服务器和一些Perl模块。确保你已经将OTRS RPM文件复制到了当前目录。

    shell> yum install --nogpgcheck otrs-x.x.*.rpm
    ...
    Dependencies Resolved
    
    ================================================================================
     Package                    Arch   Version                Repository       Size
    ================================================================================
    Installing:
     otrs                       noarch x.x.x-01               /otrs-x.x.x-01.noarch
                                                                               74 M
    Installing for dependencies:
     apr                        x86_64 1.3.9-5.el6_2          updates         123 k
     ...
     procmail                   x86_64 3.22-25.1.el6          base            163 k
    
    Transaction Summary
    ================================================================================
    Install      26 Package(s)
    
    Total size: 80 M
    Total download size: 6.0 M
    Installed size: 88 M
    Downloading Packages:
    (1/25): apr-1.3.9-5.el6_2.x86_64.rpm                     | 123 kB     00:00
    ...
    (25/25): procmail-3.22-25.1.el6.x86_64.rpm               | 163 kB     00:00
    --------------------------------------------------------------------------------
    Total                                           887 kB/s | 6.0 MB     00:06
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Installing : apr-1.3.9-5.el6_2.x86_64                               1/26
      ...
      Installing : otrs-x.x.x-01.noarch                                   26/26
    Check OTRS user ... otrs added.
    
    ...
    
    shell>
    

    3)启动apache

    # service httpd start 
    

    4)安装额外的perl模块

    除了通过RPM包安装的Perl模块外,OTRS还需要一些其它的Perl模块,你可以手动安装。通过执行位于目录/opt/otrs下的文件bin/otrs.CheckModules.pl来检查缺失的模块。一些模块只是可选的功能才需要,比如与IMAP服务器通讯或生成PDF。在RedHat或CentOS上我们推荐从EPEL软件仓库安装这些模块,EPEL是由Fedora项目维护的一个软件仓库,为RHEL及其分支提供高质量的软件包。可在EPEL网站上查看更多信息。

    如果你使用的是RHEL 7或CentOS 7,你可以从这个网址获得最新的EPEL软件包。你可以执行下面的命令添加EPEL软件仓库到yum源:

    shell> yum -y install http://download.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-8.noarch.rpm
    
    ...
    
    Installed:
      epel-release.noarch 0:7-8
    
    Complete!
    

    添加这个软件仓库后首次使用yum,会提示你要添加它的密钥。现在你可以像下面这样安装缺失的模块了。

    shell> yum -y install "perl(Text::CSV_XS)"
    
    ...
    
    Installed:
      perl-Text-CSV_XS.x86_64 0:0.85-1.el6
    
    Complete!
    shell>
    

    下一步是使用WEB安装器来配置OTRS,其过程本章另有描述

    在安装完OTRS软件后,你可以使用OTRS的WEB安装器来设置和配置OTRS数据库。WEB安装器是一个能通过浏览器访问的WEB页面。WEB安装器的地址是: http://localhost/otrs/installer.pl 

    现在你可以启动OTRS守护进程并激活相应的监控此进程的cron任务(必须以otrs用户执行):

    shell> /opt/otrs/bin/otrs.Daemon.pl start
    shell> /opt/otrs/bin/Cron.sh start
    

    就这样了,恭喜搞定!

    参考文章:

    http://doc.otrs.com/doc/manual/admin/stable/zh_CN/html/installation.html#installation-on-centos

    https://blog.mulinux.com/ops/108.html

      

     

      

      

  • 相关阅读:
    Java常见问题汇总
    前端url参数中带有callback并产生错误
    shiro中ecache-core版本引起的异常
    深入SpringMVC注解
    导出表格数据到excel并下载(HSSFWorkbook版)
    layui数据表格及分页
    签名的生成
    程序的健壮性Robustness
    ASP.NET MVC中注册Global.asax的Application_Error事件处理全局异常
    生成二维码功能
  • 原文地址:https://www.cnblogs.com/ld1977/p/7523658.html
Copyright © 2011-2022 走看看