GoalSet up headless RPi, Wifi with static IP.
- Windows 10 64bit
- Raspberry Pi 1A, 1B, 3B, Zero
- External monitor, powered USB hub, wifi dongle, keyboard/mouse.
- RPi OS; Raspibian Jessie Lite
Although I will be using RPi headless, the easiest way to set up is hook up external monitor, powered USB hub, connect keyboard mouse + wifi module. I tried different headless set up, but they all were too inconvenient, especially with RPi models with only one USB port.
Install/Setup Raspberry Pi on SD
- Raspberry Pi OS download: https://www.raspberrypi.org/downloads/
- I got the easy one, Raspbian Jessie Lite, https://www.raspberrypi.org/downloads/raspbian/
- Use Win32 Disk Image to write the OS onto SD card https://sourceforge.net/projects/win32diskimager/
Setting up RPi
- Insert the SD card and boot it up.
- Log in: ID=pi, password= raspberry
- Do NOT change the password yet!
- interfacing option
- adavnced options: memory split - 16 is the minimum. Any lower number will set it to default value.
- localisation (select appropriate selections for your location)
- Change Locale: uncheck everything, and check en_US.UTF-8
- Change Timezone: America > New_York
- Change wi-fi Country Set... : select US
- change to: XKBLAYOUT="us"
- This step is the last, because if you use special characters in password, the keyboard works properly after localization/keyboard layout change.
Setting up wifi
$ sudo vi /etc/wpa_supplicant/wpa_supplicant.conf
and edit as follow -- change BOLD strings for your wifi:
ssid="## YOUR SSID ##"
psk="## YOUR WIFI PASSWORD ##"
$ sudo vi /etc/network/interfaces
and set up as below -- chage BOLD strings to your needs:
iface lo inet loopback
iface eth0 inet static
iface wlan0 inet static
iface wlan1 inet manual
Don't forget to disable DHCPCD:
$ sudo systemctl disable dhcpcd
Reboot and check your static IP
$ sudo reboot
...after reboot and check...
$ ip addr
Update and Install Software
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo reboot
$ sudo apt-get install mc tree screen python figlet dnsutils python-setuptools python-pip
Note: for web server, I prefer Apache for normal servers H/W, but for RPi, it's better to use Nginx as its memory usage is a lot lower.