Chinaunix首页 | 论坛 | 博客
  • 博客访问: 485232
  • 博文数量: 279
  • 博客积分: 4467
  • 博客等级: 上校
  • 技术积分: 2830
  • 用 户 组: 普通用户
  • 注册时间: 2007-04-03 14:43
文章分类

全部博文(279)

文章存档

2013年(1)

2012年(39)

2011年(35)

2009年(29)

2008年(131)

2007年(44)

分类:

2007-11-14 14:30:35

DotProject是一款基于LAMP的开源的项目管理系统, 。官方提供了在线演示的DEMO: 。晚上在公司的测试机上安装测试了一下,具体安装过程如下:

   I. Install zlib
[root@vufuture home]# tar zxvf zlib-1.1.4.tar.gz
[root@vufuture home]# cd zlib-1.1.4
[root@vufuture zlib-1.1.4]# ./configure
[root@vufuture zlib-1.1.4]# make test
[root@vufuture zlib-1.1.4]# make install
II. Install LibPcap
[root@vufuture zlib-1.1.4]# cd /home
[root@vufuture home]# tar zxvf libpcap-0.7.2.tar.gz
[root@vufuture home]# cd libpcap-0.7.2
[root@vufuture libpcap-0.7.2]# ./configure
[root@vufuture libpcap-0.7.2]# make
[root@vufuture libpcap-0.7.2]# make install
[root@vufuture libpcap-0.7.2]# cd /home
[root@vufuture home]# tar zxvf httpd-2.0.46.tar.gz
[root@vufuture home]# cd httpd-2.0.46
[root@vufuture httpd-2.0.46]# mkdir /home/www
[root@vufuture httpd-2.0.46]./configure --prefix=/home/www \
                                        --enable-shared=max \
                                        --enable-module=most
[root@vufuture httpd-2.0.46]# make
[root@vufuture httpd-2.0.46]# make install

III. Install MySQL
[root@vufuture root]# rpm -e mysql-3.23.58-2.3 --nodeps
[root@vufuture root]# cd /home
[root@vufuture home]# rpm -ivh MySQL-server-standard-5.0.27-0.rhel3.i386.rpm
[root@vufuture home]# rpm -ivh MySQL-client-standard-5.0.27-0.rhel3.i386.rpm
[root@vufuture home]# rpm -ivh MySQL-devel-standard-5.0.27-0.rhel3.i386.rpm
[root@vufuture home]# tar zxvf php-4.4.4.tar.gz
[root@vufuture home]# mkdir /home/php
[root@vufuture home]# cd php-4.4.4
[root@vufuture php-4.4.4]# ./configure --prefix=/home/php \
 --with-apxs2=/home/www/bin/apxs \
 --with-mysql \
 --with-gd \
 --with-zlib-dir=/usr/local
提示如下错误:configure: error: libpng.(a|so) not found.
安装libpng-devel:
[root@vufuture home]# rpm -ivh libpng-devel-1.2.2-25.i386.rpm
重新编译php:
[root@vufuture php-4.4.4]# ./configure --prefix=/home/php  --with-apxs2=/home/www/bin/apxs  --with-mysql  --with-gd  --with-zlib-dir=/usr/local --with-jpeg-dir=/usr/local
这样就OK!
[root@vufuture php-4.4.4]# make
[root@vufuture php-4.4.4]# make install
You may want to add: /home/php/lib/php to your php.ini include_path
Installing build environment:     /home/php/lib/php/build/
Installing header files:          /home/php/include/php/
Installing helper programs:       /home/php/bin/
  program: phpize
  program: php-config
Installing man pages:             /home/php/man/man1/
  page: phpize.1
  page: php-config.1
[root@vufuture php-4.4.4]# cp php.ini-dist /usr/local/lib/php.ini
在/home/www/htdocs/下添加index.php内容如下:
进行测试

安装dotproject:  将dotproject包解压到/var/www/html/htdocs/dotproject下

