1. #安装
Yum Install Subversion
2. #测试
Svnserve--version
3. #创建库根路径
Mkdir/usr/local/svn
4. #创建一个项目库
Svnadmin Create/usr/local/svn/project
5. Modify the configuration file
Cd/usr/local/svn/project
VI svnserve.conf
[General]
Anon-access=none-------------#没有登录不能操作
Auth-access=write--------------#登录后可以写操作
PASSWORD-DB=/USR/LOCAL/SVN/PROJECT/CONF/PASSWD---------------#用户密码文件的位置
Authz-db=/usr/local/svn/project/conf/authz-------------------#授权文件的路径
realm=/usr/local/svn/project/--------------------#认证空间名, directory where repository is located
* * VI passwd
[Users]
Harry = Harryssecret
Sally = Sallyssecret
SXL = 123456-----------------------#格式是 user name = password
* * VI Authz
[Groups]
# harry_and_sally = harry,sally
# Harry_sally_and_joe = Harry,sally,&joe
ADMIN=SXL-----------------#给用户分配用户组, format is group name = member 1, member 2
[/]
@admin =rw--------------------------------#给用户组分配权限, format @ Group name =RW (R Read permission, W write permission)
*=
6. Start the service (SVN default open port is 3690)
svnserve-d-r/usr/local/svn/--listen-port 3686
Ps-ef|grep Svnserve
7. Stop the Service
kill-9 {Process id}
8. Testing
Download code base
SVN Co svn://192.168.159.128:3686/project
Modify the Update code
CD ~/project/
Touch index1.php
SVN add index1.php
SVN commit index1.php-m "SADGA"
Submit after modifying a file
SVN ci-m ' Add new file ' test.php
9. Set Boot up
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #/etc/rc.d/rc.local, CentOS 7 no Execute permission after #安装好 SVN service, the system recommends creating SYSTEMD service startup
View/lib/systemd/system/svnserve.service configuration information
Vi/etc/sysconfig/svnserve
Options= "-R/VAR/SVN" modified to options= "-R/USR/LOCAL/SVN--listen-port 3686"
Systemctl Enable Svnserve.service
Restart the server to check the SVN process
Ps-ef|grep Svnserve
Linux under SVN installation deployment