Skip to content

Instantly share code, notes, and snippets.

@pasora
Last active October 28, 2016 00:06
Show Gist options
  • Save pasora/7d87ce747e0910767123e50f5c77bd9f to your computer and use it in GitHub Desktop.
Save pasora/7d87ce747e0910767123e50f5c77bd9f to your computer and use it in GitHub Desktop.
単なるメモ

raspi-config

System

  • Expand Filesystem
  • Change Password
  • Change Hostname
  • Disable Auto Login
  • Disable Underscan

Localisation

  • Set Locale

    • Language: ja(Japanese)
    • Country: JP(Japan)
    • Character Set: UTF-8
  • Set Timezone

    • Area: Japan
  • Set Keyboard

  • Set WiFi Country

    • Country: JP Japan
  • sudo reboot

User configuration

  • sudo passwd root
  • sudo adduser pasora
  • sudo gpasswd -a pasora sudo

Logout and login as pasora raspi-config

  • disable functions except SSH in インターフェイス

  • re-configure keyboard in ローカライゼーション

  • sudo reboot

  • sudo gpasswd -d pi sudo

Update

  • sudo apt-get update
  • sudo apt-get upgrade
  • sudo rm /etc/sudoers.d/010_pi-nopasswd

SSH settings

  • ssh-keygen
  • insert ~/.ssh/id_rsa.pub from local machine to ~/.ssh/authorized_keys
  • sudo vi /etc/ssh/sshd_config
    28  PermitRootLogin no
    33  AuthorizedKeysFile  $h/.ssh/authorized_keys
    52  PasswordAuthentication no
    

Vim settings

  • sudo apt-get install vim
  • git clone [email protected]:pasora/dotfiles.git
  • cd dotfiles
  • chmod u+x setup_vim.sh
  • ./setup_vim.sh
  • delete dotfiles

Send IP address to LINE Notify

  • sudo raspi-config
    • Boot Options -> enable Wait for Network at Boot
  • sudo vim /etc/rc.local
curl -X POST -H 'Authorization: Bearer [your_access_token]' -F "message=${ip}" https://notify-api.line.me/api/notify > /dev/null 2>&1

Clone SD card

Change Hostname

  • sudo vim /etc/hosts
    • change hostname labeled 127.0.1.1
  • sudo vim /etc/hostname
    • change hostname
  • sudo /etc/init.d/hostname.sh
  • sudo reboot
  • ssh-keygen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment