基於Windows和linux下開源缺陷跟蹤系統Mantis安裝和安裝配置手冊


  • xiaoningln 發佈於 2007-01-26 13:35:23 php

    基於Windows下開源缺陷跟蹤系統Mantis安裝


    1. 簡介
    mantis(螳螂)是一個基於php/MySQL/web的缺陷跟蹤系統,最新版本是1.0.1。
    要了解更多信息請到 http://www.mantisbt.org/
     
    2. 下載
    mantis-1.0.1                                     http://www.mantisbt.org/download.php
    mysql-5.0.20-win32.zip                      http://dev.mysql.com/downloads/mysql/5.0.html
    php-5.1.2-Win32.zip                          http://www.php.net/downloads.php
    apache_2.0.55-win32-x86-no_ssl.msi    http://httpd.apache.org/download.cgi

    3. 安裝步驟
     下面是我安裝時設置的目錄
       c:\qa
       c:\qa\mantis
       c:\qa\mysql
       c:\qa\php
       c:\qa\apache

      首先安裝的是 apache_2.0.55
       Apache是著名的服務器,開始安裝的時候老是遇到系統找不到指定的文件,沒有安裝名爲apache2的服務器。在網上查找找到
       若是系統安有IIS服務,再安裝Apache,就會出現上面錯誤。 解決的方法是 把IIS服務停掉,並在「添加刪除windows組件」中去除IIS組件。
       根據這樣的提示操做以後,我再次安裝了Apache,前面幾項只需點「NEXT」就好了,到了要求填寫network domain、server domain、和email的時候
       若是沒有域名,就隨便寫點,也沒有什麼影響。
       接下來 配置Apache
       在 c:\qa\apache\conf目錄下,打開httpd.conf進行配置apache.查找"DirectoryIndex",這是設定主頁的首頁的文件名,爲了支持PHP,我是這樣更改:
       更改前爲:DirectoryIndex index.html index.html.var,
       更改後爲:DirectoryIndex index.html index.html.var index.php,也就是在其後面添加index.php。
       查找"DocumentRoot",這是指定主頁放置的目錄,默認爲C:/qa/apache/apache2/htdocs,可使用默認的,也能夠本身指定,好比D:/test
      安裝 php
      將php-5.1.2-Win32.zip解壓縮到c:\qa\php下,把 
      fdftk.dll 
      fribidi.dll 
      gds32.dll 
      libeay32.dll 
      libmhash.dll 
      libmysql.dll 
      ntwdblib.dll 
      php5isapi.dll 
      php5nsapi.dll 
      php5ts.dll 
      ssleay32.dll 
      yaz.dll
      這些文件copy到C:\windows\system32下,同時複製 c:\qa\php 目錄下的 php.ini-dist 文件到 C:\windows\ 目錄下,並更名爲 php.ini。
      配置php.ini
      找到下面兩行; Directory in which the loadable extensions (modules) reside. extension_dir = "./"
      將extension_dir 的路徑修改成你本身安裝的路徑,
      個人是; Directory in which the loadable extensions (modules) reside. extension_dir = "C:\qa\php\ext\",
      尋找;default_charset,爲了讓其支持中文,能夠修改默認的字符集,可以使用"UTF-8"或者"GB2312"或者"GBK",都行,它默認的是;default_charset="iso-8859-1",修改就好了.
      修改httpd.conf
      添加下面代碼。LoadModule php5_module C:/qa/php/php5apache2.dll 
      AddType application/x-httpd-php . 到文件的尾部。
      php LoadModule是加載PHP模塊,路徑必定要準確。 
      AddType 是讓apache支持PHP類型。 保存httpd.conf。
      測試apache安裝結果
      修改好配置文件後,重啓apache
      隨便編寫一個PHP文件放到D:/test下,好比:寫上下面幾行
      <?
        echo "hello world";
      ?>
      並保存爲1.php,打開瀏覽器,輸入:http://localhost/1.php,就會出現hello world,如今Apache+PHP配置已經徹底成功了,
      值得注意的一點就是每次修改httpd.conf後,都得重啓一次apache才能生效。

      安裝Mysql
       Mysql 的安裝比較簡單,就不一一說明了,由於我想讓數據庫支持中文 就在安裝的時候 把編碼該成GBK。
       啓動 Mysql的服務。
      部署mantis

       將mantis-1.0.1解壓縮到php的發佈目錄中 c:\qa\mantis,因爲1.0.1中取消了原來\sql\db_generate.sql 的數據庫腳本而採用了經過系統來創建環境。
      經過瀏覽器訪問http://localhost/mantis/admin/install.php可看到部署mantis數據庫環境的界面。
      默認的數據庫是bugtracker,注意要使用有管理員權限的用戶來創建數據庫(創建好bugtracker數據庫),我用了root 。
      設定好了install/upgrade database以後正常狀況下在輸出反饋頁面下一片綠色的good,那就是ok了,
      要是有紅色的bad,那要調整好了再初始化到ok才行,這時候mysql新增的bugtracker庫裏創建起不少以mantis_開頭的表,到此數據庫初始化結束。

      設置Mantis
     將c:\qa\mantis中的config_inc.php.sample複製一份,更名爲config_inc.php,修改其中的設置;
     在config_defaults_inc.php中保存這Mantis的默認設置:用戶本身的設置信息保存在config_inc.php中,
     若是某個選項在config_inc.php中有設置,則系統使用config_inc.php中的設置,不然使用config_defaults_inc.php的系統默認設置;
     config_inc.php.sample則是Mantis給出的一個用戶設置文件例子。
     根據狀況修改config_inc.php文件中的設置,設置很簡單,各個參數的在config_defaults_inc.php都有很詳細的說明。
     下面是個人一些自定義參數,phpmailer的內容以後說明:
    $g_use_iis = ON;            # 使用IIS 
    $g_show_version = OFF;     # 不在頁面下部顯示 Mantis的版本號
    $g_default_language = 'chinese_simplified';  # 默認語言爲簡體中文
    $g_show_project_menu_bar = ON;   # 顯示項目選擇欄
    $g_show_queries_count = OFF;              # 在頁腳不顯示執行的查詢次數 
    $g_default_new_account_access_level = DEVELOPER;                          # 默認用戶級別
    $g_window_title = 'Mantis Bug 跟蹤管理系統';            # 瀏覽器標題 
    $g_page_title = 'Rink的BUGs跟蹤管理系統';          # 頁面標題欄 
    $g_enable_email_notification = ON;                    # 開通郵件通知
    $g_smtp_host = 'smtp.***.com';                   # SMTP 服務器
    $g_smtp_username = '***';                        # 郵箱登陸用戶名 
    $g_smtp_password = '***';                         # 郵箱登陸密碼 
    $g_use_phpMailer = ON;                       # 使用 PHPMailer 發送郵件 
    $g_phpMailer_path = 'c:/qa/mantis/core/phpmailer/'; # PHPMailer 的存放路徑 
    $g_phpMailer_method = 2;       # PHPMailer 以 SMTP 方式發送 Email 
    $g_short_date_format = 'Y-m-d';      # 短日期格式,Y 大寫表示 4 位年 
    $g_normal_date_format = 'Y-m-d H:i';             # 普通日期格式 
    $g_complete_date_format = 'Y-m-d H:i:s';        # 完整日期格式 

    完成以上設置之後,你就可使用Mantis了,打開瀏覽器,輸入http://localhost/mantis
    應該就能夠看到Mantis的登陸頁面了,你能夠用默認用戶名administrator和密碼root登陸進去,進行管理設置。

    Mantis的初步安全設置
    刪除admin目錄
    在Mantis目錄下有一個admin目錄,這是Mantis管理員進行管理Mantis的,好比以前咱們構建數據庫環境的install.php等。
    使用這個模塊能夠檢查你的Mantis是否安裝徹底,對舊版本的Mantis進行升級,對Mantis的頁面CSS文件進行修改;
    使用這個管理模塊是不須要用戶名和密碼的,所以任何人均可以經過這個管理模塊查看你的Mantis系統信息,
    並且因爲有升級模塊,在這裏還能夠直接對數據庫進行修改。
    所以Mantis會建議在配置完成後將這個admin目錄刪除;注意必定是刪除而不是更名!更名後仍然是能夠訪問的!

    刪除administrator
    在添加一個具有管理員權限的用戶後,刪除系統默認的administrator用戶。
     
    PHPMail的設置

    默認狀況下,Mantis使用內置的Mailto()函數進行郵件的發送,包括新用戶註冊發送密碼、Bug改變提醒、重設密碼等郵件的發送都使用MailTo()來完成,
    不過實際使用中發現,MailTo函數好像不支持須要校驗的郵件服務器。
    其自身攜帶的PHPMailer配置起來也有問題,因此我直接將下載的PHPMailer覆蓋Mantis裏附帶的Mailer
    (c\qa\mantis\core\phpmailer)。來發送郵件。
    關於更多PHPMailer請到 http://phpmailer.sourceforge.net
    修改PHP.ini,找到include_path,增長c:\qa\mantis\core\phpmailer目錄;
    如上表所示,設置$g_use_phpMailer、$g_phpMailer_path和$g_phpMailer_method三個參數;
    如今應該就可使用PHPMailer進行郵件發送了;
     
    圖形報表(jpgraph)的設置
    默認狀況下,Mantis的圖形報表是關閉的,所以在Mantis的報表中看不到「圖形報表」的入口,
    須要安裝JPGraph模塊並設置$g_use_jpgraph爲ON才能打開圖形報表;
    下載JPGraph:從 http://www.aditus.nu/jpgraph/index.php下載JPGraph的安裝文件,當前最新版本是jpgraph-2.1.1;
    將下載下來的jpgraph-2.1.1.tar.gz解壓縮到c:\qa\mantis\core\jpgraph目錄下;
    打開config_inc.php文件,修改$g_jpgraph_path爲JPGraph的src目錄,$g_use_jpgraph爲ON;
    也就是 $g_use_jpgraph = ON;                         # 使用圖形報表(jpgraph)
          $g_jpgraph_path = c:/qa/mantis/core/jpgraph/src/';    # JPGraph路徑  ,注意最後的’/’要加

    修改PHP.ini文件,激活「extension=php_gd2.dll」和「extension=php_iconv.dll」;另外若是extension_dir項不正確,請把extension_dir改成正確的值。
    將PHP\dlls下面的iconv.dll複製到Windows\System32目錄下,以上兩個步驟使PHP自動載入php_gd2和php_iconv.dll模塊,這兩個模塊是JPGraph在顯示圖表和進行漢字編碼轉換是所必須的;
    如今再打開Mantis的統計頁面,能夠看到多了圖形報表,分別按狀態等進行統計的圖形報表,包括柱圖、餅圖和線圖,可是圖形中有不少亂碼,那是由於Mantis中默認是經過UTF-8設置JPGraph,而咱們界面語言是用簡體中文,所以漢字顯示出來都是亂碼。
    解決方法很簡單:
    在Mantis\config_inc.php中將$g_graph_font = ''改成$g_graph_font = 'simsum';
    因爲Mantis中圖形報表默認字體裏不含有中文,所以咱們要在Mantis\core\graph_api.php中相應增長對圖形標題等設置字體代碼;
    在function graph_get_font() {...}中font_map增長'simsum' => FF_SIMSUN ,以供Mantis調用。
    這樣以來,在圖形報表中就能看到簡體中文了。

    補充一下linux下的安裝過程
      
    1 所需軟件
    1.1 MySQL
    MySQL-server-4.1.10-0.i386.rpm
    MySQL-client-4.1.10-0.i386.rpm
    MySQL-devel-4.1.10-0.i386.rpm
    MySQL-shared-4.1.10-0.i386.rpm
    MySQL-shared-compat-4.1.10-0.i386.rpm
    1.2 Apache
    httpd-2.0.54.tar.gz 
    1.3 PHP
    php-5.0.4.tar.gz
    1.4 mantis
    mantis-1.1.1-bin
    1.5 Jpgraph
    jpgraph-1.19.tar.gz 
    jpegsrc.v6b.tar.gz
    zlib-1.1.3.tar.gz
    libpng-1.2.8.tar.gz
    freetype-2.1.10.tar.gz
    t1lib-5.1.0.tar.gz
    1.6 Graphviz
    graphviz-2.4-1.rh73.i386.rpm
    graphviz-devel-2.4-1.rh73.i386.rpm
    graphviz-doc-2.4-1.rh73.i386.rpm
    graphviz-graphs-2.4-1.rh73.i386.rpm
    graphviz-tcl-2.4-1.rh73.i386.rpm
     
    1.7 瀏覽支持
    ZendOptimizer-linuxi386.tar.gz
     
    1.8 CVSWeb
    CVSWeb3.0.0.tar.gz
    2 安裝步驟
    2.1 安裝Mysql
    安裝mysql server
    # rpm -ivh MySQL-server-4.0.20-0.i386.rpm
     
    安裝mysql
    # rpm -ivh MySQL-client-4.0.20-0.i386.rpm
     
    安裝mysql其餘包
    # rpm –ivh MySQL-devel-4.1.10-0.i386.rpm
    # rpm –ivh MySQL-shared-4.1.10-0.i386.rpm
    # rpm –ivh MySQL-shared-compat-4.1.10-0.i386.rpm
     
    運行mysql 客戶端,並開放root用戶的遠程訪問權限。以便調試
    # mysql
    > use mysql
    > update user set host = `%` where user = `root` and host <> `localhost`;
    > exit
     
    Mysql安裝完畢。
     
    2.2 安裝apache
    # tar -zxvf httpd-2.0.54.tar.gz
    # cd httpd-2.0.54
    # ./configure --prefix=/web/apache --enable-module=so
    # make
    # make install
    Apache安裝完畢。
     
    說明:apache在linux下的默認最大進程數爲256,不管如何修改httpd.conf都不能超過這個限制。若是想加大這個限制,在編譯apache前編輯/home/tmp/apache/src/include/httpd.h,將其中#define HARD_SERVER_LIMIT 256 一行改成#define HARD_SERVER_LIMIT 2048後再編譯apache。
    2.3 安裝GD庫
    2.3.1 jpeg-6b 的安裝
    # tar -xf jpegsrc.v6b.tar
    # cd jpeg-6b
    # ./configure
    # make
    # make install
     
    2.3.2 zlib 的安裝
    # tar –zxvf zlib-1.1.3.tar.gz 
    # cd zlib-1.1.3
    # ./configure
    # make
    # make install
     
    2.3.3 libpng 的安裝
    # tar –zxvf libpng-1.2.8.tar.gz
    # cd libpng-1.2.8
    # ./configure
    # make
    # make install
     
    2.3.4 freetype 的安裝
    # tar –zxvf freetype-2.1.10.tar.gz 
    # cd freetype-2.1.10
    # ./configure 
    # make 
    # make install 
     
    2.3.5 T1lib 的安裝
    # tar –zxvf t1lib-5.1.0.tar.gz
    # cd t1lib-5.1.0 
    # ./configure 
    # make 
    # make install 
     
    2.3.6 gd 的安裝
    # tar –zxvf gd-2.0.33.tar.gz 
    # cd gd-2.0.33 
    # ./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
     
    2.4 安裝php
    # tar zxvf php-5.0.4.tar.gz
    # cd php-5.0.4
    #./configure --prefix=/web/php \
     --with-apxs2=/web/apache/bin/apxs \
     --with-config-file-path=/usr/local/lib \
    --enable-track-vars \
    --with-xml \
    --with-mysql \
    --with-libxml-dir=/usr/local/lib \
    --with-gd=/usr/local \
    --with-t1lib=/usr/local \
    --with-tiff-dir=/usr/local \
    --with-jpeg-dir=/usr/include \
    --with-ttf=/usr/include/freetype \
    --with-zlib-dir=/usr/include \
    --with-png-dir=/usr/include \
    --with-mbstring --enable-mbstring=all
     
    # make
    # make install
    # cp php.ini-dist /usr/local/lib/php.ini
     
    修改php.ini中的下列行
    extension_dir = "./"

    extension_dir = "/web/php/include/php/ext"
     
    2.5 GD庫的安裝檢查
    安裝完畢後用<? phpinfo(); ?>查看結果以下: 
    gd 
    GD Support enabled 
    GD Version 1.6.2 or higher 
    FreeType Support enabled 
    FreeType Linkage with TTF library 
    T1Lib Support enabled 
    GIF Support enabled 
    JPG Support enabled 
    PNG Support enabled 
    WBMP Support enabled
    2.6 安裝Mantis
    # mv mantis-1.1.1 /var/www/mantis
    2.7 創建數據庫bugtracker及用戶mantis
    $mysqladmin -u root -p create bugtracker
    //輸入MySQL的root密碼便可完成建立數據庫bugtracker的操做
    $mysql -u root -p
    mysql>grant all privileges on bugtracker.* to 'mantis'@'localhost' identified by '你指定的mantis用戶密碼';
    mysql>FLUSH PRIVILEGES;
    mysql>\q
    2.8 安裝Zend Optimizer
    #tar -zxvf ZendOptimizer-linuxi386.tar.gz
    #cd ZendOptimizer-2.6.0-linux-glibc21-i386
    #./install.sh
    //重啓Apache
    #/web/apache/bin/apachectl –k restart
    2.9 配置mantis
    # cd /var/www/mantis
    # vi config_inc.php
     
    //修改如下幾行
    $g_db_username = "mantis";
    $g_db_password = "你在創建用戶時指定的密碼";
    $g_database_name = "bugtracker";
     
    //增長如下幾行
    $g_path = "http://www.yourdomain.com/mantis/";
    $g_icon_path = $g_path."images/"; 
    $g_absolute_path = "/var/www/mantis/"; 
    $g_use_iis = OFF; 
    $g_show_version = ON;
     
    //如下是配置郵件的,Mantis使用郵件來進行註冊和通知,因此必須配置好
    $g_enable_email_notification = ON; # 開通郵件通知 
    $g_smtp_host = 'mail.softbrain.com.cn';   # SMTP 服務器
    $g_smtp_username = 'esm@softbrain.com.cn'; # 郵箱登陸用戶名                       
    $g_smtp_password = '對應用戶郵箱的密碼'; # 郵箱登陸密碼                          
    $g_use_phpMailer = ON;   # 使用 PHPMailer 發送郵件                                
    $g_phpMailer_path = '/usr/local/php/includes/PHPMailer/'; # PHPMailer 的存放路徑      
    $g_phpMailer_method = 2;   # PHPMailer 以 SMTP
     
    $g_show_version = OFF;                  # 不在頁面下部顯示 Mantis的版本號
    $g_default_language = ’english’;              # 默認語言爲英語
    $g_default_new_account_access_level = DEVELOPER; # 默認用戶級別 
    $g_use_jpgraph= ON;                             # 使用圖形報表
    $g_jpgraph_path = ’/web/php/include/jpgraph/src/’;    # JPGraph路徑   
    $g_window_title = ’Software Quality Manager’;     # 瀏覽器標題
    $g_page_title   = ’ Software Quality Manager’;     # 頁面標題欄
     
    2.10 建立數據庫的表結構
    #cd /var/www/mantis
    #mysql -u mantis -p bugtracker<sql/db_generate.sql
    //輸入數據庫密碼便可建立
    2.11 配置httpd.conf
    編輯apache的httpd.conf 
    #vi /web/apache/conf/httpd.conf
    //增長如下幾行
    LoadModule php5_module        modules/libphp5.so
    AddType application/x-httpd-php .php .phtml .php3 .inc
     
    Alias /mantis/ "/var/www/mantis/"
    <Directory 「/var/www/mantis/」>
    Options Indexes MultiViews Includes FollowSymLinks +ExecCGI
    AllowOverride None
    Order allow, deny
    Allow from all
    </Directory>
     
    找到DirectoryIndex index.html index.html.var,將其改成
    DirectoryIndex index.html index.html.var index.php
     
    2.12 重啓apache服務
    # /web/apache/bin/apachectl –k restart
     
    2.13 訪問Mantis
    經過瀏覽器訪問:http://www.yourdomain.com/mantis/
    若是出現登陸頁面,則一切Ok!
    升級數據庫
    登陸http://www.yourdomain.com/mantis/admin
    點擊「Upgrade your installation」,升級其中的「Basic upgrade set (required)」和「String escaping fixes (recommended)」。
    而後,
    #mysql –u mantis –p bugtracker<sql/db_update.sql
    並初始化數據庫
    #mysql –u mantis –p bugtracker<sql/db_insert_data.sql
     
    2.14 Mantis的初步安全設置
    在Mantis目錄下有一個admin目錄,若是你在IE中打開這個目錄下的index.php查看,你就會知道這個目錄是進行Mantis Administration的,使用這個模塊能夠檢查你的Mantis是否安裝徹底,對舊版本的Mantis進行升級,對Mantis的頁面CSS文件進行修改;使用這個管理模塊是不須要用戶名和密碼的,所以任何人均可以經過這個管理模塊查看你的Mantis系統信息,並且因爲有升級模塊,在這裏還能夠直接對數據庫進行修改;所以,在配置完成後將這個admin目錄刪除。
    在添加一個管理員用戶後,刪除系統默認的administrator用戶。
    3 CVS集成配置
    若是須要創建Mantis 和 CVS集成,須要將Mantis與CVS服務安裝在同一臺服務器上。
    3.1 安裝CVSWeb
    CVSWEB就是CVS的WEB界面,能夠大大提升程序員定位修改的效率。
    解包
    tar -zxvf  CVSWeb3.0.0.tar.gz
     
    把配置文件cvsweb.conf複製到apache的配置目錄下
    cp cvsweb.conf /path/to/apache/conf
    轉到/path/to/apache/conf下並修改cvsweb.conf:
    修改CVSROOT路徑設置:
    %CVSROOT = (
    'Development' => '/path/to/cvsroot/dev', #<==修改指向本地的CVSROOT
    'test' => '/path/to/cvsroot/test', #<==修改指向本地的CVSROOT
    );
    若是有多個cvsroot,這定缺省的cvsroot
    $cvstreedefault = 'test';
     
    其它個性化設置
    cvsweb.conf還有許多其它個性化設置,常見的有這些變量:
    $logo 圖標設置
    $defaulttitle 標題設施
    $address 管理員email地址設置
    $long_intro 介紹文字
    $short_instruction 說明文字
     
    把文件cvsweb.cgi複製到apache的cgi目錄
    cp cvsweb.cgi /path/to/apache/cgi-bin
    轉到/path/to/apache/cgi-bin修改cvsweb.cgi
    修改cvsweb.cgi讓CGI找到配置文件:
    $config = $ENV{'CVSWEB_CONFIG'} || '/path/to/apache/conf/cvsweb.conf';
     
    中文支持
    讓cvsweb正確顯示中文,找到sub html_header($)函數,
    而後在<html>和<title>之間插入一行,修改以下
    <html>
    <meta. http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>$title</title>
    複製全部的gif,png文件到apache的icons目錄
     
    增長訪問控制
    CVSWEB可不能隨便開放給全部用戶,所以須要使用WEB用戶認證:
    先生成 passwd:
    /path/to/apache/bin/htpasswd -c cvsweb.passwd user
     
    修改httpd.conf,增長
    <Directory "/path/to/apache/cgi-bin/cvsweb/">
    AuthName "CVS Authorization"
    AuthType Basic
    AuthUserFile /path/to/cvsweb.passwd
    require valid-user
    </Directory>
    3.2 配置config_inc.php
    設置mantis配置文件config_inc.php
    //添加下面一行
    $g_cvs_web = 'http://192.168.100.17/cgi-bin/cvsweb.cgi/';     #CVSWeb連接地址
    $g_source_control_account=’cvsuser’; #必須是mantis的有效賬戶;
    3.3 配置CVS配置文件loginfo
    在cvs倉庫的配置文件loginfo中添加一行:
    DEFAULT /usr/local/bin/php /var/www/mantis/core/checkin.php %{,sVv} $USER
    這樣,在提交cvs文件時,在log message中輸入包含有「issue #nnnn」的內容,就會將提交的版本信息,添加在該issue的note中。
    4 Relationship Graph功能配置
    4.1 修改config_inc.php配置
    添加下面內容:
           # --- Relationship Graphs -----------
           # Show issue relationships using graphs.
           #
           # In order to use this feature, you must first install either GraphViz
           # (all OSs except Windows) or WinGraphviz (only Windows).
           #
           # Graphviz homepage:    http://www.research.att.com/sw/tools/graphviz/
           # WinGraphviz homepage: http://home.so-net.net.tw/oodtsen/wingraphviz/
           #
           # Refer to the notes near the top of core/graphviz_api.php and
           # core/relationship_graph_api.php for more information.
     
           # Enable relationship graphs support.
           $g_relationship_graph_enable              = ON;
     
           # Font name and size, as required by Graphviz. If Graphviz fails to run
           # for you, you are probably using a font name that gd can't find. On
           # Linux, try the name of the font file without the extension.
           $g_relationship_graph_fontname          = 'Arial';
           $g_relationship_graph_fontsize            = 10;
     
           # Local path where the above font is found on your system for Relationship Graphs
           # You shouldn't care about this on Windows since there is only one system
           # folder where fonts are installed and Graphviz already knows where it
           # is. On Linux and other unices, the default font search path is defined
           # during Graphviz compilation. If you are using a pre-compiled Graphviz
           # package provided by your distribution, probably the font search path was
           # already configured by the packager.
           #
           # If for any reason, the font file you want to use is not in any directory
           # listed on the default font search path list, you can either: (1) export
           # the DOTFONTPATH environment variable in your webserver startup script
           # or (2) use this config option conveniently available here. If you need
           # to list more than one directory, use colons to separate them.
     
           # Since 0.19.3 we use the $g_system_font_folder variable to define the font folder
     
           # Default dependency orientation. If you have issues with lots of childs
           # or parents, leave as 'horizontal', otherwise, if you have lots of
           # "chained" issue dependencies, change to 'vertical'.
           $g_relationship_graph_orientation = 'horizontal';
     
           # Max depth for relation graphs. This only affects relation graphs,
           # dependency graphs are drawn to the full depth. A value of 3 is already
           # enough to show issues really unrelated to the one you are currently
           # viewing.
           $g_relationship_graph_max_depth              = 10;
     
           # If set to ON, clicking on an issue on the relationship graph will open
           # the bug view page for that issue, otherwise, will navigate to the
           # relationship graph for that issue.
           $g_relationship_graph_view_on_click = OFF;
     
           # Complete path to dot and neato tools. Your webserver must have execute
           # permission to these programs in order to generate relationship graphs.
           # NOTE: These are meaningless under Windows! Just ignore them!
           $g_dot_tool                                              = '/usr/bin/dot';
           $g_neato_tool                                    = '/usr/bin/neato';
     
    4.2 安裝Graphviz
    # rpm –ivh graphviz-2.4-1.rh73.i386.rpm
    # rpm –ivh graphviz-devel-2.4-1.rh73.i386.rpm
    # rpm –ivh graphviz-doc-2.4-1.rh73.i386.rpm
    # rpm –ivh graphviz-graphs-2.4-1.rh73.i386.rpm
    # rpm –ivh graphviz-tcl-2.4-1.rh73.i386.rpm


    查看(1333) 評論(1) 收藏 分享 管理 html

  • 實現ClearQuest數據庫(SQL Server2000)遷移

    魔海 發佈於 2007-01-29 23:55:00 mysql

      近來公司的CQ服務器中了熊貓燒香病毒,幸虧用瑞星殺掉了,否則就要從新安裝操做系統和CQ及其Web服務了.雖然數據庫都有按期備份,可是一旦服務器出了情況就須要作遷移了,因此就用備份的數據庫測試了一下數據庫的遷移. linux

      1. 首先備份CQ數據庫:Schema Database/Product Database. 程序員


      2. 在要遷移的服務器的SQL Server2000中建立兩個新的數據庫:Schema和Product.並新建和以前數據庫Owner用戶名相同的CQ數據庫用戶:meet,並設置該用戶爲Schema和Product數據庫的db_owner. web


      3. 在ClearQuest Maintenance Tool使用新建的Schema數據庫及meet用戶新建Connection. sql


      4. 使用備份的數據庫對應還原Schema和Product兩個數據庫. 數據庫


      5. 修改SQL Server2000的服務器設置:打開企業管理器,右鍵點擊SQL Server組下的Local服務器節點,在出現的窗口中選擇進入到「服務器設置」標籤下,選中「服務器行爲」下的「容許對系統目錄直接進行修改」後,若是不做修改在更新Master數據庫表時會提示:「未啓用對系統目錄的特殊更新。系統管理員必須從新配置 SQL Server 以容許這種操做。」.點擊界面的確認按鈕(遷移完畢後請將該項設置還原). apache


    6. 打開SQL Server2000的查詢分析器.使用Schema數據庫(Use Schema;),執行SQL語句:
         SELECT sid FROM sysusers WHERE name = 'meet';
    記下顯示的sid值,如sid=0xB71AA049EBF7D149825D0232848B1B4B,使用Master數據庫(Use Master),執行SQL語句:
         UPDATE sysxlogins SET sid =0xB71AA049EBF7D149825D0232848B1B4B (上一個查詢語句的查詢結果) WHERE name = 'meet'. windows


    7. 經過企業管理器修改Schema數據庫表meet.master_dbs中「server」字段值爲遷移後數據庫服務器的機器名;database_name字段值爲Schema.


    8. 使用admin用戶登錄到ClearQuest Designer(密碼就是遷移前系統使用的密碼). 選擇Datebase下的Update User Database Properties.更改Product Database的數據庫鏈接爲Product數據庫.

    以上步驟完成後,就實現了數據庫的遷移.(CQ版本2003.06.12.280.000)

相關文章
相關標籤/搜索