系统之家 - Windows操作系统&装机软件下载网站!

当前位置: 首页  >  教程资讯  >  电脑教程 centos下 nginx+mysql+bugfree+php安装

centos下 nginx+mysql+bugfree+php安装

时间:2023-06-02 16:16:41 来源: 人气:

   bugfree是一个bug管理工具。由淘宝开发的并且是开源的工具。淘宝官方有提供安装方法:http://testing.etao.com/node/120。通过XAMPP来安装非常方便。但是XMAPP会一次性把mysql/php/apache/bugfree全部安装。但是我当前的机子上已经安装了nginx/mysql/所以思考之后还是决定自己手动安装。于是噩梦来了。我整整花了两天半的时间搞这个。,  软件:,  mysql5.5.28,  php-5.2.13.tar.gz,  php-5.2.13-fpm-0.5.13.diff.gz,  nginx1.2.3,  bugfree3.0.3,  mysql和nginx之前都是通过源码编译安装好了。,  这里有个注意的地方。因为bugfree要连接数据库,所以要求php必须要 有pdo_mysql的支持。所以在上一步的./configure,  时需要再跟上两个选项:,  --with-mysql=/usr/local/mysql(这里指mysql的安装目录),  --with-pdo-mysql 。,  但是即使是这样,还是有悲剧。在编译的时候出错了。出错信息"为找不到mysql的header文件"。,  通过百度后找到了一位仁兄的帮助,以下为引用,CentOS5下用yum安装了 mysql 及 mysql-server , 在编译安装php-5.2.9时用 --with-mysql 选项出现   configure: error: Cannot find MySQL header files under yes. Note that the MySQL client library is not bundled anymore.,这个是缺少了 mysql-devel 安装包,用   #yum install -y mysql-devel,  通过yum,  install -y mysql-devel之后再重新编译php。如果编译成功,界面就会出现"welocme to use php"这类的字眼。,  然后再make,  和 make install。,  经过上面的步骤,总算是把PHP给安装完了。,  PHP安装完了,接下来要进行PHP和nginx的关联。打开nginx.conf(一般在nginx安装目录下的conf文件夹下面),  加入如下配置:,  server{,  listen 80;,  server_name 192.168.1.101;(根据你自己nginx所在机器的IP填写),  #charset koi8-r;,  #access_log logs/host.access.log main;,  location / {,  if (!-e $request_filename) {,  rewrite ^([_0-9a-zA-Z-]+)?(/wp-.*) $2 last;,  rewrite ^([_0-9a-zA-Z-]+)?(/.*.php)$ $2 last;,  rewrite ^ /bugfree/index.php last;,  },  index index.html index.htm index.php;,  },  location ~ .php$ {,  root html;,  fastcgi_pass 127.0.0.1:9000;,  fastcgi_index index.php;,  fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params;,  },  关联之后重启nignx.并且启动php。(我这里是/usr/local/sbin/php-fpm),  根据第一个连接的第六点所提供方法测试nginx是否PHP配置成功。,  通过访问index.php,查找页面上是否有mysql的信息。如果没有。说明pdo_mysql没有加载成功。这时候可以考虑重新编译PHP。(最好别碰到这种事情),  如果一切OK,接下来就可以下载bugfree。解压后将文件夹上传到nginx目录底下的html目录下面。,

作者

教程资讯

电脑教程排行

系统教程

系统主题