Skip to content

Instantly share code, notes, and snippets.

@MSakamaki
Last active August 29, 2015 14:23
Show Gist options
  • Save MSakamaki/61d54f4d4c1e5c46de7d to your computer and use it in GitHub Desktop.
Save MSakamaki/61d54f4d4c1e5c46de7d to your computer and use it in GitHub Desktop.
Raspberri Pi

しりある

ラズパイのインストール

# ディスク確認
diskutil list
# アンマウント
sudo diskutil unmountDisk /dev/disk1
# パイ焼き
sudo dd bs=1m if=/Users/msakamaki/RaspberriPi/2015-05-05-raspbian-wheezy.img of=/dev/disk1

メモ

# シリアルポート接続
screen /dev/tty.usbserial 115200

screen /dev/tty.PL2303-00002014 115200


# 再起動
sudo reboot

はじめに

#default user:pi、passwd:raspberry

sudo passwd root

# お好み
sudo apt-get install vim

wifi

lsusb

# アクセスポイントスキャン
sudo iwlist wlan0 scan | grep ESSID

# wpa_passphrase Your_SSID Your_Passphrase
wpa_passphrase [ssid] [password]  >> /etc/wpa_supplicant/wpa_supplicant.conf


sudo vi /etc/wpa_supplicant/wpa_supplicant.conf
sudo vi /etc/network/interfaces
#----
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
#----


# or /etc/init.d/networking restart
sudo ifdown eth0
sudo ifup eth0

# 確認
iwconfig wlan0 | grep ESSID

ping google.co.jp

iwconfig

disk

sudo fdisk /dev/mmcblk0

Command (m for help): p
Device Boot Start End Blocks Id System
/dev/mmcblk0p1 8192 122879 57344 c W95 FAT32 (LBA)
/dev/mmcblk0p2 122880 XXXXXXX XXXXXXX 83 Linux
Command (m for help): d #d(delete)
Partition number (1-4): 2 #2を削除
Partition 2 is deleted
Command (m for help): n #n(new?)
Partition type:
p primary (1 primary, 0 extended, 3 free)
e extended
Select (default p): p
Partition number (1-4, default 2): 2
First sector (2048-xxxxxxx, default 2048): 122880 
Last sector, +sectors or +size{K,M,G} (8192-xxxxxxx, default xxxxxxx): hoge
Using default value 10485760
Command (m for help): p
Device Boot Start End Blocks Id System
/dev/mmcblk0p1 8192 122879 57344 c W95 FAT32 (LBA)
/dev/mmcblk0p2 122880 21094399 10485760 83 Linux
Command (m for help): w #w(write)
$ sudo reboot
#--->

df -h
sudo resize2fs /dev/sda2
resize2fs 1.42.5 (29-Jul-2012)
Filesystem at /dev/sda2 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
The filesystem on /dev/sda2 is now 969984 blocks long.



curl -L git.io/nodebrew | perl - setup


vim ~/.bashrc
# export PATH=$HOME/.nodebrew/current/bin:$PATH
source ~/.bashrc

nodebrew  install-binary v0.11.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment