subversion安装与配置(一)

1。安装环境 RHEL5

2。首先查看机子是否安装了subversion

rpm -qa | grep subversion

 3。安装subversion及subversion-devel

 
ls /yum/Server | grep subversion
   subversion-1.4.2-4.el5_3.1.i386.rpm 
   subversion-devel-1.4.2-4.el5_3.1.i386.rpm
   subversion-javahl-1.4.2-4.el5_3.1.i386.rpm
   subversion-perl-1.4.2-4.el5_3.1.i386.rpm
   subversion-ruby-1.4.2-4.el5_3.1.i386.rpm
yum install subversion
yum install subversion-devel

 4。建立svn目录

mkdir /svn
mkdir /svn
svnserve /svn/test

 5。此时会在svn目录下生成test目录,进去之后会发现一下几个文件

ls /svn/test/
  conf  dav  db  format  hooks  locks   README.txt

 6。进入conf编写配置文件

vim svnserve.conf
   [general]
   anon-access = none
   auth-access = write
   password-db = passwd
   authz-db = authz

vim passwd
   [users]
   lxsvn = liumangsvn (用户名 = 密码)

vim authz
   [groups]
   [/]
   lxsvn = rw

 7。编写hooks里的文件

cd hooks
cp post-commit.tmps post-commit
vim post-commit(加入以下两行)
   export LANG=en_US.UTF-8
   svn update /var/www/html/new_fuli --username lxsvn --password liumangsvn
chmod 777 post-commit

 8。编辑配置文件

 

LoadModule dav_svn_module     modules/mod_dav_svn.so
LoadModule authz_svn_module   modules/mod_authz_svn.so


   DAV svn
   SVNParentPath /svn/test

   # Limit write permission to list of valid users.
   
      # Require SSL connection for password protection.
      # SSLRequireSSL

      AuthType Basic
      AuthName "Authorization Realm"
      AuthUserFile /svn/test/conf/passwd
      Require valid-user
  

 9。导入文件。

svn import /var/www/html/new_fuli file:///svn/test

你可能感兴趣的:(linUX,subversion,SVN,vim,Ruby,Access)