[root@vufuture dotproject]# chmod -R a+w files/
[root@vufuture dotproject]# chmod -R a+w includes/
[root@vufuture dotproject]# chmod -R a+w locales/
创建mysql中的数据库和用户:
mysql> create database dotproject;
Query OK, 1 row affected (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON dotproject.* to identified by "oracle" with grant option;
Query OK, 0 rows affected (0.00 sec)

在Browner中输入:
点击startinstall
在页面中填入上面建立的mysql database和user以及password:

user:dotproject  password: oracle
-->install

将下面框里的配置文件复制到/var/www/html/htdocs/dotproject/includes/config.php

给config.php加上相应的访问权限。chmod -R a+w config.php

Warning: mysql_connect() [function.mysql-connect]: Client does not support authentication protocol requested by server; consider upgrading MySQL client in /home/www/htdocs/dotproject/lib/adodb/drivers/adodb-mysql.inc.php on line 354
mysql> update mysql.user set password=old_password("oracle") where user='dotproject' and host='localhost';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

测试:

登录dotproject时提示:
ERROR: /home/www/htdocs/dotproject/classes/query.class.php(592): query failed(SELECT pref_name, pref_value FROM ( `user_preferences` ) WHERE pref_user = 0) - error was: Table 'dotproject.user_preferences' doesn't exist
Backtrace:
0 /home/www/htdocs/dotproject/classes/query.class.php:592 dprint('/home/www/htdocs/dotproject/classes/query.class.php',592,0,'query failed(SELECT pref_name, pref_value FROM ( `user_preferences` ) WHERE pref_user = 0) - error was: Table \'dotproject.user_preferences\' doesn\'t exist')
1 /home/www/htdocs/dotproject/classes/query.class.php:637 exec(2)
2 /home/www/htdocs/dotproject/classes/ui.class.php:771 loadhashlist()
3 /home/www/htdocs/dotproject/index.php:94 loadprefs(0)
Table 'dotproject.user_preferences' doesn't exist
参考这篇文章:
参照这篇文章重写解压一个dotproject.tar.gz并相应的赋权限就可以了。
后面还有dotmodule暂时不装了,看看需要再装。
中文化:到下载中文语言包
 unzip Chinese_Simplied_\(GBK\)_2.01_Compatible.zip
 mv cn/ /home/www/htdocs/dotproject/locales/

点击任务时出现如下错误:
ERROR: /home/www/htdocs/dotproject/includes/db_adodb.php(61): Error executing:

SELECT
distinct tasks.task_id, task_parent, task_name, task_start_date, task_end_date, task_dynamic, task_pinned, pin.user_id as pin_user,
task_priority, task_percent_complete, task_duration, task_duration_type, task_project,
task_description, task_owner, task_status, usernames.user_username, usernames.user_id, task_milestone,
assignees.user_username as assignee_username, count(distinct assignees.user_id) as assignee_count, co.contact_first_name, co.contact_last_name,
count(distinct files.file_task) as file_count, tlog.task_log_problem FROM tasks, user_tasks LEFT JOIN projects ON project_id = task_project LEFT JOIN users as usernames ON task_owner = usernames.user_id LEFT JOIN user_tasks as ut ON ut.task_id = tasks.task_id LEFT JOIN users as assignees ON assignees.user_id = ut.user_id LEFT JOIN contacts as co ON co.contact_id = usernames.user_contact LEFT JOIN task_log AS tlog ON tlog.task_log_task = tasks.task_id AND tlog.task_log_problem > '0' LEFT JOIN files on tasks.task_id = files.file_task LEFT JOIN user_task_pin as pin ON tasks.task_id = pin.task_id AND pin.user_id = 1 WHERE project_active <> 0
                                        AND task_project             = projects.project_id
                                        AND user_tasks.user_id       = 1
                                        AND user_tasks.task_id       = tasks.task_id
                                        AND (task_percent_complete    < '100' OR task_end_date = '')
                                        AND projects.project_active  = '1'
                                        AND projects.project_status <> '4'
                                        AND projects.project_status <> '5'
        AND task_status = '0'
GROUP BY task_id
ORDER BY project_id, task_start_date


Backtrace:
0 /home/www/htdocs/dotproject/includes/db_adodb.php:61 dprint('/home/www/htdocs/dotproject/includes/db_adodb.php',61,0,'Error executing:

SELECT
distinct tasks.task_id, task_parent, task_name, task_start_date, task_end_date, task_dynamic, task_pinned, pin.user_id as pin_user,
task_priority, task_percent_complete, task_duration, task_duration_type, task_project,
task_description, task_owner, task_status, usernames.user_username, usernames.user_id, task_milestone,
assignees.user_username as assignee_username, count(distinct assignees.user_id) as assignee_count, co.contact_first_name, co.contact_last_name,
count(distinct files.file_task) as file_count, tlog.task_log_problem FROM tasks, user_tasks LEFT JOIN projects ON project_id = task_project LEFT JOIN users as usernames ON task_owner = usernames.user_id LEFT JOIN user_tasks as ut ON ut.task_id = tasks.task_id LEFT JOIN users as assignees ON assignees.user_id = ut.user_id LEFT JOIN contacts as co ON co.contact_id = usernames.user_contact LEFT JOIN task_log AS tlog ON tlog.task_log_task = tasks.task_id AND tlog.task_log_problem > \'0\' LEFT JOIN files on tasks.task_id = files.file_task LEFT JOIN user_task_pin as pin ON tasks.task_id = pin.task_id AND pin.user_id = 1 WHERE project_active <> 0
                                        AND task_project             = projects.project_id
                                        AND user_tasks.user_id       = 1
                                        AND user_tasks.task_id       = tasks.task_id
                                        AND (task_percent_complete    < \'100\' OR task_end_date = \'\')
                                        AND projects.project_active  = \'1\'
                                        AND projects.project_status <> \'4\'
                                        AND projects.project_status <> \'5\'
        AND task_status = \'0\'
GROUP BY task_id
ORDER BY project_id, task_start_date

')
1 /home/www/htdocs/dotproject/modules/tasks/tasks.php:289 db_exec('SELECT
distinct tasks.task_id, task_parent, task_name, task_start_date, task_end_date, task_dynamic, task_pinned, pin.user_id as pin_user,
task_priority, task_percent_complete, task_duration, task_duration_type, task_project,
task_description, task_owner, task_status, usernames.user_username, usernames.user_id, task_milestone,
assignees.user_username as assignee_username, count(distinct assignees.user_id) as assignee_count, co.contact_first_name, co.contact_last_name,
count(distinct files.file_task) as file_count, tlog.task_log_problem FROM tasks, user_tasks LEFT JOIN projects ON project_id = task_project LEFT JOIN users as usernames ON task_owner = usernames.user_id LEFT JOIN user_tasks as ut ON ut.task_id = tasks.task_id LEFT JOIN users as assignees ON assignees.user_id = ut.user_id LEFT JOIN contacts as co ON co.contact_id = usernames.user_contact LEFT JOIN task_log AS tlog ON tlog.task_log_task = tasks.task_id AND tlog.task_log_problem > \'0\' LEFT JOIN files on tasks.task_id = files.file_task LEFT JOIN user_task_pin as pin ON tasks.task_id = pin.task_id AND pin.user_id = 1 WHERE project_active <> 0
                                        AND task_project             = projects.project_id
                                        AND user_tasks.user_id       = 1
                                        AND user_tasks.task_id       = tasks.task_id
                                        AND (task_percent_complete    < \'100\' OR task_end_date = \'\')
                                        AND projects.project_active  = \'1\'
                                        AND projects.project_status <> \'4\'
                                        AND projects.project_status <> \'5\'
        AND task_status = \'0\'
GROUP BY task_id
ORDER BY project_id, task_start_date')
2 /home/www/htdocs/dotproject/modules/tasks/index.php:115 include('/home/www/htdocs/dotproject/modules/tasks/tasks.php')
3 /home/www/htdocs/dotproject/index.php:311 require('/home/www/htdocs/dotproject/modules/tasks/index.php')
Unknown column 'task_project' in 'on clause'
该错误解决如下:
修改 modules/tasks/tasks.php 将171-236行中的
$from .= “, user_tasks”;
改为
$from = “user_tasks,tasks”; //$from .= “, user_tasks”;总共有三处!
参考dotproject官方论坛。

 还有几个小错误,如日历乱码问题,等看看明天再改吧!

阅读(2479) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~