This step by step how-to will help you to install OS (Raspbian Jessie) on your Raspberry Pi, i have selected Raspbian Jessie for this purpose. this how-to also include Wi-Fi settings without connecting display to raspberry pi.
Installing Linux OS (Raspbian Jessie) on Raspberry Pi
Easiest cross-platform way to install Linux on your Raspberry Pi is using the NOOBS installer, but we are installing Raspbian using diskimager utility.
Go to the Raspberry Pi download page
Download the Raspbian zip file.
Download the Win32DiskImager utility from the Sourceforge.
Run Win32DiskImager as administrator.
Select the image file you downloaded earlier. Select the drive letter of the SD card in the device box. “Select the correct drive; if you get the wrong drive you can destroy the data on your computer.”
Click Write and wait for the process to complete. Exit the imager and eject the SD card.
WiFi Connection Settings
Setup Wi-Fi connection without connecting any display to raspberry pi, just simply create a text file and call it wpa_supplicant.conf and place into the /boot/ folder and add following contents to this file.
Wifi Settings for Raspbian Jessie
1 2 3 4 5 |
network={ ssid="MyWifi" psk="Qdhdhd123654" key_mgmt=WPA-PSK } |
WiFi Settings for Raspbian Stretch
Make sure you change country code to yours (Thanks to @Clumpton for sharing this)
1 2 3 4 5 6 7 8 9 |
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 country=US network={ ssid="MyWifi" psk="Qdhdhd123654" key_mgmt=WPA-PSK } |
Enable SSH
SSH is disabled by default you need to enable it work with Raspberry pi without monitor, keyboard and mouse connected all the time, simply create text file and call it ssh and place it in /boot/ on SD card (please make sure file extension isn’t txt).
Put the SD card in your Raspberry Pi and boot it.
The default login credentials for the image are username pi and password raspberry. We’ll can change the password in the next step.
Configuring your System
If you have an Ethernet cable connected or your Wi-Fi settings were correct you can SSH into the Pi to begin your configuration. By default the Ethernet port is set to dynamic IP address using DHCP.
It is highly recommended to change default password for pi user, to do so you need to issue following command
1 |
passwd |
While we are at users we need to set password for root and allow root login via ssh, lets change root password by issuing following command
1 |
sudo passwd root |
Enable root login via remote ssh issue following command and make following changes
1 2 3 4 5 6 |
sudo nano /etc/ssh/sshd_config #Authentication: LoginGraceTime 120 #PermitRootLogin without-password PermitRootLogin yes StrictModes yes |
Now press CTRL + O and hit return to save changes. Now press CTRL + X to exit.
Now restrat ssh service or you can reboot the pi with reboot command.
1 |
sudo reboot |
After reboot try to ssh to raspberry pi using root credentials.
11 comments
Hi, love your project.
Please note that with Raspbian Stretch the wpa_supplicant.conf file needs a few extra lines for wi-fi to work.
It should now look like:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US
network={
ssid=”Your network name/SSID”
psk=”Your WPA/WPA2 security key”
key_mgmt=WPA-PSK
}
Obviously you need to put in your own 2-letter country code if not in the US.
@Clumpton thank you for comments, i have updated the post.
Admin
Great guide, thanks!.
The only thing I have not been able to set up is the wlan in static, my proyect does not need wifi but cable, what would I have to edit? I have replace the wlan0 by eth0 but does not make it static.
Thanks again.
what is the default user and password of phpMyAdmin?
what ever you decide when you install phpmyadmin