티스토리 뷰

반응형

nfs 설정에 오기전에 거칠것, 생각보다 오래걸림...

1 라즈베리파이 한글화 참고

http://maker1st.tistory.com/4

http://www.rasplay.org/?p=3786

2 라즈베리파이 무선랜 잡을 때의 노력 

2-1 블로그보고 따라하기

2-2 무선공유기 펌웨어 업그레이드하기


패키지 설치

apt-get -y install nfs-common nfs-kernel-server protmap

서버가 될 pc에서 루트 아래 디렉토리 생성

# mkdir /(directory name)    <--- 이곳을 공유할것이다. 물론 이 경로 /(directory name)이 라즈베리 파이의 경로와 동일하지는 않다. 그러나 이 폴더가 공유되는것이다.

# vi /etc/exports

/nfsroot *(rw,sync,no_root_squash,no_all_squash)  //관련된 것은 검색을해보자 


# /etc/init.d/nfs-kernel-server start

# /etc/init.d/nfs-kernel-server status


아이피 고정시키는법

# vi /etc/network/interfaces

iface [enp0s8/wlan0] inet static   //enp0 ... wlan0 ... 드라이버에 따라서 다름...
   address [ipaddress]
   netmask 255.255.255.0
   gateway 192.168.0.1


클라이언트에서 들어오는법 

우선 클라이언트(라즈베리파이)에서 nfs client 패키지 설치

# apt-get -y install nfs-client

# mount -t nfs -o nolock [서버아이피]:/[서버공유디렉토리] /mnt/[디렉토리이름]

# vi /etc/fstab 수정  앞의 아이피는 개발하는 아이피(서버 아이피) 를 적어줘야함.. 그니까 고정시켜주는게 좋다//...

x.x.x.x::/(directory name)     /mnt/nfsdir     nfs     defaults,nolock    0    0    


xinetd 서비스는 데몬을 요청이 들어왔을 때만 띄울수 있게 도와준다.
공유도 됐고 다됐다. 이제 tftp 서비스를 xinetd 와 연결하는것을 해보자 개발 pc에서 다음과같이 수행

# apt-get -y install xinetd tftp tftpd

# mkdir -m 777 /tftpboot

# cd /etc/xinetd.d

# cp discard tftp

# vi tftp

"
service tftp { 

  disable = no
  socket_type = dgram
  port = 69
  protocol = udp
  user = nobody
  wait = yes
  server = /usr/sbin/in.tftpd
  server_args = /tftpboot
}
"

# /etc/init.d/xinetd restart

그다음 로컬 자기 자신과 잘 되는지 확인해보자. 널널한 폴더로 이동한뒤 (tftp는 파일을 다운받을테니까 잘되는지 확인할 수 있는 널널한 폴더로 이동..)

# pwd
/tmp


# touch /tftpboot/testfile

# tftp localhost
tftp> get testfile
tftp> quit

# ls  // testfile을 잘 끌어왔으므로 성공적으로 수행

반응형

'IoT 과정' 카테고리의 다른 글

sudoku grabber in Opencv  (0) 2017.11.23
임베디드 관련 블로그  (0) 2017.09.08
LVM & RAID  (0) 2017.07.19
LOCAL STORAGE ADMINISTRATION // 로컬 디스크 관리  (0) 2017.07.19
SOFTWARE MAINTENANCE  (0) 2017.07.18