Raspberry Pi installation and common basic configuration

Contains the following basic configurations: wifi, ssh, vnc, teamviewer, vim, install source, etc.
1. Download mirror : If you want to use desktop services (for example, VNC, teamviewer, etc.), it is recommended to download a system with desktop services.
https://www.raspberrypi.org/downloads/raspbian
https://downloads.raspberrypi.org/raspbian_latest Win32 DiskImager for desktop
, a tool to write images to SD card:
https://sourceforge.net/projects /win32diskimager/
Extract the img image file, click Write, and write to the system. formatted as F32

2. The WIFI network settings
will be read by the computer after flashing the SD card of the Raspbian system. Create a new wpa_supplicant.conf file in the boot partition, that is, the /boot directory of the Raspberry Pi, fill in the content according to the following reference format and save the wpa_supplicant.conf file.
country=CN
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1 #If
your WiFi uses WPA/WPA2 encryption
network={
ssid="your wireless network name (ssid)"
key_mgmt=WPA-PSK
psk ="your wifi password"
}

3. Open the SSH service and
also create a new file in the boot partition, just leave it blank and name the file ssh. Be careful to lowercase and do not have any extensions. The Raspberry Pi will automatically enable the ssh service after detecting this file after booting. Then you can find the IP address of the Raspberry Pi by logging in to the router and connect to the Raspberry Pi through ssh.

Raspberry Pi default account: pi; default password: raspberry
uses the pi account to log in to the command line, execute the command: [sudo passwd root] to set the root user password, and then execute [sudo passwd --unlock root] to open the root account, and use [su root] Whether the test takes effect! Re-lock the root account executable command: sudo passwd --lock root

4. The vi editor that comes with the Raspberry Pi update vim
system is very pitted, you need to uninstall the previous vi, and then reinstall
sudo apt-get remove vim-common; sudo apt-get install vim
change the configuration of vi (personal preference)
Edit /etc/vim/vimrc file, add the following at the end
set nu #Display line number
syntax on #Syntax highlight
set tabstop=4#tab back four spaces

5. Modify the default source
backup /etc/apt/sources.list file, edit /etc/apt/sources.list, delete the previous content, and add the following source (Tsinghua University source)
deb http://mirrors.tuna.tsinghua.edu .cn/raspbian/raspbian/ jessie main non-free contrib
deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ jessie main non-free contrib
save and exit, sudo apt-get update && apt -get upgrade -y

6. Open VNC
raspi-config and
select 5 Interfacing Options -> P3 VNC
to adjust the resolution, and select 7 Advanced Options -> A5 Resolution
Raspberry Pi installation and common basic configuration

7. Install teamviewer
Install teamviewer This is to copy
a, download
wget http://download.teamviewer.com/download/linux/version_11x/teamviewer-host_armhf.deb
sudo dpkg -i teamviewer-host_armhf.deb
sudo apt-get -f install
b. Install GDebi to solve dependency problems
sudo apt-get install gdebi
c. Install Teamviewer
sudo gdebi teamviewer-host_armhf.deb
d. Command line terminal environment
teamviewer info
sudo teamviewer passwd [your password] #Start
service
sudo teamviewer --daemon start
sudo teamviewer --daemon enable
sudo reboot
When installing teamviewer to step c, you can also use vnc to log in to the Raspberry Pi to set the following passwords.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324525110&siteId=291194637