2009-07-22

centos 5.3 上安装bugzilla/subversion/scmbug步骤

软件版本,Centos 5.3,bugzilla 3.0.5,subversion 1.6.3,scmbug0.26.15
安装步骤:
1,安装mysql server.修改mysql server默认编码为utf-8和默认数据文件目录./etc/my.cnf文件
datadir=/data/mysql,character-set-server=utf8.
2.安装subverion-client,server,extras三个包。
3.安装libxslt, docbook-utils,perl*,ImageMagick-perl,mod_perl,gd-devel,gdbm-devel等包
4.安装bugzilla及用cpan安装还缺少的perl modules,注意安装scmbug需要的Log::Log4perl和Mail::Sendmail两个modules
5.在mysql中建立bugs数据库,并建立bugs账号。create database bugs;grant all on bugs.* to bugs@localhost.我这里没有设置密码。
6.运行checksetup.pl检查配置,并建立初始管理员账号。
7.安装scmbug。修改/etc/scmbug/daemon.conf中bugzilla的安装目录,bug_url_prefix,和user mapping.我这里不用mapping.以后配置svn使用bugzilla中的账号。
8.运行Configure-CollabNet-Subversion初始化subversion配置。
9.在/etc/opt/CollabNet_Subversion/conf/http.conf中加入bugzilla配置。加入
Alias /bugzilla "/opt/bugzilla-3.0.5"

AddHandler cgi-script .cgi
Options +Indexes +ExecCGI
DirectoryIndex index.cgi
AllowOverride Limit
Order allow,deny
Allow from all

对这些配置也不清楚,反正是抄的。
10.安装mod_auth_mysql包,在httpd.conf中加入LoadModule mysql_auth_module /usr/lib64/httpd/modules/mod_auth_mysql.so.使subversion能使用bugzilla中的用户数据。
并修改collabnet_subversion_httpd.conf配置。
注释掉AuthUserFile的配置
加入
AuthBasicAuthoritative off
AuthMySQLAuthoritative on
AuthMySQLEnable on
AuthMySQLHost localhost
AuthMySQLUser bugs
#AuthMySQLPassword passwd
AuthMySQLDB bugs
AuthMySQLUserTable profiles
AuthMySQLNameField login_name
AuthMySQLPasswordField cryptpassword
AuthMySQLUserCondition "disabledtext = ''"
AuthMySQLPwEncryption crypt
#AuthMySQLGroupTable "profiles, user_group_map, groups"
#AuthMySQLGroupCondition "profiles.userid = user_group_map.user_id and user_group_map.group_id = groups.id and user_group_map.isbless = 0 and groups.isactive = 1 and disabletext = ''"
#AuthMySQLGroupField name
#AuthGroupFile //dev/null

AuthUserFile //dev/null
用户信息可以使用mysql中的数据了,现在组信息和权限信息还不能通用,所以组及权限信息还是在svn_access_file维护。
如果对viewvc也限制,也可以在viewvc_httpd.conf中一样设置,不这viewvc权限设置太麻烦了一些,暂没有找到什么好办法。

11.将mysql,collabnet_subversion_httpd和scmbug-server启动就行了。乱码问题见另一篇文章。
现在就大功告成了。就可以用scmbug_install_gule来关联svn和bugzilla了。

2009-06-04

ORA-01461: can bind a LONG value only for insert into a LONG column

在使用ojdbc5 10.2版连oracle 9.2时,出现1461错误,在网上找到一个解决方案。
设置oracle.jdbc.RetainV9LongBindBehavior=true

More discussion about this problem can be found in the following articles:

- http://vsadilovskiy.wordpress.com/2007/10/19/ora-01461-can-bind-a-long-value-only-for-insert-into-a-long-column

- Metalink Note: 3756847.8