安装OTRS

来源:互联网 发布:淘宝火炬红包微信群 编辑:程序博客网 时间:2024/06/01 16:52

最近在整OTRS,把自己的安装心得写下来,希望对大家有所帮助.

 http://otrs.org/downloadsDownload 下载源文件,我下的是3.0.11版本.

下载成功后将它放在/opt目录下.执行如下命令:


cd /opt && tar xf otrs-3.0.11.tar.gz && cp otrs-3.0.11 otrs -raf
aptitude install libapache2-mod-perl2 libdbd-mysql-perl libnet-dns-perl libnet-ldap-perl libio-socket-ssl-perl libpdf-api2-perl libsoap-lite-perl libgd-text-perl libgd-graph-perl libapache-dbi-perl mysql-server

#安装这个时,会要求设置mysql数据库的密码,一般都设置为otrs


useradd -r -d /opt/otrs/ -c 'OTRS user' otrs
usermod -g www-data otrs
cd /opt/otrs/Kernel && cp Config.pm.dist Config.pm && cp Config/GenericAgent.pm.dist Config/GenericAgent.pm
cd /opt/otrs && bin/otrs.SetPermissions.pl --otrs-user=otrs --otrs-group=otrs --web-user=www-data --web-group=www-data /opt/otrs
cp /opt/otrs/scripts/apache2-httpd.include.conf /etc/apache2/conf.d/otrs.conf
service apache2 restart
cd /etc/apache2 && sed -i 's/www-data/otrs/' envvars  && service apache2 restart
上述命令执行成功后,打开浏览器进入这个界面 http://127.0.0.1/otrs/installer.pl安装,到设置mail服务器时,可以跳过.直到成功.
在文件/opt/otrs/scripts/apache2-perl-startup.pl中找到
#use Apache::DBI ();
#Apache::DBI->connect_on_init('DBI:mysql:otrs', 'otrs','my-secret-pass');
use DBI ();
去除#号后将my-secret-pass改为otrs


执行如下命令:
cd /opt/otrs/var/cron
for foo in *.dist; do cp $foo `basename $foo .dist`; done # copies all files with .dist extension to regular name
cd /opt/otrs
bin/Cron.sh start otrs
安装成功.到http://127.0.0.1/otrs/index.pl访问.用户名为root@localhost 密码为root


原创粉丝点击