【文章內(nèi)容簡介】
60。 使用圖形報表(jpgraph) $g_jpgraph_path = c:/qa/mantis/core/jpgraph/src/39。 JPGraph路徑 ,注意最后的’/’要加,激活“extension=”和“extension=”;另外如果extension_dir項不正確,請把extension_dir改為正確的值。將PHP\\System32目錄下,這兩個模塊是JPGraph在顯示圖表和進(jìn)行漢字編碼轉(zhuǎn)換是所必須的;現(xiàn)在再打開Mantis的統(tǒng)計頁面,可以看到多了圖形報表,分別按狀態(tài)等進(jìn)行統(tǒng)計的圖形報表,包括柱圖、餅圖和線圖,但是圖形中有很多亂碼,那是因為Mantis中默認(rèn)是通過UTF8設(shè)置JPGraph,而我們界面語言是用簡體中文,因此漢字顯示出來都是亂碼。解決方法很簡單:在Mantis\$g_graph_font = 39。39。改為$g_graph_font = 39。simsum39。由于Mantis中圖形報表默認(rèn)字體里不含有中文,因此我們要在Mantis\core\;在function graph_get_font() {...}中font_map增加39。simsum39。 = FF_SIMSUN ,以供Mantis調(diào)用。這樣以來,在圖形報表中就能看到簡體中文了。補(bǔ)充一下linux下的安裝過程1 所需軟件 MySQL Apache PHP mantis Jpgraph Graphviz 瀏覽支持 CVSWeb2 安裝步驟 安裝Mysql安裝mysql server rpm ivh 安裝mysql rpm ivh 安裝mysql其他包 rpm –ivh rpm –ivh rpm –ivh 運(yùn)行mysql 客戶端,并開放root用戶的遠(yuǎn)程訪問權(quán)限。以便調(diào)試 mysql use mysql update user set host = `%` where user = `root` and host `localhost`。 exitMysql安裝完畢?!“惭bapache tar zxvf cd ./configure prefix=/web/apache enablemodule=so make make installApache安裝完畢。說明:apache在linux下的默認(rèn)最大進(jìn)程數(shù)為256。如果想加大這個限制,在編譯apache前編輯/home/tmp/apache/src/include/,將其中define HARD_SERVER_LIMIT 256 一行改為define HARD_SERVER_LIMIT 2048后再編譯apache?!“惭bGD庫 jpeg6b 的安裝 tar xf cd jpeg6b ./configure make make install zlib 的安裝 tar –zxvf cd ./configure make make install libpng 的安裝 tar –zxvf cd ./configure make make install freetype 的安裝 tar –zxvf cd ./configure make make install T1lib 的安裝 tar –zxvf cd ./configure make make install gd 的安裝 tar –zxvf cd ./configure vi Makefile(編輯 Makefile文件改 CFLAGS=O 為 CFLAGS=O DHAVE_XPM DHAVE_JPEG DHAVE_LIBTTF改 LIBS=lm lgd lpng lz 為 LIBS=lm lgd lpng lz ljpeg lttf lXpm lX11改 INCLUDEDIRS=I. I/usr/local/include I/usr/include/X11 I/usr/X11R6/include/X11為 INCLUDEDIRS=I. I/usr/local/include I/usr/include/X11 I/usr/X11R6/include/X11 I/usr/local/include/freetype) make make install 安裝php tar zxvf cd ./configure prefix=/web/php \withapxs2=/web/apache/bin/apxs \withconfigfilepath=/usr/local/lib \enabletrackvars \withxml \withmysql \withlibxmldir=/usr/local/lib \withgd=/usr/local \witht1lib=/usr/local \withtiffdir=/usr/local \withjpegdir=/usr/include \withttf=/usr/include/freetype \withzlibdir=/usr/include \withpngdir=/usr/include \withmbstring enablembstring=all make make install cp /usr/local/lib/extension_dir = ./為extension_dir = /web/php/include/php/ext GD庫的安裝檢查安裝完畢后用? phpinfo()。 ?查看結(jié)果如下:gdGD Support enabledGD Version or higherFreeType Support enabledFreeType Linkage with TTF libraryT1Lib Support enabledGIF Support enabledJPG Support enabledPNG Support enabledWBMP Support enabled 安裝Mantis mv /var//mantis 建立數(shù)據(jù)庫bugtracker及用戶mantis$mysqladmin u root p create bugtracker//輸入MySQL的root密碼即可完成創(chuàng)建數(shù)據(jù)庫bugtracker的操作$mysql u root pmysqlgrant all privileges on bugtracker.* to 39。mantis39。@39。localhost39。 identified by 39。你指定的mantis用戶密碼39。mysqlFLUSH PRIVILEGES。mysql\q 安裝Zend Optimizertar zxvf cd .///重啟Apache/web/apache/bin/apachectl –k restart 配置mantis cd /var//mantis vi //修改以下幾行$g_db_username = mantis。$g_db_password = 你在建立用戶時指定的密碼。$g_database_name = bugtracker。//增加以下幾行$g_path = 。$g_icon_path = $g_path.images/。$g_absolute_path = /var//mantis/。$g_use_iis = OFF。$g_show_version = ON。//以下是配置郵件的,Mantis使用郵件來進(jìn)行注冊和通知,所以必須配置好$g_enable__notification = ON。 開通郵件通知$g_smtp_host = 39。39。 SMTP 服務(wù)器$g_smtp_username = 39。esm@39。 郵箱登錄用戶名$g_smtp_password = 39。對應(yīng)用戶郵箱的密碼39。