此文档仅供参考,因每个公司要求不同,安装路劲也不同
1、首先修改selinux配置文件
/etc/selinux/config
SELINUX=disabled
2、下载Http、subversion、mod_dav_svn
yum -y install httpd subversion mod_dav_svn
3、查看subversionh和Http的版本号
httpd --version
svnserve --version
find / -name mod_dav_svn.so
/usr/lib64/httpd/modules/mod_dav_svn.so
find / -name mod_authz_svn.so
/usr/lib64/httpd/modules/mod_authz_svn.so
4、创建svn存储库,并修改权限
mkdir /var/www/svn
svnadmin create /var/www/svn/spring-wo
ll /var/www/svn/
ll /var/www/svn/spring-wo
chown -R apache:apache /var/www/svn/spring-wo/
5、创建用户,密码和设置权限
touch /var/www/svn/passwd #创建密码文件
htpasswd /var/www/svn/passwd admin 创建用户admin,并将密码保存到passwd
htpasswd /var/www/svn/passwd guest 创建用户guest ,
cat /var/www/svn/passwd 查看密码
将authz复制到svn目录下,并在autz中添加权限
cp /var/www/svn/spring-wo/conf/authz /var/www/svn/authz
[/]
damin = rw
guest = r
6、在/etc/httpd/conf.d中创建subversion.conf,并添加一下内容
<Location /svn>
DAV svn
SVNParentPath /var/www/svn
AuthType Basic
AuthName "Authorization SVN"
AuthzSVNAccessFile /var/www/svn/authz
AuthUserFile /var/www/svn/passwd
Require valid-user
</Location>
7、启动http服务,并设置开机启动
systemctl start httpd
systemctl enable httpd
8、设置防火墙开放3690端口和8080端口
firewall-cmd --permanent --add-port=3690/tcp --zone=public
firewall-cmd --permanent --add-port=80/tcp --zone=public
firewall-cmd --reload
9、重启服务器,重启以后启动svn服务
svnserve -d -r /var/www/svn
1、首先修改selinux配置文件
/etc/selinux/config
SELINUX=disabled
2、下载Http、subversion、mod_dav_svn
yum -y install httpd subversion mod_dav_svn
3、查看subversionh和Http的版本号
httpd --version
svnserve --version
find / -name mod_dav_svn.so
/usr/lib64/httpd/modules/mod_dav_svn.so
find / -name mod_authz_svn.so
/usr/lib64/httpd/modules/mod_authz_svn.so
4、创建svn存储库,并修改权限
mkdir /var/www/svn
svnadmin create /var/www/svn/spring-wo
ll /var/www/svn/
ll /var/www/svn/spring-wo
chown -R apache:apache /var/www/svn/spring-wo/
5、创建用户,密码和设置权限
touch /var/www/svn/passwd #创建密码文件
htpasswd /var/www/svn/passwd admin 创建用户admin,并将密码保存到passwd
htpasswd /var/www/svn/passwd guest 创建用户guest ,
cat /var/www/svn/passwd 查看密码
将authz复制到svn目录下,并在autz中添加权限
cp /var/www/svn/spring-wo/conf/authz /var/www/svn/authz
[/]
damin = rw
guest = r
6、在/etc/httpd/conf.d中创建subversion.conf,并添加一下内容
<Location /svn>
DAV svn
SVNParentPath /var/www/svn
AuthType Basic
AuthName "Authorization SVN"
AuthzSVNAccessFile /var/www/svn/authz
AuthUserFile /var/www/svn/passwd
Require valid-user
</Location>
7、启动http服务,并设置开机启动
systemctl start httpd
systemctl enable httpd
8、设置防火墙开放3690端口和8080端口
firewall-cmd --permanent --add-port=3690/tcp --zone=public
firewall-cmd --permanent --add-port=80/tcp --zone=public
firewall-cmd --reload
9、重启服务器,重启以后启动svn服务
svnserve -d -r /var/www/svn