1.源码安装
http://archive.apache.org/dist/subversion/
http://apr.apache.org/download.cgi
SVN中文网址(操作手册)
http://www.iusesvn.com/
软件版本
wget -c http://archive.apache.org/dist/subversion/subversion-1.6.19.tar.bz2
wget -c http://archive.apache.org/dist/subversion/subversion-deps-1.6.19.tar.bz2
wget -c http://mirror.bit.edu.cn/apache//apr/apr-util-1.5.2.tar.bz2
wget -c http://mirrors.cnnic.cn/apache/httpd/httpd-2.2.24.tar.bz2
wget -c http://mirror.bit.edu.cn/apache//apr/apr-1.4.6.tar.bz2
或者到我的站下载
wget -c linuxchina.net/svn.tar.bz2
#官方安装文档
#http://httpd.apache.org/docs/2.2/install.html
tar xvf apr-1.4.6.tar.bz2
cd apr-1.4.6
./configure --prefix=/usr/local/apr
make -j2 &&make install
cd ..
tar xvf apr-util-1.5.2.tar.bz2
cd apr-util-1.5.2
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
#./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/bin/apr-1-config
make -j 3 &&make install
#apache
tar xvf httpd-2.2.24.tar.bz2
cd httpd-2.2.24
./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-included-apr --with-apr-util=/usr/local/apr-util --with-ssl --enable-ssl --enable-modules=so --enable-dav --enable-maintainer-mode
make -j 3 && make install
cp /usr/local/apache/bin/apachectl /etc/rc.d/init.d/httpd
******
安装subversion
两个压缩包解压后都会自动放到此目录下,不用手动更改。
tar xvf subversion-1.6.19.tar.bz2 ;
tar xvf subversion-deps-1.6.19.tar.bz2
wget -c http://www.sqlite.org/sqlite-amalgamation-3.6.13.tar.gz
tar xvf sqlite-amalgamation-3.6.13.tar.gz
mkdir -p /root/svn/subversion-1.6.19/sqlite-amalgamation
cp sqlite-3.6.13/sqlite3.c /root/svn/subversion-1.6.19/sqlite-amalgamation/sqlite3.c
cd subversion-1.6.19
./configure --prefix=/usr/local/svn --with-apxs=/usr/local/apache/bin/apxs -with-apr=/usr/local/apr/bin/apr-1-config --with-apr-util=/usr/local/apr-util/bin/apu-1-config --with-ssl
make -j2 && make install;
cp /usr/local/svn/bin/svnadmin /usr/local/sbin
/usr/local/svn/bin/svnadmin --version
vi apache/conf/httpd.conf
确保配置文件添加了如下内容(表示正确加载了SVN的模块):
# LoadModule foo_module modules/mod_foo.so
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
#
#然后配置仓库:(需要自己添加的内容)
DAV svn
SVNParentPath /data/svn
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /data/svn/svnpasswd
Require valid-usr
AuthzSVNAccessFile /data/svn/svnaccessfile
mkdir /data/svn -p
建立SVN版本库
cd /data/svn/#/data/svn目录是版本库目录
#修改权限
/usr/local/svn/bin/svnadmin create project #创建版本库project
chmod -R 777 project/
建立svnaccessfile
vi svnaccessfile #文件名称与apache配置的保持一致
[project:/]
evan = rw#添加能访问的版本库的用户及权限
#添加apache的用户和密码(登录apache):
/usr/local/apache/bin/htpasswd -bc svnpasswd evan 2240
# -bc 第一次创建需要c参数以后用户只要b即可 这里create 用户为evan
5测试
http://192.168.23.3/svn/project
svn co http://192.168.23.3/svn/project
×××××××××××××××
备份什么的这里没写 可以打开参考页面自己看看
错误解决
get the sqlite 3.6.13 amalgamation from:
http://www.sqlite.org/sqlite-amalgamation-3.6.13.tar.gz
unpack the archive using tar/gunzip and copy sqlite3.c from the
resulting directory to:
/root/svn/subversion-1.6.19/sqlite-amalgamation/sqlite3.c
This file also ships as part of the subversion-deps distribution.
sqlite-amalgamation 这个目录有时候要记得自己 mkidir
用法注意
evan@evan-laptop:~/svndoc/ywshare$ svn up
WARNING: gnome-keyring:: couldn’t connect to: /tmp/keyring-WqIsnA/pkcs11: 没有那个文件或目录
GNOME keyring [(null)] 的密码:
svn: 方法 OPTIONS 失败于 “http://192.168.1.18:8080/ywshare”: 认证失败: 不能认证到服务器: 被拒绝的 Basic 挑战 (http://192.168.1.18:8080)
GNOME keyring [(null)] 的密码: 这里随便输入个密码就行了啦 ,如果直接回车就会报如上的错误
svn install
http://www.linuxchina.net/?p=553