Cov txheej txheem:

Raspberry Pi Headless Setup: 7 Kauj Ruam
Raspberry Pi Headless Setup: 7 Kauj Ruam

Video: Raspberry Pi Headless Setup: 7 Kauj Ruam

Video: Raspberry Pi Headless Setup: 7 Kauj Ruam
Video: Headless Raspberry Pi Setup (New Simpler/Easier Method) - Without Monitor, Keyboard/Mouse 2024, Hlis ntuj nqeg
Anonim
Raspberry Pi Headless Teeb
Raspberry Pi Headless Teeb

Koj yuav kawm paub yuav ua li cas txhawm rau nkag mus rau Raspberry Pi rau ntawm ssh yam tsis txuas lub keyboard, nas thiab saib xyuas rau nws, hauv qhov hu ua Headless mode.

Khoom siv

Ua ntej khau raj koj li Raspberry Pi 4 Model B koj xav tau cov khoom hauv qab no.

  • Lub laptop lossis PC ib leeg
  • Ib daim npav micro-SD (yam tsawg kawg 16GB)
  • Ethernet cable
  • Lub hwj chim sib xws - koj tseem tuaj yeem siv 5V 2.5A USB khoom.
  • MicroSD Card ReaderCase (yeem)

Kauj ruam 1: Rub tawm Raspbian Duab

Rub tawm Raspbian duab cov ntaub ntawv los ntawm raspberrypi.org.

Kauj Ruam 2: Sau Duab rau MicroSD Card Siv Etcher

Sau Duab rau MicroSD Card Siv Etcher
Sau Duab rau MicroSD Card Siv Etcher

Txhawm rau hlawv cov duab rau SD daim npav koj tuaj yeem siv Etcher. Etcher yog daim ntawv thov hla lub desktop, thiab ua haujlwm ntawm Windows, Mac OS X, thiab Linux ib yam nkaus, thiab nws tiv thaiv koj los ntawm kev rov sau dua qhov system disk ntawm koj lub computer.

  1. Rub tawm qhov tsim nyog version ntawm Etcher raws li koj OS.
  2. Ntxig microSD siv Card Reader rau hauv koj lub computer.
  3. Khiav Etcher koj tau rub tawm.
  4. Nyem rau daim npav MicroSD nrog daim duab siv Etcher los ntawm kev xaiv rub tawm cov ntawv zip ua qhov chaw.
  5. Cov duab sau rau koj daim npav yuav raug txheeb xyuas tom qab.

Kauj ruam 3: Pab kom SSH

SSH yog neeg xiam oob khab vim yog kev nyab xeeb. Txhawm rau ua kom nws koj yuav tsum tso cov ntaub ntawv khoob hu ua ssh hauv lub hauv paus ntawm khau raj disk.

Rau MacOS thiab Linux: Qhib davhlau ya nyob twg los ntawm kev mus rau Cov Ntawv Thov> Khoom Siv> Terminal thiab khiav cov lus txib hauv qab no:

kov/Tagnrho/khau raj/ssh

Rau Windows: Tsim cov ntaub ntawv npe ssh, yam tsis muaj kev txuas ntxiv, ntawm lub khau raj muab faib ntawm SD daim npav.

Kauj Ruam 4: Teeb Kom Wireless Networking

  • Koj lub Windows lossis Mac tshuab yuav tsum nyob ntawm tib lub network WiFi uas koj tau teeb tsa Raspberry Pi txhawm rau txiav txim siab Raspberry PI's IP Address.
  • Tsim cov ntaub ntawv hauv lub hauv paus ntawm khau raj disk hu ua wpa_supplicant.conf thiab tom qab ntawv muab cov cai hauv qab no tso rau hauv nws:

teb chaws = us

update_config = 1 ctrl_interface =/var/run/wpa_supplicant network = {ssid = "koj lub npe Wifi" psk = "password"}

Kho nws los ntawm kev nkag mus rau koj tus lej SSID tiag tiag thiab tus lej zais ntawm koj lub tsev Wifi network.

Rau MacOS thiab Linux:

Qhib davhlau ya nyob twg thiab khiav cov lus txib hauv qab no:

kov /Volumes/boot/wpa_supplicant.conf

Kho cov ntawv uas koj nyuam qhuav tsim los siv cov ntawv sau thiab muab cov ntawv sau rau saum toj no rau hauv

Rau Windows:

  • Tsim cov ntaub ntawv wpa_supplicant.conf thiab khaws nws.
  • Tshem daim npav SD thiab tom qab ntawd ntxig rau hauv koj li Raspberry Pi
  • Fais fab nws.

