CentOS5.5(i386)上安装SVN Server

下载最新版本(这里版本是 v1.6.11 (for Red Hat Linux ))

http://www.collab.net/downloads/subversion/redhat.html

CollabNet Subversion Command-Line Client v1.6.11 (for Red Hat Linux)

CollabNet Subversion Server v1.6.11 (for Red Hat Linux)

CollabNet Subversion Extras v1.6.11 (for Red Hat Linux)


安装包:

CollabNetSubversion-client-1.6.11-3.i386.rpm

CollabNetSubversion-server-1.6.11-3.i386.rpm

CollabNetSubversion-extras-1.6.11-3.i386.rpm


使用chmod +x 使其可以执行。


使用安装命名rmp -ivh 安装以上包,顺序client->server->extras。


安装完成后,切换目录到/opt/CollabNet_Subversion/bin,配置过程如下:



[root@localhost bin]# ./Configure-CollabNet-Subversion (输入该命令开始配置)



CollabNet Subversion Server is a free download of open-source Subversion,

compiled and tested by CollabNet. For more information about CollabNet

Subversion, visit the CollabNet community at http://open.collab.net. 



Would you like to configure the CollabNet Subversion Server now? [yes] (按回车开始配置)


Welcome to CollabNet Subversion Server setup.


You will now be asked some questions to configure CollabNet Subversion.

Defaults are given in square brackets. If a default is okay for you

Just hit [Enter] to continue.



This setup can configure either Apache or svnserve as Subversion

server, for you. Would you like to configure Apache as your

Subversion server now? [yes] (是否配置apache server for SVN)


Continuing with apache Subversion server configuration ...


Specify the base directory for Subversion repositories: [/var/svn/repositories] 


Non-existing base path, Let me create and continue [yes] (配置仓库基路径)


Base path created.

Would you like to create a new Subversion repository? [yes] (配置第一个svn仓库)


What should be your new Subversion repository name? repository1  (输入第一个仓库名称,这里为 repository1


New repository created.

Would you like to initialize the repository with trunk/branches/tags folders? [no] yes (是否初始化 trunk/branches/tags 目录


Done.


Would you like to create another Subversion repository? [yes]  (配置另一个svn仓库)


What should be your new Subversion repository name? repository2 (输入第二个仓库名称,这里为 repository2


New repository created.

Would you like to initialize the repository with trunk/branches/tags folders? [yes] (是否初始化 trunk/branches/tags 目录


Done.


Would you like to create another Subversion repository? [yes] no (上面已经创建了2个仓库,不再创建新的仓库了)


Would you like to give the name and port that the server uses to identify itself? [yes]  (配置apache 服务域名端口等)


Registered DNS name or IP address: 192.168.226.128  (配置IP地址或域名)


Server port number: 80 (配置apache端口,默认端口为80,如果被占用,请使用其他端口)


Allow anonymous read access? [no] (是否匿名访问,这里设置不允许匿名访问)


0 users currently have access to this repository:


Would you like to create a new Subversion account? [yes] (是否设置svn用户)


Account username 

(To re-create or delete a Subversion account, enter an existing username): blueart (svn用户名称)


Account password:   (输入密码)


Retype account password:  (再次输入密码)


Adding password for user blueart

Account created


Would you like to create another user account? [yes] no (是否创建另一个账户)


Would you like to configure ViewVC?  [yes]  (是否配置viewVC)


Stopping CollabNet Subversion: httpd (no pid file) not running

                                                           [确定]

Starting CollabNet Subversion:                             [确定]


  Congratulations! You have successfully configured the CollabNet

  Subversion server.


  You can access your repositories at the following URL:

  http://192.168.226.128:8000/svn/YOUR-REPOS-NAME

  http://192.168.226.128:8000/viewvc/YOUR-REPOS-NAME

===================到此配置完毕====================

可以使用   http://192.168.226.128:8000/svn/YOUR-REPOS-NAME访问svn,

或使用 viewvc访问svn, http://192.168.226.128:8000/viewvc/YOUR-REPOS-NAME

修改防火墙,是80端口开放到外部:

[root@localhost bin]# /sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT

[root@localhost bin]# /etc/rc.d/init.d/iptables save

将当前规则保存到 /etc/sysconfig/iptables:                 [确定]

[root@localhost bin]# /etc/init.d/iptables restart

清除防火墙规则:                                           [确定]

把 chains 设置为 ACCEPT 策略:filter                       [确定]

正在卸载 Iiptables 模块:                                  [确定]

应用 iptables 防火墙规则:                                 [确定]

载入额外 iptables 模块:ip_conntrack_netbios_ns            [确定]

猜你喜欢

转载自mjtfly.iteye.com/blog/685293
今日推荐