# [AMAZON EC2]安裝SVN到EC2上

- URL: https://justfly.idv.tw/amazon-ec2%e5%ae%89%e8%a3%9dsvn%e5%88%b0ec2%e4%b8%8a/
- 日期: 2011-08-31
- 分類: 瞎子摸OS
- 標籤: EC2, Linux, server, SVN, system

以前是有嘗試過[在MAC(10.6)上裝SVN SERVER](https://justfly.idv.tw/2010/09/21/Just_892.html)啦！

不過既然有EC2可以玩一下,試一下遠端備份也不錯吧？順便也是事不用透過Apache來存取SVN的方式：

- 安裝SVN:

```
sudo yum install svn
```

- 建立使用者：svn並設密碼

```
sudo /usr/sbin/useradd svn
sudo passwd svn
```

- 設完密碼後,變更身份

```
su svn
```

- 在根目錄建立svn專用repositories資料夾

```
cd
mkdir repositories
```

- 在repositories資料夾中建立專案

```
cd repositories
svnadmin create justproject
```

- 編輯專案設定檔svnserve.conf

```
vi justproject/conf/svnserve.conf
```

加入

```
auth-access = write
password-db = passwd
```

- 編輯專案設定檔svnserve.conf

```
vi justproject/conf/passwd
```

加入

```
justfly = justPassword
```

- 啟動svn

```
svnserve -d -r /home/svn/repositories
```
