Chinaunix首页 | 论坛 | 博客
  • 博客访问: 381970
  • 博文数量: 124
  • 博客积分: 2911
  • 博客等级: 少校
  • 技术积分: 1050
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-15 15:57
文章分类

全部博文(124)

文章存档

2012年(6)

2011年(26)

2010年(92)

我的朋友

分类: 系统运维

2010-11-29 18:57:42

1. yum install httpd
2. yum install subversion
3. yum install mod_dav_svn
This generates:
/etc/httpd/conf.d/subversion.conf 
/etc/httpd/modules/
mod_dav_svn.so //dav makes clients can access subversion repository through Apache's http service.
mod_authz_svn.so //used to authenticate svn's user.

4. Repository Initialization
4.1
mkdir -p /opt/svn/repos/ //Make main repository.
4.2
svnadmin create /opt/svn/repos/paper //make 1st version repository
4.3
cd ~/Desktop
svn import paper file:///opt/svn/repos/paper -m "Initialization" // Import project

5. Apache & SeLinux Configuration
5.1
chown -R apache.apache /opt/svn/
5.2
chcon -R -t httpd_sys_content_rw_t /opt/svn/

6. User & Permission
6.1
htpasswd -cm /opt/svn/passwd Coldplayer //Authorize user Coldplayer(must exist in system) and his passwd
6.2
vim /opt/svn/authfile //Create a configuration for users' Access to SVN
[groups] //Create a group named "Owner"
Owner=Coldplayer,xxx //Coldplayer belongs to group "Owner"

[paper:/] //Begin to configure "paper"(version repository)'s Visiting Permission
Coldplayer=rw //Coldplayer has a Read&&Write permissions
@Owner=r //Group "Owner" only has Read permission

7. Subversion Configuration
vim /etc/httpd/conf.d/subversion.conf
LoadModule dav_svn_module     modules/mod_dav_svn.so
LoadModule authz_svn_module   modules/mod_authz_svn.so

DAV svn
SVNParentPath /opt/svn/repos //Specify the parent path of the repository configured.
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /opt/svn/passwd
AuthzSVNAccessFile /opt/svn/authfile
Require valid-user //Specify it must be a valid user to get access to this repository.

8. Over
OK! restart httpd service!
Then visit
        Or use SVN tools to checkout

【SVN Commands】
0. View List
svn ls

1. Import
svn import project_directory
svn import project_directory file:///SVN_PATH/svn_project

2. Checkout
svn checkout
svn checkout file:///SVN_PATH/svn_project
svn checkoit -r 12 file:///var/lib/svn/dev/projects //Checkout第12版的projcets

3. Update
DIR_svn_project$ svn up

4. Commit
DIR_svn_project$ svn ci

5. Status
DIR_svn_project$ svn st
? 此檔案不在SVN Repo裡面
A 此次新增的檔案
C 此檔案已經有人改過, 合併不成功, 需要人工介入
D 此次移除的檔案
M 此檔案有修改過
U 此檔案有被更新過
6. Add
DIR_svn_project$ svn add filename | svn add directory

7. Rename
DIR_svn_project$ svn mv filename new_filename

8. Revert: 還原這次的修改, 回到前一版的檔案狀態(未commit前可用)
DIR_svn_project$ svn revert [file | directory]

9. View Differents between Local Copy and Server Repo.
svn diff xxx.file


阅读(1189) | 评论(0) | 转发(0) |
0

上一篇:linux基础学习

下一篇:Automake_Relevant

给主人留下些什么吧!~~