下载svn的安装文件:
wget 'http://subversion.tigris.org/downloads/subversion-deps-1.6.9.tar.gz'
wget 'http://subversion.tigris.org/downloads/subversion-1.6.9.tar.gz'
解压安装
1,# tar zxvf subversion-1.6.9.tar.gz
2,#tar zxvf subversion-deps-1.6.9.tar.gz
3,#cd subversion-1.6.9
4,#./configure
5,#make && make install
6,运行 svn --help
出现 如下:
usage: svn <subcommand> [options] [args] Subversion command-line client, version 1.6.9. Type 'svn help <subcommand>' for help on a specific subcommand. Type 'svn --version' to see the program version and RA modules or 'svn --version --quiet' to see just the version number.
Most subcommands take file and/or directory arguments, recursing on the directories. If no arguments are supplied to such a command, it recurses on the current directory (inclusive) by default.
Available subcommands: add blame (praise, annotate, ann) cat changelist (cl) checkout (co) cleanup commit (ci) copy (cp) delete (del, remove, rm) diff (di) export help (?, h) import info list (ls) lock log merge mergeinfo mkdir move (mv, rename, ren) propdel (pdel, pd) propedit (pedit, pe) propget (pget, pg) proplist (plist, pl) propset (pset, ps) resolve resolved revert status (stat, st) switch (sw) unlock update (up)
Subversion is a tool for version control. For additional information, see http://subversion.tigris.org/
|
1、检查是否安装了低版本的SVN
[root@localhost /]# rpm -qa subversion
2、卸载旧的SVN
[root@localhost modules]# yum remove subversion
安装SVN
[root@localhost modules]# yum install httpd httpd-devel subversion mod_dav_svn mod_auth_mysql
确认已安装了svn模块
[root@localhost /]# cd /etc/httpd/modules
[root@localhost modules]# ls | grep svn
检验已经安装的SVN版本信息
[root@localhost modules]# svnserve --version
注意是svnserve
代码库创建
SVN软件安装完成后还需要建立SVN库
[root@localhost modules]# mkdir -p /opt/svn/repositories
[root@localhost modules]# svnadmin create /opt/svn/repositories
执行上面的命令后,自动建立repositories库,查看/opt/svn/repositories 文件夹发现包含了conf, db,format,hooks, locks, README.txt等文件,说明一个SVN库已经建立。
配置代码库
进入上面生成的文件夹conf下,进行配置
[root@localhost modules]# cd /opt/svn/repositories/conf
用户密码passwd配置
[root@localhost password]# cd /opt/svn/repositories/conf
[root@admin conf]# vi passwd
修改passwd为以下内容:
权限控制authz配置
[root@admin conf]# vi authz
目的是设置哪些用户可以访问哪些目录,向authz文件追加以下内容:#设置[/]代表根目录下所有的资源
服务svnserve.conf配置
[root@admin conf]# vi svnserve.conf
最后追加以下内容:
配置防火墙端口
[root@localhost conf]# vi /etc/sysconfig/iptables
添加以下内容:
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3690 -j ACCEPT
保存后重启防火墙
[root@localhost conf]# service iptables restart
或是关闭防火墙 :service iptables stop
启动SVN
svnserve -d -r /opt/svn/repositories
查看SVN进程
[root@localhost conf]# ps aux|grep svnserve
停止重启SVN
[root@localhost password]# killall svnserve //停止
或kill -9 进程id
[root@localhost password]# svnserve -d -r /opt/svn/repositories // 启动
测试
SVN服务已经启动,使用客户端测试连接。 (更多内容:www.aipanshi.com 爱磐石PHP学习博客)
客户端连接地址:svn://192.168.100.200(注意是svn)
用户名/密码:
niejunzhong/123456
下载svn项目:
svn co 'svn://116.213.142.30:3391/Server/partnerV3'
项目的编译使用ant请参考《》
打包:
jar -cvfM0 partnerV3.war WebRoot/
解压:
jar -xvf partnerV3.war