// install svn

[root@wode002 data1]# yum install subversion

已加载插件:fastestmirror, langpacks

Repository base is listed more than once in the configuration

Repository updates is listed more than once in the configuration

Repository extras is listed more than once in the configuration

Repository centosplus is listed more than once in the configuration

Repository contrib is listed more than once in the configuration

Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast

base                                                     | 3.6 kB     00:00     

extras                                                   | 3.4 kB     00:00     

updates                                                  | 3.4 kB     00:00     

(1/2): extras/7/x86_64/primary_db 


// svnadmin create

[root@wode002 svn]# svnadmin create /mnt/data1/svn/stockemotion

[root@wode002 svn]# ls

stockemotion

[root@wode002 svn]#


// svn import

[root@wode002 20150817]# svn import code file:///mnt/data1/svn/stockemotion -m "imported from 179"

正在增加       code/bootstrap

正在增加       code/bootstrap/cache

正在增加       code/bootstrap/cache/.gitignore

正在增加       code/bootstrap/app.php

正在增加       code/bootstrap/autoload.php

正在增加       code/public

正在增加       code/public/.htaccess

正在增加       code/public/index.php

正在增加       code/public/favicon.ico

正在增加       code/public/robots.txt

正在增加       code/public/libs

正在增加       code/public/libs/select2

正在增加 (二进制) code/public/libs/select2/select2-spinner.gif

正在增加       code/public/libs/select2/select2-bootstrap.css

正在增加 (二进制) code/public/libs/select2/select2.png

正在增加       code/public/libs/select2/select2.css

正在增加       code/public/libs/select2/select2_locale_zh-CN.js

正在增加       code/public/libs/select2/select2.js


// ls svn

[root@wode002 svn]# cd stockemotion/

[root@wode002 stockemotion]# ls

conf  db  format  hooks  locks  README.txt

[root@wode002 stockemotion]# cat README.txt 

This is a Subversion repository; use the 'svnadmin' tool to examine

it.  Do not add, delete, or modify files here unless you know how

to avoid corrupting the repository.


Visit http://subversion.apache.org/ for more information.

[root@wode002 stockemotion]#


// 修改配置

[root@wode002 stockemotion]# ls

conf  db  format  hooks  locks  README.txt

[root@wode002 stockemotion]# cd conf

[root@wode002 conf]# ls

authz  passwd  svnserve.conf

[root@wode002 conf]# vi passwd

[root@wode002 conf]# vi authz 

[root@wode002 conf]# vi svnserve.conf 

[root@wode002 conf]# 


anon-access = none

auth-access = write

password-db = /mnt/data1/svn/stockemotion/conf/passwd

authz-db = /mnt/data1/svn/stockemotion/conf/authz


// 启动 svnserve 服务

[root@wode002 data1]# svnserve -d -r /mnt/data1/svn

[root@wode002 data1]# ps -ef | grep svn

root     17024     1  0 23:10 ?        00:00:00 svnserve -d -r /mnt/data1/svn

root     17040 29241  0 23:10 pts/0    00:00:00 grep --color=auto svn

[root@wode002 data1]#


// checkout

[root@wode002 20150817]# svn co svn://192.168.1.124/st


认证领域: <svn://192.168.1.124:3690>

svn: E170001: 认证失败


[root@wode002 123]# svn co svn://118.244.212.177/stockemotion

认证领域: <svn://118.244.212.177:3690> c080b2f4-24ce-4619-9118-f35b5a15b4b5

“root”的密码: 

认证领域: <svn://118.244.212.177:3690> c080b2f4-24ce-4619-9118-f35b5a15b4b5

用户名: huangchao

“huangchao”的密码: 


-----------------------------------------------------------------------

注意!  你的密码,对于认证域:


   <svn://118.244.212.177:3690> c080b2f4-24ce-4619-9118-f35b5a15b4b5


只能明文保存在磁盘上!  如果可能的话,请考虑配置你的系统,让 Subversion

可以保存加密后的密码。请参阅文档以获得详细信息。


你可以通过在“/root/.subversion/servers”中设置选项“store-plaintext-passwords”为“yes”或“no”,

来避免再次出现此警告。

-----------------------------------------------------------------------

保存未加密的密码(yes/no)?no


// 移动目录

HuangChao-MacBookPro:stockemotion hchao$ svn move bootstrap code/bootstrap

A         code/bootstrap

D         bootstrap

D         bootstrap/app.php

D         bootstrap/autoload.php

D         bootstrap/cache

D         bootstrap/cache/.gitignore

HuangChao-MacBookPro:stockemotion hchao$ 


HuangChao-MacBookPro:stockemotion hchao$ svn commit -m "move boostrap into code" .

Deleting       bootstrap

Adding         code/bootstrap


Committed revision 4.

HuangChao-MacBookPro:stockemotion hchao$ 


// 可能出现的问题: CentOS 7 的防火墙 firewalld

[root@wode002 stockemotion]# systemctl status firewalld

firewalld.service - firewalld - dynamic firewall daemon

   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled)

   Active: active (running) since 三 2015-08-19 00:26:31 CST; 2s ago

 Main PID: 28529 (firewalld)

   CGroup: /system.slice/firewalld.service

           └─28529 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid


8月 19 00:26:32 wode002 firewalld[28529]: 2015-08-19 00:26:32 ERROR: COMMAN....

8月 19 00:26:32 wode002 firewalld[28529]: 2015-08-19 00:26:32 ERROR: COMMAN....

8月 19 00:26:32 wode002 firewalld[28529]: 2015-08-19 00:26:32 ERROR: COMMAN....

8月 19 00:26:32 wode002 firewalld[28529]: 2015-08-19 00:26:32 ERROR: COMMAN....

8月 19 00:26:32 wode002 firewalld[28529]: 2015-08-19 00:26:32 ERROR: COMMAN....

8月 19 00:26:32 wode002 firewalld[28529]: 2015-08-19 00:26:32 ERROR: COMMAN....

8月 19 00:26:32 wode002 firewalld[28529]: 2015-08-19 00:26:32 ERROR: COMMAN....

8月 19 00:26:32 wode002 firewalld[28529]: 2015-08-19 00:26:32 ERROR: COMMAN....

8月 19 00:26:32 wode002 firewalld[28529]: 2015-08-19 00:26:32 ERROR: COMMAN....

8月 19 00:26:32 wode002 firewalld[28529]: 2015-08-19 00:26:32 ERROR: COMMAN....

Hint: Some lines were ellipsized, use -l to show in full.

[root@wode002 stockemotion]# 


需要打开 3690端口

<svn://118.244.212.177:3690>