`Although it is an article on Mac environment, the procedure is the same for Windows environment. Please read and try the environment-dependent part. ``
After reading this article to the end, you will be able to:
No. | Overview | keyword |
---|---|---|
1 | OS installation | Raspberry Pi OS |
2 | Wi-Fi stealth SSID setting | |
3 | Fixed IP address setting | |
4 | SSH connection | |
5 | VNC connection | |
6 | Python environment installation | pyenv |
environment | Ver. |
---|---|
macOS Catalina | 10.15.6 |
Raspberry Pi OS (Raspbian) | 10 |
Raspberry Pi Imager | 1.4 |
pyenv | 1.2.20 |
Python | 3.7.3 |
command.sh
~% diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
...
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
...
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *31.9 GB disk2
1: Windows_FAT_32 boot 268.4 MB disk2s1
2: Linux 31.6 GB disk2s2
command.sh
~% diskutil eraseDisk FAT32 RPI /dev/disk2
command.sh
~% brew cask install raspberry-pi-imager
command.sh
~$ wpa_passphrase {ssid} {password}
network={
ssid="{ssid}"
#psk="{password}"
psk={psk}
}
command.sh
~$ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
command.sh
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=JP
+ network={
+ ssid="{ssid}"
+ scan_ssid=1
+ psk={psk}
+ }
command.sh
^O
^X
command.sh
~$ sudo reboot
command.sh
~% netstat -rn
Routing tables
Internet:
Destination Gateway Flags Netif Expire
default {default gateway} UGSc en0
...
command.sh
~% cat /etc/resolv.conf
nameserver {primary dns}
nameserver {secondary dns}
command.sh
~$ sudo nano /etc/dhcpcd.conf
command.sh
# fallback to static profile on eth0
#interface eth0
#fallback static_eth0
+ interface wlan0
+ static ip_address={ip address}/24
+ static routers={default gateway}
+ static domain_name_servers={primary dns}
+ static domain_search=
command.sh
^O
^X
command.sh
~$ sudo reboot
command.sh
~$ sudo touch /boot/ssh
command.sh
~% ssh-keygen -R {ip address}
~% ssh-keygen -R raspberrypi.local
command.sh
~% ssh pi@{ip address}
command.sh
~% ssh [email protected]
command.sh
~$ sudo apt-get update
~$ sudo apt-get upgrade
~$ sudo apt-get install tightvncserver
command.sh
~$ tightvncserver
vnc: // {ip address}: 5901
or vnc: //raspberrypi.local: 5901
Input> Connectcommand.sh
~$ sudo apt update
~$ sudo apt upgrade
~$ sudo apt install -y git openssl libssl-dev libbz2-dev libreadline-dev libsqlite3-dev libffi-dev
command.sh
~$ git clone https://github.com/pyenv/pyenv.git ~/.pyenv
~$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
~$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
~$ echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bash_profile
~$ source ~/.bash_profile
command.sh
~$ pyenv install -l
command.sh
~$ pyenv install {version}
command.sh
~$ pyenv global {version}
Recommended Posts