阿里云服务器搭建SVN仓库管理项目
最近由于个人学习(新手)需要,方便个人项目管理,想利用自己现有的阿里云服务器对项目进行管理,首先根据自己的需要,先使用svn作为目前暂时的管理方法(相对比较简单)。个人电脑是win10 64位系统,服务器是阿里云CentOS 7.3 64位。 一、服务器svn环境搭建(服务器使用的是centos7.3 64位系统) 1、安装svn yum install subversion 2、查看版本号 svnserve --version 3、创建SVN版本库 在这里我直接创建在var/svn文件夹下。如果么这个目录,就新建这个目录 mkdir -p /var/svn/svnrepos 创建版本库 svnadmin create /var/svn/版本库名字 4、修改conf目录中的authz、passwd、svnserve.conf 修改authz: [\] admin = rw 用户名=rw 读写权限 修改passwd: [users] # harry = harryssecret # sally = sallyssecret admin=000000 用户名=密码 修改 svnserve.conf: [general] ### The anon-access and auth-access options control access to the ### repository for unauthenticated (a.k.a. anonymous) users and ### authenticated users, respectively. ### Valid values are "write", "read", and "none". ### Setting the value to "none" prohibits both reading and writing; ### "read" allows read-only access, and "write" allows complete ### read/write access to the repository. ### The sample settings below are the defaults and specify that anonymous ### users have read-only access to the repository, while authenticated ### users have read and write access to the repository. anon-access = read auth-access = write ### The password-db option controls the location of the password ### database file. Unless you specify a path starting with a /, ### the file's location is relative to the directory containing ### this configuration file. ### If SASL is enabled (see below), this file will NOT be used. ### Uncomment the line below to use the default password file. password-db = passwd ### The authz-db option controls the location of the authorization ### rules for path-based access control. Unless you specify a path ### starting with a /, the file's location is relative to the the ### directory containing this file. If you don't specify an ### authz-db, no path-based access control is done. ### Uncomment the line below to use the default authorization file. # authz-db = authz ### This option specifies the authentication realm of the repository. ### If two repositories have the same authentication realm, they should ### have the same password database, and vice versa. The default realm ### is repository's uuid. realm = My First Repository ### The force-username-case option causes svnserve to case-normalize ### usernames before comparing them against the authorization rules in the ### authz-db file configured above. Valid values are "upper" (to upper- ### case the usernames), "lower" (to lowercase the usernames), and ### "none" (to compare usernames as-is without case conversion, which ### is the default behavior). # force-username-case = none 去掉 anon-access = read、 auth-access = write、 password-db = passwd、 realm = My First Repository四句话前面的注释。 注意:以上修改全部顶格,不要留空格,会报错。 5、添加安全组规则(释放3690端口) 6、启动svn svnserve -d -r /var/svn/mystudy 7、客户端访问 svn://ip地址:3690/xxxx (iP地址为你linux的ip,xxxx为前文创建的版本库名称,3690为svn默认端口) 参考资料: http://www.cnblogs.com/mymelon/p/5483215.html http://www.linuxidc.com/Linux/2013-10/91903.htm http://www.linuxidc.com/Linux/2016-01/127679.htm