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>’,
),
),
再次访问就可以正常登陆啦