사용자 도구

사이트 도구


project:beginningraspberrypi

문서의 이전 판입니다!


라즈베리 파이 시작하기

라즈베리 파이에 관한 문서 조직을 시작합니다.

라즈베리 하드웨어

라즈베리 파이의 OS

라즈베리를 구동하기 위해서는 OS가 필요합니다. 공식 OS인 라즈비언(Raspbian)이 사용자 수도 많고, 제한된 CPU 성능에도 적합한 OS입니다. 벌써 2회나 젠투 설치를 시도했지만, 젠투는 그다지 잘 어울리는 OS가 아닌 것 같네요.

다운로드 및 설치

SD 카드를 PC에 연결하고, 이미지 그대로 복사하면 설치 끝.

# dd bs=4M if=<raspberry iso> of=/dev/sxx

BittorrentSync 설치로 데이터 동기화하기

클라이언트에서 일단 파일을 다운로드 받아 서버로 올린다고 생각합니다. 홈페이지에서 'Linux Arm' 용을 다운로드 받습니다. 이 파일을 서버로 파일을 복사합니다.

$ scp btsync_arm.tar.gz <username>@<server_host>:/home/<destination>

서버에 접속하고 압축을 풀어냅니다.합니다.

$ ssh <username>@<server_host>
$ cd ~/<where_btsync_tar_is>
$ mkdir btsync
$ tar xzvf btsync_arm.tar.gz -C ./btsync

btsync는 시스템에서 쓸 생각이므로, 이를 /usr/local/bin으로 옮기도록 하겠습니다.

sudo cp btsync/btsync /usr/local/bin

샘플 설정 파일을 덤프해서 파일로 만듭니다. 이 파일은 마치 JSON 같지만, C/C++ 스타일의 주석이 허용되는 조금 특이한 구조입니다.

$ btsync --dump-sample-config > ~/btsync.conf

다음은 위 명령을 바로 실행했을 때 나온 기본값 그대로인 설정 파일입니다.

{ 
  "device_name": "My Sync Device",
  "listening_port" : 0,                       // 0 - randomize port
  
/* storage_path dir contains auxilliary app files
   if no storage_path field: .sync dir created in the directory 
   where binary is located.
   otherwise user-defined directory will be used 
*/
  "storage_path" : "/home/user/.sync",

// uncomment next line if you want to set location of pid file
// "pid_file" : "/var/run/btsync/btsync.pid",

  "check_for_updates" : true, 
  "use_upnp" : true,                              // use UPnP for port mapping


/* limits in kB/s
   0 - no limit
*/
  "download_limit" : 0,                       
  "upload_limit" : 0, 

/* remove "listen" field to disable WebUI
   remove "login" and "password" fields to disable credentials check
*/
  "webui" :
  {
    "listen" : "0.0.0.0:8888",
    "login" : "admin",
    "password" : "password"
  }

/* !!! if you set shared folders in config file WebUI will be DISABLED !!!
   shared directories specified in config file
   override the folders previously added from WebUI.
*/
/*
  ,
  "shared_folders" :
  [
    {
//  use --generate-secret in command line to create new secret
      "secret" : "MY_SECRET_1",                   // * required field
      "dir" : "/home/user/bittorrent/sync_test", // * required field

//  use relay server when direct connection fails
      "use_relay_server" : true,
      "use_tracker" : true, 
      "use_dht" : false,
      "search_lan" : true,
//  enable sync trash to store files deleted on remote devices
      "use_sync_trash" : true,
//  specify hosts to attempt connection without additional search     
      "known_hosts" :
      [
        "192.168.1.2:44444"
      ]
    }
  ]
*/

// Advanced preferences can be added to config file.
// Info is available in BitTorrent Sync User Guide.

}
project/beginningraspberrypi.1373993892.txt.gz · 마지막으로 수정됨: 2014/10/09 21:23 (바깥 편집)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki