subversionのインストール
[root@localhost ~]# yum install subversion Loading "fastestmirror" plugin Determining fastest mirrors * base: ftp.iij.ad.jp * updates: ftp.iij.ad.jp * addons: ftp.iij.ad.jp * extras: ftp.iij.ad.jp base : ################################################## 2458/2458 updates : ################################################## 374/374 extras : ################################################## 270/270 Setting up Install Process Parsing package install arguments Resolving Dependencies --> Running transaction check ---> Package subversion.i386 0:1.4.2-2.el5 set to be updated --> Processing Dependency: libneon.so.25 for package: subversion --> Processing Dependency: perl(URI) >= 1.17 for package: subversion --> Running transaction check ---> Package perl-URI.noarch 0:1.35-3 set to be updated ---> Package neon.i386 0:0.25.5-5.1 set to be updated --> Finished Dependency Resolution Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: subversion i386 1.4.2-2.el5 base 2.3 M Installing for dependencies: neon i386 0.25.5-5.1 base 95 k perl-URI noarch 1.35-3 base 116 k Transaction Summary ============================================================================= Install 3 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 2.5 M Is this ok [y/N]: y Downloading Packages: (1/3): neon-0.25.5-5.1.i3 100% |=========================| 95 kB 00:00 (2/3): subversion-1.4.2-2 100% |=========================| 2.3 MB 00:01 (3/3): perl-URI-1.35-3.no 100% |=========================| 116 kB 00:00 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing: neon ######################### [1/3] Installing: perl-URI ######################### [2/3] Installing: subversion ######################### [3/3] Installed: subversion.i386 0:1.4.2-2.el5 Dependency Installed: neon.i386 0:0.25.5-5.1 perl-URI.noarch 0:1.35-3 [root@localhost ~]# useradd svn [root@localhost ~]# cat /etc/passwd : (略) svn:x:500:500::/home/svn:/bin/bash [root@localhost ~]# ll /home/ 合計 8 drwx------ 2 svn svn 4096 8月 17 20:20 svn [root@localhost ~]# mkdir /var/svn [root@localhost ~]# chmod 777 /var/svn [root@localhost ~]# ll /var 合計 140 drwxr-xr-x 5 root root 4096 5月 7 14:21 cache drwxr-xr-x 2 root root 4096 3月 30 2007 db drwxr-xr-x 3 root root 4096 3月 3 09:19 empty drwxr-xr-x 2 root root 4096 3月 30 2007 games drwxr-xr-x 15 root root 4096 8月 17 19:53 lib drwxr-xr-x 2 root root 4096 3月 30 2007 local drwxrwxr-x 5 root lock 4096 3月 3 09:18 lock drwxr-xr-x 5 root root 4096 8月 17 19:52 log lrwxrwxrwx 1 root root 10 3月 3 09:15 mail -> spool/mail drwxr-xr-x 2 root root 4096 3月 30 2007 nis drwxr-xr-x 2 root root 4096 3月 30 2007 opt drwxr-xr-x 2 root root 4096 3月 30 2007 preserve drwxr-xr-x 8 root root 4096 8月 17 20:16 run drwxr-xr-x 5 root root 4096 3月 3 09:17 spool drwxrwxrwx 2 root root 4096 8月 17 20:22 svn drwxrwxrwt 2 root root 4096 8月 17 20:16 tmp drwxr-xr-x 6 root root 4096 5月 7 14:21 www drwxr-xr-x 2 root root 4096 3月 30 2007 yp [root@localhost ~]# su svn [svn@localhost root]$ [svn@localhost root]$ svnadmin create /var/svn/repos [svn@localhost root]$ ll /var/svn/ 合計 8 drwxrwxr-x 7 svn svn 4096 8月 17 20:23 repos [svn@localhost root]$ svn mkdir file:///var/svn/repos/test01 -m 'mkdir test' リビジョン 1 をコミットしました。 [svn@localhost root]$ svn ls file:///var/svn/repos/ test01/ [svn@localhost root]$ cd [svn@localhost ~]$ svn co file:///var/svn/repos/test01 リビジョン 1 をチェックアウトしました。 [svn@localhost ~]$ ll 合計 8 drwxrwxr-x 3 svn svn 4096 8月 17 20:24 test01 [root@localhost ~]# useradd naoyes [root@localhost ~]# cat /etc/passwd : (略) svn:x:500:500::/home/svn:/bin/bash naoyes:x:501:501::/home/naoyes:/bin/bash [root@localhost ~]# ll /home/ 合計 16 drwx------ 2 naoyes naoyes 4096 8月 17 20:27 naoyes drwx------ 4 svn svn 4096 8月 17 20:24 svn [root@localhost ~]# id naoyes uid=501(naoyes) gid=501(naoyes) 所属グループ=501(naoyes) context=root:system_r:unconfined_t:SystemLow-SystemHigh # チェックアウトは可能だがディレクトリの作成はダメ [naoyes@localhost ~]$ svn co file:///var/svn/repos/test01 リビジョン 1 をチェックアウトしました。 [naoyes@localhost ~]$ svn mkdir file:///var/svn/repos/test02 -m 'mkdir test' svn: ディレクトリ '/var/svn/repos/db/transactions/1-1.txn' を作成できません: 許可がありません [root@localhost ~]# su svn [svn@localhost root]$ whoami svn [svn@localhost root]$ vi /var/svn/repos/conf/passwd ### This file is an example password file for svnserve. ### Its format is similar to that of svnserve.conf. As shown in the ### example below it contains one section labelled [users]. ### The name and password for each user follow, one account per line. [users] # harry = harryssecret # sally = sallyssecret naoyes = naoyes #<- 追加 [svn@localhost root]$ exit exit [root@localhost ~]# su naoyes [naoyes@localhost root]$ cd [naoyes@localhost ~]$ svn mkdir file:///var/svn/repos/test02 -m 'mkdir test' svn: ディレクトリ '/var/svn/repos/db/transactions/1-1.txn' を作成できません: 許可がありません # まだダメ [naoyes@localhost ~]$ exit exit [root@localhost ~]# whoami root [root@localhost ~]# usermod -G svn,naoyes naoyes [root@localhost ~]# id naoyes uid=501(naoyes) gid=501(naoyes) 所属グループ=501(naoyes),500(svn) context=root:system_r:unconfined_t:SystemLow-SystemHigh [root@localhost ~]# su naoyes [naoyes@localhost root]$ whoami naoyes [naoyes@localhost root]$ cd [naoyes@localhost ~]$ svn mkdir file:///var/svn/repos/test02 -m 'mkdir test' リビジョン 2 をコミットしました。 [naoyes@localhost ~]$ # できた # ためしにさっきのファイルの変更を元に戻す [naoyes@localhost ~]$ exit exit [root@localhost ~]# su svn [svn@localhost root]$ vi /var/svn/repos/conf/passwd [svn@localhost root]$ ### This file is an example password file for svnserve. ### Its format is similar to that of svnserve.conf. As shown in the ### example below it contains one section labelled [users]. ### The name and password for each user follow, one account per line. [users] # harry = harryssecret # sally = sallyssecret # できた・・・ [root@localhost ~]# su naoyes [naoyes@localhost root]$ cd [naoyes@localhost ~]$ svn mkdir file:///var/svn/repos/test03 -m 'mkdir test' リビジョン 3 をコミットしました。 [naoyes@localhost ~]$
subversionはローカルで利用する分にはグループだけ気にすればいいみたいだね^^