Kauj Ruam 5: Nrhiav Koj Tus Raspberry PI's IP Address

Nrhiav Koj Tus Raspberry PI Tus IP Chaw Nyob
Nrhiav Koj Tus Raspberry PI Tus IP Chaw Nyob
  • Raspberry PI's IP chaw nyob tuaj yeem pom los ntawm kev teeb tsa lub vev xaib sib txuas ntawm koj lub router hauv ntu DHCP cov lus cog lus faib khoom faib.
  • Hauv koj lub khoos phis tawj koj tuaj yeem siv cov khoom siv zoo li Advanced IP scanner (Windows) lossis IP Scaner (MacOS).
  • Hauv koj lub xov tooj Android lossis iOS koj tuaj yeem siv Fing cov cuab yeej siv uas tuaj yeem txheeb xyuas Raspberry Pi IP chaw nyob Kuv tau siv IP Scaner (MacOS) cov cuab yeej los txiav txim siab kuv Raspberry Pi ip chaw nyob.

Kuv siv IP Scaner (MacOS) cov khoom siv los txiav txim siab kuv Raspberry Pi ip chaw nyob.

Kauj Ruam 6: SSH Rau Koj Tus Pi

Txuas koj lub ethernet cable rau koj lub khoos phis tawj thiab rau Raspberry Pi.

Cov ntaub ntawv pov thawj tsis raug rau SSH kev sib txuas yog:

username: pib

lo lus zais: raspberry

Rau MacOS thiab Linux:

Qhib davhlau ya nyob twg thiab ntaus hauv qab cov lus txib:

ssh pi@koj_ip_address

Rau Windows:

  • Rub tawm PuTTY los ntawm no - pub dawb SSH thiab telnet tus thov rau Windows
  • Tua tawm PuTTY
  • Txheeb xyuas lub xov tooj cua SSH khawm nrog tus lej chaw nres nkoj 22.
  • Ntaus tus IP chaw nyob ntawm koj li Raspberry PI rau hauv Host Name lub npe teb
  • Nyem qhib khawm
  • Thaum koj txuas los ntawm SSH thawj zaug, koj yuav raug ceeb toom kom lees paub RSA tus ntiv tes tseem ceeb

Qhov tseeb ntawm tus tswv 'Your_ip_adress (Your_ip_adress)' tsis tuaj yeem tsim tsa.

ECDSA tus ntiv tes tseem ceeb yog SHA256: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.

Koj puas paub tseeb tias koj xav txuas txuas ntxiv (yog/tsis)?

  • Ntaus yog mus txuas ntxiv.
  • Thaum koj tau nkag mus rau hauv koj li Raspberry Pi koj yuav tau txais tos nrog cov lus zoo ib yam li hauv qab no.

Linux raspberrypi 4.19.75-v7l+ #1270 SMP Tue Sep 24 18:51:41 BST 2019 armv7l

Cov phiaj xwm suav nrog Debian GNU/Linux system yog software dawb;

cov ntsiab lus faib khoom meej rau txhua qhov haujlwm tau piav qhia hauv cov ntaub ntawv ib leeg hauv /usr/share/doc/*/copyright. Debian GNU/Linux los nrog ABSOLUTELY NO WARRANTY, raws li tau pom zoo los ntawm txoj cai lij choj.: 17 2019 SSH tau qhib thiab tus password tsis raug rau tus neeg siv 'pi' tsis tau hloov pauv Qhov no yog kev pheej hmoo nyab xeeb - thov nkag mus ua tus 'pi' tus neeg siv thiab ntaus 'passwd' los teeb tus password tshiab.

Kauj Ruam 7: Tau Txais Qhov Hloov Kho Tshiab

Thaum kawg, koj tau txais qhov hloov tshiab kawg rau Pi li yooj yim li ntaus ntawv:

sudo apt -tau hloov tshiab -y

sudo apt -tau hloov tshiab -y

Thaum ua tiav, koj tuaj yeem rov pib dua koj li Raspberry Pi los ntawm kev ntaus cov lus txib hauv qab no.

sudo rov pib dua

Tam sim no koj muaj kev teeb tsa tag nrho Raspberry Pi khiav Raspbian.

Koj tuaj yeem khiav raspi-teeb tsa txhua lub sijhawm koj nyiam, yog tias koj pom tias muaj qee qhov chaw uas koj xav tau hloov pauv.

Kuv vam tias koj pom phau ntawv qhia no muaj txiaj ntsig thiab ua tsaug rau kev nyeem. Yog tias koj muaj lus nug lossis tswv yim? Tawm lus tawm hauv qab no. Nyob twj ywm!

Pom zoo: