设为首页 收藏本站
查看: 493|回复: 0

[经验分享] 开源it管理系统OTRS (Open Ticket Request System)

[复制链接]

尚未签到

发表于 2019-1-26 15:27:20 | 显示全部楼层 |阅读模式
http://doc.otrs.org/3.1/en/html/manual-installation-of-otrs.html#preparing-manual-installation

Installation from source (Linux, Unix)


Preparing the installation from source






  If you want to install OTRS from source, first download the source archive as .tar.gz, .tar.bz2, or .zip file from http://www.otrs.org/downloads/
  Unpack the archive (for example, using tar) into the directory /opt, and rename the directory from otrs-3.1.x to otrs (see Script below).


linux:/opt# tar xf /tmp/otrs-3.1.tar.gzlinux:/opt# mv otrs-3.1 otrslinux:/opt# lsotrslinux:/opt#
  Script: First steps to install OTRS.
  OTRS should NOT be run with root rights. You should add a new user for OTRS as the next step. The home directory of this new user should be /opt/otrs. If your web server is not running with the same user rights as the new 'otrs' user, which is the case on most systems, you have to add the new 'otrs' user to the group of the web server user (see Script below).


linux:/opt# useradd -r -d /opt/otrs/ -c 'OTRS user' otrslinux:/opt# usermod -G nogroup otrslinux:/opt#
  Script: Adding a new user 'otrs', and adding it to a group.
  Next, you have to copy some sample configuration files. The system will later use the copied files. The files are located in /opt/otrs/Kernel and /opt/otrs/Kernel/Config and have the suffix .dist (see Script below).


linux:/opt# cd otrs/Kernel/linux:/opt/otrs/Kernel# cp Config.pm.dist Config.pmlinux:/opt/otrs/Kernel# cd Configlinux:/opt/otrs/Kernel/Config# cp GenericAgent.pm.dist GenericAgent.pm
  Script: Copying some sample files.
  The last step to prepare the installation of OTRS is to set the proper access rights for the files. You can use the script otrs.SetPermissions.pl, which is located in the bin directory, in the home directory of the 'otrs' user. You can execute the script with the following parameters:
  otrs.SetPermissions.pl { Home directory of the OTRS user } { --otrs-user= OTRS user } { --web-user= Web server user } [ --otrs-group= Group of the OTRS user ] [ --web-group= Group of the web server user ]


  If your web server is running with the same user rights as user 'otrs', the command to set the proper access rights is otrs.SetPermissions.pl /opt/otrs --otrs-user=otrs --web-user=otrs. On SUSE systems the web server is running with the user rights of 'wwwrun'. On Debian-based systems this is 'www-data'. You would use the command otrs.SetPermissions.pl /opt/otrs --otrs-user=otrs --web-user=wwwrun --otrs-group=nogroup --web-group=www to set the proper access rights.




Installation of Perl modules






  OTRS needs some additional Perl modules, as described in Table 3-1. If you install OTRS from source, you will have to install these modules manually. This can be done either with the package manager of your Linux distribution (yast, apt-get) or, as described in this section, through the Perl shell and CPAN. If you're using ActiveState Perl, for instance on Windows, you could use PPM, the built-in Perl Package Manager. We recommend using your package manager if possible.

Table 3.1. Needed Perl modules for OTRS


Name
Description


DBI
Establishes a connection to the database back-end.


DBD::mysql
Contains special functions to connect to the MySQL database back-end (only required if MySQL is used).


DBD::pg
Contains special functions to connect to the PostgreSQL database back-end (only required if PostgreSQL is used).


Digest::MD5
Allows the use of the md5 algorithm.


CSS::Minifier
Minifies a CSS file and writes the output directly to another file.


Crypt::PasswdMD5
Provides interoperable MD5-based crypt functions.


MIME::Base64
Encodes / decodes Base64 strings, e.g. for mail attachments.


JavaScript:Minifier
Minifies a JavaScript file and writes the output directly to another file.


Net::DNS
Perl interface to the domain name system.


LWP::UserAgent
Processes HTTP requests.


Net::LDAP
Perl interface to a LDAP directory (only required if an LDAP back-end is used).


GD
Interface to the GD graphics library (only required if the OTRS stats module is used).


