otrs下載地址為:http://www.otrs.com/en/open-source/get-otrs/software-download/
安裝配置步驟參考這里:http://www.365master.com/event/zw2012/20120813/67556.shtml
安裝完畢后無法打開初始頁面,於是重啟服務,提示了一些錯誤:
DBI connect('database=otrs;host=localhost;','otrs',...) failed: Access denied for user 'otrs'@'localhost' (using password: YES) at d:/PROGRA~1/OTRS/OTRS/Kernel/System/DB.pm line 253
ERROR: OTRS-otrs.Scheduler-10 Perl: 5.12.3 OS: MSWin32 Time: Thu Jun 6 16:33:09 2013
Message: Access denied for user 'otrs'@'localhost' (using password: YES)
Traceback (7940):
Module: Kernel::System::DB::new (OTRS 3.2.7) Line: 224
Module: main::_CommonObjects (unknown version) Line: 607
Module: d:/PROGRA~1/OTRS/OTRS/bin/otrs.Scheduler4win.pl (unknown version) Line: 86
Got no DBObject! at d:/PROGRA~1/OTRS/OTRS/Kernel/System/PID.pm line 78.
Cron Service (CRONw) 服務正在停止.....
Cron Service (CRONw) 服務已成功停止。
The Apache2.2 service is not started.
沒有啟動 MySQL 服務。
請鍵入 NET HELPMSG 3521 以獲得更多的幫助。
MySQL 服務正在啟動 ...
MySQL 服務無法啟動。
系統出錯。
發生系統錯誤 1067。
進程意外終止。
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 10.120.147.58 for ServerName
Writing to d:/PROGRA~1/OTRS/CRONw/crontab.txt...
Done.
Cron Service (CRONw) 服務正在啟動 .
Cron Service (CRONw) 服務已經啟動成功。
DBI connect('database=otrs;host=localhost;','otrs',...) failed: Access denied for user 'otrs'@'localhost' (using password: YES) at d:/PROGRA~1/OTRS/OTRS/Kernel/System/DB.pm line 253
ERROR: OTRS-otrs.Scheduler-10 Perl: 5.12.3 OS: MSWin32 Time: Thu Jun 6 16:33:42 2013
Message: Access denied for user 'otrs'@'localhost' (using password: YES)
Traceback (6700):
Module: Kernel::System::DB::new (OTRS 3.2.7) Line: 224
Module: main::_CommonObjects (unknown version) Line: 607
Module: d:/PROGRA~1/OTRS/OTRS/bin/otrs.Scheduler4win.pl (unknown version) Line: 179
Got no DBObject! at d:/PROGRA~1/OTRS/OTRS/Kernel/System/PID.pm line 78.
解決步驟如下:
1. 創建mysql的表
C:\Documents and Settings\yuechaotian>mysql -u root -p otrs < "D:\Program Files\OTRS\OTRS\scripts\database\otrs-schema.mysql.sql"
Enter password:
C:\Documents and Settings\yuechaotian>mysql -u root -p otrs < "D:\Program Files\OTRS\OTRS\scripts\database\otrs-initial_insert.mysql.sql"
Enter password:
C:\Documents and Settings\yuechaotian>mysql -u root -p otrs < "D:\Program Files\OTRS\OTRS\scripts\database\otrs-schema-post.mysql.sql"
Enter password:
2. 修改otrs的Config.pm中數據庫的連接
# ---------------------------------------------------- #
# database settings #
# ---------------------------------------------------- #
# The database host
$Self->{DatabaseHost} = 'localhost';
# The database name
$Self->{Database} = 'otrs';
# The database user
$Self->{DatabaseUser} = 'root';
# The password of database user. You also can use bin/otrs.CryptPassword.pl
# for crypted passwords
$Self->{DatabasePw} = '';
3. 修改OTRS中apache的ServerName
D:\Program Files\OTRS\Apache\conf\httpd.conf
ServerName <我的IP>:80
4. 重啟成功
C:\>"D:\Program Files\OTRS\otrs4win\Scripts\OTRSServicesRestart.bat"
Cron Service (CRONw) 服務正在停止.
Cron Service (CRONw) 服務已成功停止。
The Apache2.2 service is not started.
MySQL 服務正在停止..
MySQL 服務已成功停止。
MySQL 服務正在啟動 .
MySQL 服務已經啟動成功。
Writing to d:/PROGRA~1/OTRS/CRONw/crontab.txt...
Done.
Cron Service (CRONw) 服務正在啟動 .
Cron Service (CRONw) 服務已經啟動成功。