当前位置:网站首页>RHEL 6.4 安装svn和apache
RHEL 6.4 安装svn和apache
2022-07-28 10:36:00 【hongdi】
1、安装软件包(RHEL已经按默认设置安装完成)
需要安装的.rpm软件包:
postgresql-libs
perl-URI
subversion
mod_dav_svn
2、创建svn文件夹和版本库
创建svn文件夹
mkdir /opt/svn
创建版本库
svnadmin create /opt/svn/project
(注意这里需要配置/opt/svn/project的访问权限,chmod -R 777 /opt/svn/project)
3、配置Apache
配置监听端口:
vi /etc/httpd/conf/httpd.conf
该Listen 80为Listen 8008
启动Apache:service httpd start
在客户端浏览器使用http://ip:8008访问
(注意:需要开放8008端口才能访问,这里直接停止iptables:service iptables stop)
4、配置svn
编辑:vi /etc/httpd/conf.d/subversion.conf
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
<Location /repos> #/svn表示访问http://ip:8008/svn
DAV svn
SVNParentPath /opt/svn #访问http://ip:8008/svn跳转到/opt/svn
AuthType Basic
AuthName "Authorization Realm" #显示在登陆框的信息
AuthUserFile /opt/svn/passwd #存放用户和密码的文件
AuthzSVNAccessFile /opt/svn/authz #存放访问权限的文件
Require valid-user
# </LimitExcept>
</Location>
5、创建svn用户和密码文件passwd
htpasswd -c /opt/svn/passwd user1 #添加第一个用户使用-c,添加第二个使用-m或不加参数
htpasswd -m /opt/svn/passwd user2 #添加第一个用户使用-c,添加第二个使用-m或不加参数
htpasswd -m /opt/svn/passwd user3 #添加第一个用户使用-c,添加第二个使用-m或不加参数
6、创建svn访问权限文件authz
vi /opt/svn/authz
编辑内容:
[groups]
manager = user1,user2 #创建组manager,包含user1,user2
developer user1,user2,user3 #创建组developer,包含user1,user2,user3
[/] #根目录可以看到project文件夹
@manager = rw #manager组用户可以进行读写
* = #其他人无读写权限
[project:/demo] #访问project下demo文件夹的权限
@developer = rw #developer可以对demo文件夹进行读写
* =
重新启动httpd:/etc/init.d/httpd.restart
7、客户端访问
在浏览器或svn客户端输入http://ip:8008/repos/project
输入用户名密码
边栏推荐
猜你喜欢

19. Delete the penultimate node of the linked list

Preliminary understanding of float

一文学会如何做电商数据分析(附运营分析指标框架)

剑指 Offer 06. 从尾到头打印链表

Pyqt5 rapid development and practice 4.13 menu bar, toolbar and status bar and 4.14 qprinter

Blue Bridge Cup embedded Hal library USART_ RX

Product side data analysis thinking

Table data processing software, what else besides excel?

Particle swarm optimization to solve the technical problems of TSP

哈希表的相关知识点
随机推荐
两年CRUD,二本毕业,备战两个月面试阿里,侥幸拿下offer定级P6
做数据分析,你还不懂RFM分析方法(模型)?
Two years of crud, two graduates, two months of preparation for the interview with ALI, and fortunately won the offer grading p6
GKRandom
从零开始Blazor Server(2)--整合数据库
GKPolygonObstacle
用 ZEGO Avatar 做一个虚拟人|虚拟主播直播解决方案
Arduino Basics
Arduino基础知识
nodejs:检测并安装npm模块,如果已安装则跳过
Clo********e: project management notes
The blogs of excellent programmers at home and abroad are all here, please check it
Eslint, eslint Chinese document
零代码 | 轻松实现数据仓库建模,搭建BI看板
Blue Bridge Cup embedded Hal library ADC
Here is a super practical excel shortcut set (common + summary of eight categories)
GKBillowNoiseSource
判断数码管是共阳极还是共阴极
CTF skill tree - file upload
ICML 2022 | graph represents the structure aware transformer model of learning