阿里云搭建svn服务器_如何搭建家用云服务器

阿里云搭建svn服务器_如何搭建家用云服务器最近买了华为云服务器(ubuntuserver14.04),准备玩玩云,本文就是记录一下如何在华为云上搭建SVN服务器,跟阿里云上搭建SVN服务器还是有点区别的。第一次登录或第一次用SSH远程登录,需要跟客服要文档。华为云的安全策略,第一次使用apache2服务,需要看如何修改安全策略,增加80端口的公网访问,80端口是Apache2服务的默认端口。修改安全策略帮助帮助(1)安装软件

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE稳定放心使用

最近买了华为云服务器(ubuntu server 14.04),准备玩玩云,本文就是记录一下如何在华为云上搭建SVN服务器,跟阿里云上搭建SVN服务器还是有点区别的。
第一次登录或第一次用SSH远程登录,需要跟客服要文档。华为云的安全策略,第一次使用apache2服务,需要看如何修改安全策略,增加80端口的公网访问,80端口是Apache2服务的默认端口。修改安全策略帮助帮助

(1)安装软件

    sudo apt-get install subversion apache2 libapache2-svn

(2)SVN服务器配置

sudo addgroup subversion
sudo usermod -G subversion -a www-data
其中以上2条命令不能更改。查看用户组 cat /etc/group|grep subversion
创建项目目录    sudo mkdir /home/svn
配置dav_svn.conf文件 vim /etc/apache2/mods-available/dav_svn.conf
# dav_svn.conf - Example Subversion/Apache configuration
#
# For details and further options see the Apache user manual and
# the Subversion book.
#
# NOTE: for a setup with multiple vhosts, you will want to do this
# configuration in /etc/apache2/sites-available/*, not here.

# <Location URL> ... </Location>
# URL controls how the repository appears to the outside world.
# In this example clients access the repository as http://hostname/svn/
# Note, a literal /svn should NOT exist in your document root.
<Location /svn>
#enable the repository
DAV svn

# Set this to the path to your repository
#SVNPath /home/svn/vod
# Alternatively, use SVNParentPath if you have multiple repositories under
# under a single directory (/var/lib/svn/repo1, /var/lib/svn/repo2, ...).
# You need either SVNPath and SVNParentPath, but not both.
#用这个,以便放多个repository
SVNParentPath /home/svn

# Basic Authentication is repository-wide. It is not secure unless
# you are using https. See the 'htpasswd' command to create and
# manage the password file - and the documentation for the
# 'auth_basic' and 'authn_file' modules, which you will need for this
# (enable them with 'a2enmod').
AuthType Basic
AuthName "Subversion Repository"
#指定基本用户验证的密码文件存放位置
AuthUserFile /etc/subversion/dav_svn.passwd

# To enable authorization via mod_authz_svn
#mod_authz_svn配置文件的位置, 有

 <IfModule mod_authz_svn.c>

AuthzSVNAccessFile /etc/subversion/dav_svn.authz

 </IfModule>

# The following three lines allow anonymous read, but make
# committers authenticate themselves. It requires the 'authz_user'
# module (enable it with 'a2enmod').
#<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
#</LimitExcept>

</Location>

其中/etc/subversion/dav_svn.passwd是SVN的用户名和密码设置,指定用户验证密码文件存放位置
/etc/subversion/dav_svn.authz是访问权限配置
重启Apache2服务: sudo /etc/init.d/apache2 restart
(3)创建SVN仓库文件
创建项目存放路径cd /home/svn
mkdir project1
更改版本库所示用户、组
sudo chown -R root:subversion project1
创建SVN仓库
sudo svnadmin create /home/svn/project1
更改权限
sudo chmod -R g+rws project1
(4)用户权限配置
创创建用户hadesjaky和密码,执行命令后输入密码
sudo htpasswd -c etc/subversion/dav_svn.passwd hadesjaky
继续添加新用户,去掉-c,否则会覆盖之前设定的用户名和密码
创建授权文件
vi htpasswd /etc/subversion/dav_svn.authz
里面输入
[groups]
administrator=hadesjaky
[project1:/]
@administrator=rw

重启SVN服务器
killall svnserve
svnserve -d -r /home/svn/

检测
svn checkout http://地址/svn/project1 project1 --username 用户名 --password 密码

相关问题

AH00558错误解决:在 sudo vi /etc/apache2/conf-enabled/httpd.conf 增加如下内容
ServerName 127.0.0.1:80
修改/etc/hosts 文件,修改127.0.0.1 localhost 修改为127.0.0.1 主机名

查看端口命令:sudo netstat -aunpt| grep LISTEN
查看SVN服务进程: sudo ps aux | grep svn

参考资料

win远程连接Linux主机
阿里云创建SVN服务器
阿里云搭建SVN服务器

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/180987.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 外键约束

    外键约束外键作用:1.保证数据的完整性、一致性,更可靠。2.设置外键约束的两个表之间会有父子关系,即字表中外键字段的取值范围取决于父表3.设置外键一定程度上降低了数据库的速度4.字表中外键字段的

    2022年7月2日
    30
  • Idea激活码最新教程2024.2.3版本,永久有效激活码,亲测可用,记得收藏

    Idea激活码最新教程2024.2.3版本,永久有效激活码,亲测可用,记得收藏Idea 激活码教程永久有效 2024 2 3 激活码教程 Windows 版永久激活 持续更新 Idea 激活码 2024 2 3 成功激活

    2025年5月30日
    3
  • 如何解决tomcat启动闪退问题

    如何解决tomcat启动闪退问题在这几天,遇到一个Tomcat启动闪退的问题,通过查阅各种资料,算是完美解决。在此分享给朋友们。    首先,确定你的问题在哪里    1.查询错误:win+R输入cmd,进入一般处理程序。通过cd找到你Tomcat的bin文件夹,在bin下面输入startup.batrun运行,运行后,如果如(图1)提示,缺少JAVA_HOME或者缺少JRE_HOME(如

    2022年5月7日
    35
  • linux之awk用法详解

    linux之awk用法详解[转自:http://blog.chinaunix.net/uid-23302288-id-3785105.html]awk是行处理器:相比较屏幕处理的优点,在处理庞大文件时不会出现内存溢出或是处理缓慢的问题,通常用来格式化文本信息awk处理过程: 依次对每一行进行处理,然后输出awk命令形式:awk[-F|-f|-v]‘BEGIN{}//{command1;comman…

    2022年7月27日
    14
  • Android http Request / Response ContentType

    Android http Request / Response ContentType客户端在进行http请求服务器的时候,需要告诉服务器请求的类型,服务器在返回给客户端的数据的时候,也需要告诉客户端返回数据的类型。这个类型就是 ContentType ,不同的ContentType会影响客户端/服务器所看到的效果。contentType:告诉服务器,我要发什么类型的数据  1、默认的ContentType为 text/html也就是网页格式.   

    2022年7月19日
    11
  • WKT_WK是什么品牌

    WKT_WK是什么品牌WKT-概念WKT(Well-knowntext)是一种文本标记语言,用于表示矢量几何对象、空间参照系统及空间参照系统之间的转换。它的二进制表示方式,亦即WKB(well-knownbinar

    2022年8月4日
    8

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号