GD::Text, GD::Graph, GD::Graph::lines, GD::Text::Align
Some more text and graphic tools for the GD graphics library (only required if the OTRS stats module is used).


PDF::API2, Compress::Zlib
Needed to generate the PDF output for reports, search results and for the ticket print view.




  


  You can verify which modules you need to install with otrs.CheckModules.pl. This script is located in the bin directory, in the home directory of the 'otrs' user (see Script below).
  Please note that some modules are optional.


linux:~# cd /opt/otrs/bin/linux:/opt/otrs/bin# ./otrs.CheckModules.pl   o CGI............................ok (v3.49)   o Crypt::PasswdMD5...............ok (v1.3)   o CSS::Minifier..................ok (v0.01)   o Date::Format...................ok (v2.24)   o Date::Pcalc....................ok (v1.2)   o DBI............................ok (v1.609)   o DBD::mysql.....................ok (v4.013)   o Digest::MD5....................ok (v2.36_01)   o Encode::HanExtra...............ok (v0.23)   o GD.............................ok (v2.44)      o GD::Text....................ok (v0.86)      o GD::Graph...................ok (v1.44)      o GD::Graph::lines............ok (v1.15)      o GD::Text::Align.............ok (v1.18)   o IO::Scalar.....................ok (v2.110)   o IO::Wrap.......................ok (v2.110)   o JavaScript::Minifier...........ok (v1.05)   o JSON...........................ok (v2.21)      o JSON::PP....................ok (v2.27003)      o JSON::XS....................Not installed! (Optional - Install it for faster AJAX/JavaScript handling.)   o LWP::UserAgent.................ok (v5.829)   o Mail::Internet.................ok (v2.06)   o Mail::POP3Client...............ok (v2.18 )      o IO::Socket::SSL.............ok (v1.31)   o MIME::Base64...................ok (v3.07_01)   o MIME::Tools....................ok (v5.428)   o Net::DNS.......................ok (v0.65)   o Net::POP3......................ok (v2.29)   o Net::IMAP::Simple..............ok (v1.1916)      o Net::IMAP::Simple::SSL......ok (v1.3)   o Net::SMTP......................ok (v2.31)      o Authen::SASL................ok (v2.15)      o Net::SMTP::SSL..............ok (v1.01)   o Net::LDAP......................ok (v0.4001)   o PDF::API2......................ok (v0.73)      o Compress::Zlib..............ok (v2.008)   o SOAP::Lite.....................ok (v0.712)   o Text::CSV......................ok (v1.18)      o Text::CSV_PP................ok (v1.26)      o Text::CSV_XS................Not installed! (Optional - Optional, install it for faster CSV handling.)   o XML::Parser....................ok (v2.36)linux:/opt/otrs/bin#
  Script: Checking needed modules.
  You should strive to install the missing modules from your Linux distribution's package management system. In that way, the packages will be automatically updated when new versions are available or when security issues are found. Please refer to your distribution's documentation on how to install additional packages. If the (correct version of) the module is not available from the package repositories, you can also install from CPAN, the Comprehensive Perl Archive Network.
  To install one of the modules from above via CPAN, you have to execute the command perl -e shell -MCPAN. The Perl shell will be started in interactive mode and the CPAN module will be loaded. If CPAN is already configured, you can install the modules with the command install followed by the name of the module. CPAN takes care of the dependencies of a module to other Perl modules and will let you know if other modules are needed.
  Execute also the commands perl -cw bin/cgi-bin/index.pl perl -cw bin/cgi-bin/customer.pl and perl -cw bin/otrs.PostMaster.pl after changing into the directory /opt/otrs. If the output of both commands is "syntax OK", your Perl is properly set up (see Script below).


linux:~# cd /opt/otrslinux:/opt/otrs# perl -cw bin/cgi-bin/index.plcgi-bin/installer.pl syntax OKlinux:/opt/otrs# perl -cw bin/cgi-bin/customer.plcgi-bin/customer.pl syntax OKlinux:/opt/otrs# perl -cw bin/otrs.PostMaster.plbin/otrs.PostMaster.pl syntax OKlinux:/opt/otrs#
  Script: Syntax check.




