Linux、mysql、php、testlink 安裝配置

1、apache
確保你的系統中已經安裝了APR和APR-Util。裝一下很簡單
無論你是要安裝APR、APR-Util、PCRE還是Apache Server或者是其他的一些軟件,總之,只要是源碼安裝,那麼就需要一個ANSI-C編譯器。如果你沒有,那就用yum裝一個吧,既然推薦使用GCC,那就裝個GCC吧。執行命令:yum  install  -y  gcc。很方便!!!
更多的內容大家可以自己去官網看,這裏我就不再多講了。進入正題,解包httpd,並查看/opt目錄下的文件,
下載 wget http://www.apache.org/
解壓 tar -zxvf  httpd-2.4.25.tar.gz  解壓後 可以  ls -l 可以看到/opt下面多了httpd-2.4.25目錄
進入httpd-2.4.25目錄:cd  ./httpd-2.4.25/。然後,進行Apache源碼安裝,依次執行命令:
./configure  --enable-mods-shared=all
make
make  install
Apache默認安裝在/usr/local/apache2目錄下。同樣,這裏你也可以使用
--prefix=目錄名
來指定一個安裝目錄,例如:
./configure  --prefix=/usr/mydir  --enable-mods-shared=all
Apache已經安裝成功 然後修改配置文件 
配置文件httpd.conf中的ServerName沒有修改。
我們用Vim打開httpd.conf配置文件,執行命令:
vi  /usr/local/apache2/conf/httpd.conf
將ServerName前的#號去掉,將ServerName後面的字符串改爲:localhost:80,最好用本機的ip加端口號(192.168.1.22:80)
修改完成後,按Esc鍵由編輯模式切換到命令模式,然後執行保存退出命令:wq
打開瀏覽器,在地址欄中輸入:192.168.1.22,回車。可以看到It  works! 恭喜你成功了!!!
2、mysql 之前安裝過 沒有裝的在網上找找;;;;
3、
PHP 安裝
官網下載  wget http://php.net/get/php-5.5.38.tar.gz
看到opt下的php-5.5.38.tar.gz,解壓 tar -zxvf php-5.5.38.tar.gz ,解壓後看到opt下多一個php-5.5.38 目錄 cd php-5.5.38 進入到php-5.5.38 裏 
配置
  回到原來解壓後的文件夾
./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/lib --with-gd --with-ldap --with-curl --with-mysql --with-mysqli
編譯 make   測試編譯   make test   安裝 make install  
cp /usr/local/src/php-5.3.16/php.ini-production /usr/local/php/lib/php.ini
把原來位於源代碼裏面的php.ini-production拷貝到/usr/local/php/lib/php.ini下,並且重命名爲php.ini
重啓apache
測試
    在apache的htdocs下建立一個php文件test.php,裏面的內容如下:
    <?php
    phpinfo();
    ?>
    然後在瀏覽器裏輸入http://127.0.0.1/test.php
    如果出現php的相關配置,成功,如果什麼都沒有輸入,說明失敗,重新以上步驟或者查找原因
如果決定在安裝後改變配置選項,只需重複最後的三步configure, make, 以及 make install,然後需要重新啓動 Apache 使新模塊生效。Apache不需要重新編譯。
成功頁面

4、testlink

1.   下載 testlink1.9.15

wget http://cdnetworks-kr-2.dl.sourceforge.NET/project/testlink/TestLink%201.8/TestLink%20 1.8.5/testlink_1.8.5.tgz

2.   解壓:tar –zxvf testlink1.9.15.tgz

3.   檢查下解壓的文件是不是隻有 testlink 一個文件夾保證其不嵌套其他文件,

4.   mv testlink  /usr/local/apache2/htdocs/ 移動 testlink 到 htdocs下,然後到 testlink 下設置訪問權限:

cd /usr/local/apache2/htdocs/ /testlink

依次執行:

# chmod 777 gui/templates_c

# chmod 777 logs

# chmod 777 upload_area

   自動安裝 testlink

1.   在瀏覽器中輸入 http://<IP>/testlink/install/index.php

2.   點擊 New installation

Checking PHP version: OK! (4.3.9 >= 4.1.0)

Checking if Register Globals = OFF: OK!

Checking if sessions are properly configured: OK!

Checking if ../gui/templates_c directory exists: OK!

Checking if ../gui/templates_c directory is writable: OK! 

請注意這句話 “After installation You will have the following login for TestLink Administrator. 告訴我們默認登錄名和密碼都是 admin login name: admin password : admin”

 

最後點擊 Setup TestLink! 按鈕完成部署

通過 http://IP/testlink 進行訪問 用戶名密碼均爲 admin

出現的問題

登錄Testlink後,新建一個項目後,會出現如下提示:

There are security warnings for your consideration. See details on file: C:\xampp\htdocs\testlink\logs\config_check.txt. To disable any reference to these checkings, set $tlCfg->config_check_warning_mode = 'SILENT';

 

打開Testlink安裝文件夾下的config.inc.php文件,將$tlCfg->config_check_warning_mode = 'FILE';中的FILE改爲SILENT

保存!再刷新頁面,已無提示!

如果出現 gd 和 ldap  curl  這幾個錯誤  

./configure 添加這個配置 --with-gd --with-ldap --with-curl --with-mysql --with-mysqli

1. 時區顯示不正確配置

解決方法是在htdocs\testlink目錄下的config.inc.php文件的/** [GLOBAL] */下加入一下代碼
putenv("TZ=Asia/Shanghai");

date_default_timezone_set("PRC");

2. 漢化配置
TestLink 的漢化非常簡單,首先要準備好一個漢化好的String.txt 文件,將該文件拷貝
到…\testlink\local\zh_CN 目錄下替換掉原來的文件。然後,打開config.inc.php 文件,找到
default_language 選項,將參數修改爲”zh_CN”,如圖8 所示。這時,再刷新一下你的登錄頁
面就變成了中文的了












發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章