기본 콘텐츠로 건너뛰기

라즈베리파이 네트워크 폴더 엑세스 sshfs 이용


sshfs 를 이용해 다른 리눅스에 엑세스 가능하다 결국 네트워크폴더 처럼 이용할 수 있다.
이말은 nas의 영화를 바로 읽어와 시청 가능하다는 뜻..

설치
sudo apt-get install sshfs


접속(마운트)
sshfs userid@192.168.0.2:/home/userid /home/myfolder/ -o allow_other,reconnect,ServerAliveInterval=15,ServerAliveCountMax=3

userid@192.168.0.2 userid 는 ssh 접속시 사용하는 id 이고 뒤에는 접속 주소 이다.


/home/userid 는 접속할 홈폴더
/home/myfolder/ 는 마운트할 폴더

-o 옵션

reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 15초마다 연결 확인 및 연결 안될땐 3번 재연결


참고로

이러한 방법으로 접속하면 패스워드를 물어오기 때문에 클라이언트에서 키를 생성해 서버에 넘겨 주어 자동으로 로그인 할 수 있도록 해야한다.

cd~
cd .ssh
ssh-keygen -t rsa //키생성
ssh-copy-id -i ~/.ssh/id_rsa.pub userid@192.168.0.2

이렇게 키를 넘겨주면 클라이언트(라즈베리파이)는 앞으로 서버(nas)에 자동으로 접속이 가능해진다.

iptime nas도 ssh접속이 풀려 있으니 위의 방법대로 하면 언제나 신선한(?) 영화를 자유롭게 시청 할 수 있다 ㅎㅎ

torrent를 이용하건 다른 방법을 이용하건 그건 개인의 자유이고 개인의 책임이다.

어찌 되었건 나는 아주 편안하게 잘 작동하고 안정적이다.

아.. 가끔 라즈베리파이의 wifi가 끊기는 일이 벌어지지만 crontab 에 적당한 코드를 집어넣어 와이파이가 끊어질 경우 재 연결 해라~ 등의 스크립트로 해결 가능하다.

댓글

이 블로그의 인기 게시물

MTConnect 로 fanuc 의 facus 이용하기

참으로.. 국내 자료는 거의 없다.. 삽질에 삽질에 살집에... 거의 2주 넘게 삽질의 연속.. 먼저 1. cnc 에 facas 설정 2. cnc에 컴퓨터 하나 lan으로 연결해주고 mtconnect adapter 설치 3. 서버용으로 컴터 하나 맞춘후 mtconnect agent 설치 대략 30대 adapter 동시에 돌려보니 서버(agent)에 cpu 사용률 2% 안쪽.. 자세한 정보는 담지 않았지만 나중에 시간되면 자세하게 다루자.. 지원 가능 모델 0i, 32i, 21i 등등.. 거의 모든 i모델은 다되는듯.. cnc, mct 등..

라즈베리파이 키오스크 모드(Kiosk mode)

부팅시 화면 회전 sudo vi /boot/config.txt add display_rotate=3 ( 이와 같이 작성하면 화면이 시계 방향으로 90도 회전 ) 터치스크린까지 바꿀려면.. add lcd_rotate=3 disable_overscan=1 overscan_left=-150 overscan_right=-150 부팅 로그 감추기 sudo vi /boot/cmdline.txt 부팅 이미지 표시하기 sudo apt-get install fbi vi asplashscreen 아래 do_start 부분에서 이미지 경로를 원하는 이미지로 변경한다. #! /bin/sh ### BEGIN INIT INFO # Provides:          asplashscreen # Required-Start: # Required-Stop: # Should-Start:      # Default-Start:     S # Default-Stop: # Short-Description: Show custom splashscreen # Description:       Show custom splashscreen ### END INIT INFO do_start () {     /usr/bin/fbi -T 1 -noverbose -a /etc/sample.png        exit 0 } case "$1" in   start|"")     do_start     ;;   restart|reload|force-reload)     echo "Error: argument '$1' not supported" >&2     exit 3     ;;   stop)     # No-op     ;;   status)     exit 0     ;;   *)     echo "Usage: asplashscreen [sta

라즈베리파이 조금더 쾌적한 트랜스코딩방법..

- ffmpeg 다운로드 $ git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg $ cd ffmpeg $ mkdir dependencies $ cd dependencies/ $ mkdir output - ffmpeg 컴파일 $ git clone http://git.videolan.org/git/x264.git $ cd x264/ $ ./configure --enable-static --prefix=/home/pi/ffmpeg/dependencies/output/ $ make -j4 (컴파일 문제 혹은 코어4개 사용 안할땐 make -j) $ make install $ cd .. -  ALSA 다운로드 $ wget ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.1.1.tar.bz2 -  ALSA 컴파일 $ tar xjf alsa-lib-1.1.1.tar.bz2 $ cd alsa-lib-1.1.1/ $ ./configure --prefix=/home/pi/ffmpeg/dependencies/output $ make -j4 $ make install $ cd .. - FDK-AAC 다운로드 $ sudo apt-get install pkg-config autoconf automake libtool $ git clone https://github.com/mstorsjo/fdk-aac.git - FDK-AAC 컴파일 $ cd fdk-aac $ ./autogen.sh $ ./configure --enable-shared --enable-static $ make -j4 $ sudo make install $ sudo ldconfig $ cd .. - OMX_core.h 설치 sudo apt-get install libomxil-bellagio-dev - FFMPEG 컴파일 $ cd .. $ ./configure --pref