Configuring the Apache web server






  This section describes the basic configuration of the Apache web server with mod_cgi for OTRS. The web server should be able to execute CGI scripts. OTRS won't work if the Perl scripts cannot be parsed. Check the configuration files of your web server, and search for the line that loads the CGI module. If you see something like the following, the CGI module should already be in use.
  LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so
  To access the web interface of OTRS conveniently via a short address, Alias and ScriptAlias entries are needed. Most Apache installations have a conf.d directory included. On Linux systems you can find this directory very often under /etc/apache or /etc/apache2. Log in as root, change to the conf.d directory and copy the appropriate template in /opt/otrs/scripts/apache2-httpd.include.conf to a file called otrs.conf in the Apache configuration directory.
  Restart your web server to load the new configuration settings. On most systems you can start/restart your web server with the command /etc/init.d/apache2 restart (see Script below).


linux:/etc/apache2/conf.d# /etc/init.d/apache2 restartForcing reload of web server: Apache2.linux:/etc/apache2/conf.d#
  Script: Restarting the web server.
  Now your web server should be configured for OTRS.
  If you choose to increase performance and you can install mod_perl, then you can leave mod_cgi off, and configure the Apache web server for use with mod_perl, in the following manner:
  Please ensure that mod_perl is installed and loaded, in order to take advantage of this feature. Due to the nature of the start-up script, your server will not fail to start if mod_perl is not properly loaded or compiled in your apache web server, unless mod_cgi is also on. Technically speaking you can leave mod_cgi on as well, but you should not.
  Search your /etc/apache* directory for mod_perl.so (see Script below) to see if the module is already loaded.


#:/ grep -Rn mod_perl.so /etc/apache*
  Script: Searching for mod_perl.
  When you use the appropriate start script listed above and the module is loaded, the script (when commented in) /opt/otrs/scripts/apache2-perl-startup.pl can be used to load the perl modules into memory one time, saving on load times and increasing performance.




Configuring the database








The simple way - Using the web installer (works only with MySQL)






  If you use MySQL as the database back-end, you can use the OTRS web installer: http://localhost/otrs/installer.pl .
  When the web installer starts, please follow the next steps to setup your system:
  1. Check out the information about the OTRS offices and click on next to continue (see Figure below).




  Figure: Welcome screen.
  2. Read the GNU Affero General Public License (see Figure below) and accept it, by clicking the corresponding button at the bottom of the page.




  Figure: GNU Affero General Public License.
  3. Provide the username and password of the administrator, the DNS name of the computer which hosts OTRS and the type of database system to be used. After that, check the settings (see Figure below).




  Figure: Database initial settings.
  You will be notified if the check was successful. Press OK to continue (see Figure below).




  Figure: Notification for successful check.
  4. Create a new database user, choose a name for the database and click on 'Next' (see Figure below).

Warning
  It is never a good idea to use default passwords. Please change the default password for the OTRS database!






  Figure: Database settings.
  If the database and its user were successfully created, you will get a setup notification, as shown in Figure. Click 'Next' to go to the next screen.




  Figure: Notification indicating successful database setup.
  5. Provide all the required system settings and click on 'Next' (see Figure below).




  Figure: System settings.
  6. If you want, you can provide the needed data to configure your inbound and outbound mail, or skip this step by pressing the right button at the bottom of the screen (see Figure below).




  Figure: Mail configuration.
  7. Restart the OTRS service now to use the new configuration settings as shown in the script below.


linux:~ # rcotrs restart-forceShutting down OTRS Disable /opt/otrs/bin/otrs.PostMaster.pl ... done.no crontab for otrs Shutting down cronjobs ... failed!Shutting down OTRS (completely) Shutting down Apache ... done. Shutting down MySQL ... done.                                                                     doneStarting OTRS (completely) Starting Apache ... done. Starting MySQL ... done.Starting OTRS Checking Apache ... done. Checking MySQL ... done. Checking database connect... (It looks Ok!). Enable /opt/otrs/bin/otrs.PostMaster.pl ... done. Checking otrs spool dir...  done. Creating cronjobs (source /opt/otrs/var/cron/*) ... done.  -->> http://linux.example.com/otrs/index.pl

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-667936-1-1.html 上篇帖子: virt 下篇帖子: ping: icmp open socket: Operation not permitted 的解决办法
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表