centos下安裝部署bugfree記錄
首先下載bugfree
http://testing.etao.com/node/120
下載後傳到ngix伺服器下面。之後輸入
http:///bugfree/install
在安裝過程中會進行檢查,如果提示沒有讀寫許可權的話,需要使用
chmod -R 777 bugfree
新建目錄 mkdir BugFile
chmod -R 777 BugFile
最麻煩的其實就是安裝檢查,會提示你環境有問題。比如:
如果報沒有pdo-mysql的話,需要進行以下步驟:
下載
http://pecl.php.net/get/PDO_MYSQL-1.0.2.tgz
安裝
tar zxvf PDO_MYSQL-1.0.2.tgz
cd PDO_MYSQL-1.0.2
cp /usr/local/mysql/bin/mysql_config /usr/bin #防止編譯的時候找不到mysql_config
/usr/local/php/bin/phpize
./configure –with-php-config=/usr/local/php/bin #指定php-config目錄
yum install mysql-devel #包含mysql對應的標頭檔案,防止編譯出錯
make
make install
配置php.ini
extension_dir = “/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/”
extension = “pdo_mysql.so”
可能會出現的問題:
/usr/local/php/bin/phpize
這時出現錯誤:
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.
解決方法:
yum install m4
yum install autoconf
在編譯(make)的時候有可能會出現下面的錯誤:
In file included from /data1/lnmp/PDO_MYSQL-1.0.2/pdo_mysql.c:31:
/data1/lnmp/PDO_MYSQL-1.0.2/php_pdo_mysql_int.h:25:19: error: mysql.h: No such file or directory
In file included from /data1/lnmp/PDO_MYSQL-1.0.2/pdo_mysql.c:31:
/data1/lnmp/PDO_MYSQL-1.0.2/php_pdo_mysql_int.h:36: error: expected specifier-qualifier-list before ‘MYSQL’
/data1/lnmp/PDO_MYSQL-1.0.2/php_pdo_mysql_int.h:48: error: expected specifier-qualifier-list before ‘MYSQL_FIELD’
/data1/lnmp/PDO_MYSQL-1.0.2/php_pdo_mysql_int.h:53: error: expected specifier-qualifier-list before ‘MYSQL_RES’
make: *** [pdo_mysql.lo] Error 1
問題原因:
這是因為在編譯時需要 MySQL 的頭的檔案。而它按預設搜尋找不到標頭檔案的位置,所以才出現這個問題。
解決方法:
將 /usr/local/mysql/include/ 目錄下的 MySQL 標頭檔案連結到 /usr/local/include/ 的目錄下。
# ln -s /usr/local/mysql/include/* /usr/local/include/
檢查完畢後,就可以繼續安裝了。安裝中要輸入資料庫使用者名稱與密碼,之後稍等片刻。。。。。。跳轉,然後404了。。
解決方法
(1)進入安裝目錄裡面的/protected/config/,找到檔案main.php
(2)在main.php中將下面的部分遮蔽掉,或者刪除
‘urlManager’ =>
array (
‘urlFormat’ => ‘path’,
‘showScriptName’ => false,
‘rules’ =>
array (
‘<type:\\w+>/<id:\\d+>/<action:\\w+>’ => ‘info/edit’,
‘<type:\\w+>/list/<product_id:\\d+>’ => ‘info/index’,
‘<type:\\w+>/<id:\\d+>’ => ‘info/edit’,
‘<controller:\\w+>/view/<id:\\d+>’ => ‘<controller>/view’,
‘<controller:\\w+>/<id:\\d+>’ => ‘<controller>/view’,
‘<controller:\\w+>/<action:\\w+>/<id:\\d+>’ => ‘<controller>/<action>’,
‘<controller:\\w+>/<action:\\w+>’ => ‘<controller>/<action>’,
),
),
再次訪問就可以正常登陸啦