浏览 5976 次
锁定老帖子 主题:svn 代码库创建 简单手册
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2008-12-10
=================================================== Linuxe版本:SUSE Linux Enterise Server tar xfj httpd-2.2.4.tar.bz2 cd httpd-2.2.4 ./buildconf ./configure --enable-dav --enable-so --enable-maintainer-mode //编译时加载*.so文件 make make install ===================== tar xfj subversion-1.4.3.tar.bz2 tar xfj subversion-deps-1.4.3.tar.bz2 //subversion-deps的文件也会解压到subversion-1.4.3目录中 cd subversion-1.4.3 rm -rf apr rm -rf apr-util ln -s /home/tmp/httpd-2.2.4/srclib/apr apr ln -s /home/tmp/httpd-2.2.4/srclib/apr-util apr-util ./configure --with-apxs=/usr/local/apache2/bin/apxs rm /usr/local/lib/libsvn* //如果之前有安装过svn版本,才执行该句 make clean && make && make install ===================== 创建SVN库: cd /home/svn chmod 777 /home/svn -R //设置版本库的权限 svnadmin create repo1 在Apache 的配置文件httpd.conf中加入以下代码,Apache中就可以配置好一个虚拟主机svn.mydomain.net,并把该域名下的根路径配置给 Subversion。通过AuthzSVNAccessFile和AuthUserFile指令分别配置SVN用户的用户名和密码文件。 <virtualhost *:80> DocumentRoot /home/svn/htdocs //根据配置 "/home/svn/htdocs" 不同配置不同,找到httpd.conf中 DocumentRoot,用DocumentRoot所指路径替换该处路径 <directory /> Options Includes AllowOverride All Order allow,deny Allow from all </directory> <location /> DAV svn SVNParentPath /home/svn //库的根路径 AuthzSVNAccessFile /home/svn/svnroot/conf/accessfile Require valid-user AuthType Basic AuthName "Subversion System" AuthUserFile /home/svn/svnroot/conf/passwdfile </location> ServerName svn.mydomain.net DirectoryIndex index.html </virtualhost> ========================== 创建文件accessfile 路径就是httpd.conf中AuthzSVNAccessFile所指的/home/svn/svnroot/conf/accessfile [groups] user = jarod anonymous = guest [/] * = r @user = rw @anonymous = r 再用htpasswd命令创建/home/svn/svnroot/conf/passwdfile文件: htpasswd -c /home/svn/svnroot/conf/passwdfile 用户名 // 创建第一个用户时加 -c,以后不用加,因为要生成passwdfile文件 # 这时会提示输入密码 ******************************* 因为在客户端登录时 保存了密码,所以, 如果要切换客户端用户,可删除改目录下的文件 C:\Documents and Settings\yankun\Application Data\Subversion\auth\svn.simple ==================================================================================== 启动SVN: server01:// # ls .rnd bin boot dev etc home lib lost+found media mnt opt proc root sbin server srv subdomain sys tftpboot tmp usr var server01:// # cd usr/loacl/apache2 -bash: cd: usr/loacl/apache2: No such file or directory server01:// # clear server01:// # ls .rnd bin boot dev etc home lib lost+found media mnt opt proc root sbin server srv subdomain sys tftpboot tmp usr var server01:// # cd usr server01://usr # ls X11 X11R6 bin games i586-suse-linux include lib local sbin share src tmp server01://usr # cd local/apache2 server01://usr/local/apache2 # cd bin server01://usr/local/apache2/bin # ls ab apr-1-config apxs dbmmanage envvars-std htdbm htpasswd httxt2dbm rotatelogs apachectl apu-1-config checkgid envvars htcacheclean htdigest httpd logresolve server01://usr/local/apache2/bin # ./apachectl start 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |