`

linux架设subversion(svn)

阅读更多
一、安装要的软件

wget http://subversion.tigris.org/downloads/subversion-1.6.1.tar.gz
wget http://subversion.tigris.org/downloads/subversion-deps-1.6.1.tar.gz

二、新建一个用户:svnroot
三、编译安装httpd (root用户操作):
//解压apache2安装包
# tar xvzf httpd-2.2.2.tar.gz
//进入解压后的目录
# cd httpd-2.2.2
//配置apache安装,前两个参数是必须要加的,你还可以根据您的需要添加其他的参数。
//后面的参数制定你要把apache安装哪里
# ./configure --enable-dav --enable-so --prefix=/usr/local/apache2/
# make
//安装
# make install
# cd /usr/local/apache2/bin
//启动apache服务
# ./apachectl start
//打开浏览器http://localhost/如果有测试页"It works!"出现则证明已经安装成功。
四、安装svn

tar xvzf Subversion-1.6.17.tar.gz
cd Subversion-1.6.17
./configure --with-apxs=/usr/local/apache2/bin/apxs --prefix=/usr/local/subversion --with-apr=/usr/local/apache2 --with-apr-util=/usr/local/apache2 --with-ssl --enable-maintainer-mode --enable-dav --enable-so
make
make install

在make的时候,.configure之后,进行make,出现如下问题
/usr/bin/ld: cannot find -lexpat
collect2: ld returned 1 exit status
make: *** [subversion/svn/svn] Error 1

应该是缺少-lexpat库文件。
解决方法:
yum install expat expat-devel
安装了之后,svn的make就过了

#创建库文件所在的目录(svnroot用户进行下面的操作)
mkdir /home/svnroot/repository
#创建仓库"test"
/usr/local/subversion/bin/svnadmin create /home/svnroot/repository/test
#查看svn是否安装成功
/usr/local/subversion/bin/svnadmin --version
#不让其他人有该目录的权限
chmod 700 /home/svnroot/repository
#(svnroot用户操作结束)
五、修改Apache配置文件
vi /usr/local/apache2/conf/httpd.conf
#找到下列语句,如果没有则自行添加
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
#在后面添加
<Location /svn>
DAV svn
#svn父目录
SVNParentPath /home/svnroot/repository/
#权限配置文件
AuthzSVNAccessFile /home/svnroot/repository/authz.conf
#连接类型设置
AuthType Basic
#连接框提示
AuthName "Subversion.zoneyump"
#用户配置文件
AuthUserFile /home/svnroot/repository/authfile
#采用何种认证
Require valid-user
</Location>

六、重启apache
/usr/local/apache2/bin/apachectl restart
打开浏览器访问http://localhost/svn/test/,如果有东西显示就说明成功。
七、权限管理
#增加用户
htpasswd -c /home/svnroot/repository/authfile 用户名
#第一次设置用户时使用-c表示新建一个用户文件。回车后输入用户密码,完成对用户的增加
htpasswd /home/svnroot/repository/authfile 用户名(加入新的用户,就不用-c了)
#权限分配
vi /home/svnroot/repository/authz.conf

[groups]
admin=useradmin
#这里定义了一个用户组
devteamcs = useradmin,user1,user2
#对所有的项目,所有的用户都有读权限,admin用户有读写权限
[/]
@admin = rw
* = r
#对test项目
[test:/]
@devteamcs = rw

//注意:在编辑authz.conf文件时,所有行都必须要顶头写,不能有缩行出现,否则会报错:""Access denied: 'user1' ""。



八、在/usr/local/apache2/conf/httpd.conf文件中配置,找到文件中的这两行:
User daemon
Group daemon
将daemon改为svnroot,组也做相应更改,让apache进程以svnroot的身份运行
改完后是这个样子
User svnroot
Group svn

重启apache
/usr/local/apache2/bin/apachectl restart

访问http://localhost/svn/test提示输入用户名密码,输入创建的用户名和密码登录进去看到“Revision 0: /”之类的就表示成功啦!至此apache+svn配置完成。



linux svn安装和配置,不结合apache

linux架设subversion(svn)版本控制

linux下SVN的借助apache安装

SUSE+SVN+APACHE apache Internal Server Error 解决办法

Linux(RedHatAS4)下架设subversion(svn)服务器


SVN db\txn-current-lock 拒绝访问 P @2012-03-02 22:16:10 
Error1: Can’t open ‘db/txn-current-lock’: Permission denied

解决方法:添加读写权限。

LINUX :#chmod –R o+rw /home/svn

windows :属性中操作一下,添加对应的用户,然后设置上权限。
分享到:
评论
2 楼 lunzi 2012-09-09  
sqllite3 install
http://www.superzc.com/archives/tag/sqlite

http://blog.163.com/lideren_2008/blog/static/147057920116144347215/
1 楼 lunzi 2012-09-09  
libiconv.so.2: cannot open shared object file: No such file or directory
http://www.2cto.com/os/201202/119809.html

相关推荐

Global site tag (gtag.js) - Google Analytics