我把我的word文档导入进来的,可能图片导入不成功,我还会再整合一下viewvc
如有问题可以邮件联系我xiaotian.ren@emacle.com我目前也是能搭建,至于使用scmbug还不太熟悉。
1、
Camek安装(编译安装mysql需要用到)
【文档可参考http://www.linuxidc.com/Linux/2012-03/56685p2.htm】
#tar zxf cmake-2.8.5.tar.gz
#cd cmake-2.8.5
#./bootstrap
#gmake
#gmake install (默认安装在/usr/local/bin/cmake)
2、
mysql的安装mysql-5.5.19.tar.gz
#
groupadd mysql
#
useradd -g mysql mysql
#tar zxf
mysql-5.5.19.tar.gz
#cd mysql-5.5.19
#
cmake
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_EXTRA_CHARSETS:STRING=utf8,gbk -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_READLINE=1 -DENABLED_LOCAL_INFILE=1 -DMYSQL_DATADIR=/var/mysql/data -DMYSQL_USER=mysql
#make
#make install
#chmod +w /usr/local/mysql
#chown -R mysql:mysql /usr/local/mysql
#mkdir -pv /var/mysql/{data,log}
#chown -R mysql:mysql /var/mysql
#cp support-files/my-large.cnf /etc/my.cnf
(注:Q:Starting MySQL..The server quit without updating PID file
(/var/lib/mysql/localhost.localdomain.pid)
A 解决办法:
确实一般都是my.cnf配置文件的问题
/etc/my.cnf来自以下文件:
如果你的内存≤64M,则复制/usr/local/share/mysql/my-small.cnf为/etc/my.cnf
# This is for a system with little memory (<= 64M) where MySQL is only used
# from time to time and it's important that the mysqld daemon
# doesn't use much resources.
如果内存是128M,则复制/usr/local/share/mysql/my-medium.cnf为/etc/my.cnf
# This is for a system with little memory (32M - 64M) where MySQL plays
# an important part, or systems up to 128M where MySQL is used together with
# other programs (such as a web server)
如果内存是512M,则复制/usr/local/share/mysql/my-large.cnf为/etc/my.cnf
# This is for a large system with memory = 512M where the system runs mainly
# MySQL.
如果内存是1-2G,则复制/usr/local/share/mysql/my-huge.cnf为/etc/my.cnf
# This is for a large system with memory of 1G-2G where the system runs mainly
# MySQL. )
#cp support-files/mysql.server /etc/init.d/mysql
数据库初始化
#/usr/local/mysql/scripts/mysql_install_db --basedir=/usr/local/mysql --datadir=/var/mysql/data --user=mysql
service mysql start
再修改root密码:
/usr/local/mysql/bin/mysqladmin -u root password 'abc123.'
测试是否能进入:
/usr/local/mysql/bin/mysql -u root -p
启动mysql
/etc/init.d/mysqld start
修改
PATH
#vi ~/.bash_profile
#vi /etc/my.cnf
在
[mysqld]
区域中,添加如下行:
default-character-set=utf8
# mysqladmin -u root password '000000'
# mysql -u root –p
Enter password:
mysql> create database bugs;
mysql> use bugs;
mysql>GRANT SELECT,INSERT,UPDATE,DELETE,INDEX,ALTER,CREATE, LOCK
TABLES,DROP,REFERENCES ON bugs.* TO bugs@localhost IDENTIFIED BY '000000';
mysql> FLUSH PRIVILEGES;
mysql> quit
;
3、
Apache的安装(要安装apr与apr-util)
Apr安装:
# tar zxf apr-1.3.8.tar.gz
#./configure
#make&&makeinstall
Apr-util安装:
# tar zxf apr-util-1.3.8.tar.gz
#cd apr-util-1.3.8
#./configure --with-apr=/usr/local/apr --prefix=/usr/local/apr-util
#make&&make install
Apache的安装:
Tar jxf httpd-2.2.17.tar.bz2
cd httpd-2.2.17
./configure --prefix=/usr/local/apache --enable-so --enable-rewrite=share --enable-proxy=share --enable-dav=share --enable-dav-fs
--with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util
Make
Make install
4、
Bugzilla的安装(在最后整合bugzilla与svn时报错说版本不支持,后来用3.0.4的bugzilla可以整合,3.0.4与4.0.2高版本就是perl安装模块有一点点差别,3.0.4的模块必须要一个一个装,没有那个命令一次全部安装,只要模块装上就行了)
如果在模块安装过程中有模块死活装不上参考如下文档:http://linux.chinaunix.net/techdoc/net/2008/12/17/1053667.shtml
cp bugzilla-4.0.2.tar.gz /usr/local/apache/htdosc
Tar zxf bugzilla-4.0.2.tar.gz
Mv bugzilla-4.0.2.tar.gz bugzilla
Cd bugzilla
./checksetup.pl 检查需要安装的perl模块
/usr/bin/perl install-module.pl --all (bugzilla缺少的模块全部安装,也可根据需要单独安装各个模块,)
如果mysql是源码编译安装应该不会有问题,如果是二进制包安装会出问题DBD-mysql安装不成功。解决这个问题,可以单独安装perl的模块,当然mysql必须编译安装,或者保证rpm安装的包很齐全。
**UNRECOVERABLE ERROR**
Could not find gdlib-config in the search path. Please install libgd 2.0.28 or higher.
If you want to try to compile anyway, please rerun this script with the option --ignore_missing_gd.
安装gd-devel的rpm包即可解决:
#
yum install gd-devel
必须要安装的模块安装完后修改下面的文件
vi ../bugzilla/localconfig
$db_host = "localhost";
$db_name = "bugs";
$db_user = "bugs";
$db_pass = "
000000
";
./checksetup.pl (密码123456)
修改apache配置:
<Directory "/usr/local/apache/htdocs">
AddHandler cgi-script .cgi
Options Indexs ExecCGI FollowSymLinks
DirectoryIndex index.cgi
AllowOverride
All
Order allow,deny
Allow from all
</Directory>
<IfModule dir_module>
DirectoryIndex index.html index.cgi
</IfModule>
访问192.168.64.140:/bugzilla
5、
svn的安装(需要安装zlib,sqlite)
Zlib安装:
#./configure --prefix=/usr/local/zlib --shared
#make && make install
Sqlite安装:
# tar zxf sqlite-3.6.23.tar.gz
#cd sqlite-3.6.23
#./configure --prefix=/usr/local/sqlite
#make&&make install
Svn安装:
#tar jxf subversion-1.6.15.tar.bz2
# cd subversion-1.6.15
#./configure --with-apxs=/usr/local/apache/bin/apxs --prefix=/usr/local/subversion --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-ssl --with-zlib=/usr/local/zlib --enable-maintainer-mode --with-sqlite=/usr/local/sqlite
Make
Make install
配置PATH路径
6、
svn的配置:
//
创建库文件所在的目录
(svnroot
用户进行下面的操作
)
# mkdir /home/svnroot/repository
//
进入
subversion
的
bin
目录
# cd /usr/local/subversion/bin
//
创建仓库
"
test
"
# ./svnadmin create /home/svnroot/repository/
repos
# cd /home/svnroot/repository/
repos
# ll
//
看
test
里多了许多文件,说明
Subversion
安装成功了
//
不让
其他
人有该目录的权限
# chmod 700 /home/svnroot/repository
修改
Apache
配置文件
# cd /usr/local/apadche/bin
# vi /usr/local/apache/conf/httpd.conf
//
(下面两行存在证明模块安装成功)
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
//下面需要添加
<Location /repository>
DAV svn
#SVNListParentPath on
SVNParentPath /home/svnroot/repository
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /home/svnroot/repository/svn-auth-file
AuthzSVNAccessFile /home/svnroot/repository/auth.file
Require valid-user
</Location>
//
其中
svn-auth-file
是通过
"htpasswd [
–
c] /home/svnroot/repository/
svn-
auth
-file
username password"
来创建的
//"Require valid-user"
告诉
apache
在
authfile
中所有的用户都可以访问。如果没有它,
//
则只能第一个用户可以访问新建库
Vi
/home/svnroot/repository/auth.file
chown svnroot /home/svnroot/repository/auth.file
chown svnroot /home/svnroot/repository/svn-auth-file
如下访问,并显示证明成功:
7、
mod_auth_mysql-3.0.0.tar.gz的安装,目的让apache通过mysql来认证用户,apache需要第三方模块mod_auth_mysql-3.0.0.tar.gz
mod_auth_mysql,下载地址:http://sourceforge.net/projects/modauthmysql
Tar zxf mod_auth_mysql-3.0.0.tar.gz
Cd mod_auth_mysql-3.0.0
下载apache22.diff补丁文件打补丁
#Pacth -p0< apache22.diff
#
apxs
-c -L/usr/local/mysql/lib/mysql -I/usr/local/mysql/include/ -lmsqlclient -lm lz mod_auth_mysql.c
如果报错
/usr/bin/ld: cannot find -lmysqlclient
# ln -s /usr/local/mysql/lib/libmysqlclient.so.18.0.0 /usr/lib/
libmsqlclient.so
apxs -i mod_auth_mysql.
la
Apache安装mysql认证模块,完成后的提示如下:
8、
再次配置apache
Ls /usr/local/apache/modules/
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
LoadModule mysql_auth_module modules/mod_auth_mysql.so
AuthMySQLEnable on
AuthMySQLAuthoritative On
AuthMySQLDB bugs
AuthMySQLHost localhost
AuthMySQLUser bugs
AuthMySQLPassword 000000
AuthMySQLUserTable profiles
AuthMySQLNameField login_name
AuthMySQLPasswordField cryptpassword
AuthMySQLPwEncryption crypt
require valid-user
9、
scmbug
的安装
下载地址,http://www.mkgnu.net/scmbug_download
我选的rpm安装
#rpm -ivh *.rpm
#配置scmbug
#vi /etc/scmbug/daemon.conf
启动后查看进程
故障排除:
查看日志
#vi /var/log/scmbug/activity.log
这个最好别用高版本,
4.0.2不支持可能需要打补丁,但是没找到相关资料,3.5.2版本的bugzilla也不支持,最后用的老版本的3.0.4的,scmbug才启动起来。
** Scmbug error 77: The userlist mappings are enabled, but no mappings are configured.
这个错误需要把
,enable=>1该成下图,配置文件默认的是enable=>1
开始整合:
perl /usr/bin/scmbug_install_glue.pl --scm=Subversion /
--repository=file:///home/svn/myproject /
--product=TestProduct --bug=770 --bin=/bin,/usr/bin,/usr/sbin --daemon=127.0.0.1
##################选项的意思###################################
其中的--scm选项意思为使用什么软件做为版本配置,我这里是Subversion。
--product选项的意思为bugzilla中bugs所属的产品名称,我这里是TestProduct。
--repository选项的意思为subversion创建的版本仓库路径,我这里是/home/svn/myproject,前面的file://一定别忘了。
--bug选项的意思为glue运行时对bug的读写权限,mod值为770。
--binary-paths选项的意思为subversion的相关tools的目录,把可能的路径加进来,用,分隔两个目录。
--daemon选项的意思为glue运行的服务器地址,这里一般写127.0.0.1,一般都是本地使用。
如果没有提示错误基本成功了
这样subversion和bugzilla就通过scmbug的glue daemon连起来了,其对应的配置文件为/home/svn/myproject/hooks/etc/scmbug/glue.conf