LoginSignup
20
21

More than 5 years have passed since last update.

Raspberry PIをNAS化する

Last updated at Posted at 2015-04-11
  • サーバーからパッケージ・リストを入手する
>$ sudo apt-get update
  • パッケージをアップグレードする
>$ sudo apt-get upgrade
  • ntfsフォーマットを扱えるようにする
>$ sudo apt-get install ntfs-3g
  • sambaをインストールする
>$ sudo apt-get install samba
  • USBポートを1.2Aに変更する
>$ sudo vim /boot/config.txt
  • config.txtの最後に下記を記入して保存する
config.txt
>safe_mode_gpio=4
>max_usb_current=1
  • 再起動をする
>$ sudo reboot
  • USBハードディスクを接続する

  • 接続ができているか確認する


>$ sudo fdisk -l
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          32  3907028991  1953514480    b  W95 FAT32
>pi@raspberrypi ~
  • マウントポイントを作成する
>$ sudo mkdir /mnt/usbhdd

※usbhdd部分は任意のものをつける

  • マウントをする
>$ sudo mount -t ntfs-3g /dev/sda1 /mnt/usbhdd
  • sambaの設定
>$ sudo vim /etc/samba/smb.conf
smb.conf
[RaspNAS]
comment=USBHDD
path=/mnt/usbhdd
public = Yes
read only = No
writable = Yes
guest ok = Yes
force user = pi
  • sambaの再起動
>$ sudo service samba restart
  • Windwosからの接続
¥¥IPアドレス
  • Macからの接続
>smb://IPアドレス
20
21
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
20
21