Cov txheej txheem:

Howto: Txhim Kho Raspberry PI 4 Headless (VNC) Nrog Rpi-imager thiab Duab: 7 Kauj Ruam (nrog Duab)
Howto: Txhim Kho Raspberry PI 4 Headless (VNC) Nrog Rpi-imager thiab Duab: 7 Kauj Ruam (nrog Duab)

Video: Howto: Txhim Kho Raspberry PI 4 Headless (VNC) Nrog Rpi-imager thiab Duab: 7 Kauj Ruam (nrog Duab)

Video: Howto: Txhim Kho Raspberry PI 4 Headless (VNC) Nrog Rpi-imager thiab Duab: 7 Kauj Ruam (nrog Duab)
Video: Raspberry Pi Headless Setup with Remote Desktop using VNC 2024, Hlis ntuj nqeg
Anonim
Howto: Txhim Kho Raspberry PI 4 Headless (VNC) Nrog Rpi-imager thiab Duab
Howto: Txhim Kho Raspberry PI 4 Headless (VNC) Nrog Rpi-imager thiab Duab
Howto: Txhim Kho Raspberry PI 4 Headless (VNC) Nrog Rpi-imager thiab Duab
Howto: Txhim Kho Raspberry PI 4 Headless (VNC) Nrog Rpi-imager thiab Duab

Kuv npaj yuav siv Rapsberry PI no hauv cov phiaj xwm lom zem rov qab rau hauv kuv qhov blog. Xav tias dawb los xyuas nws.

Kuv xav tau rov qab siv kuv Raspberry PI tab sis kuv tsis muaj Keyboard lossis Mouse ntawm kuv qhov chaw tshiab. Nws yog ib pliag txij li thaum kuv teeb tsa Raspberry PI yog li kuv xav hloov kho txoj hauv kev yooj yim tam sim no los ua nws thiab pom cov teeb meem kuv tuaj yeem hla txoj kev.

Qhov no koj yuav xav tau:

  • Raspbery PI.
  • MicroSD 32GB
  • MicroSD adapter (tej zaum xav tau los nyeem koj daim SD rau hauv koj lub laptop).
  • Lub zog ntsaws rau koj li Raspberry.

Peb teeb tsa Raspberry PI no nrog Raspberry PI OS, ntawm Lub taub hau hom nrog SSH thiab VNC nkag. Kuv npaj yuav siv qhov no rau Software Txhais Xov Tooj Cua tej haujlwm zoo li no, yog li kuv xav tau GUI uas yog qhov no Raspberry PI tau teeb tsa li cas.

Kauj ruam 1: Nruab RPI-Imager

Yav dhau los muaj lwm txoj hauv kev teeb tsa cov duab rau rapsberry pi, tab sis feem ntau ntawm lawv tsis yooj yim siv. Xyoo 2020 txoj hauv kev zoo tshaj yog siv rpi-imager

Yog tias koj siv linux, nruab nws nrog cov lus txib hauv qab no.

robert@robert-enreach: ~ $ sudo snap nruab rpi-imager

rpi-imager v1.4 los ntawm Alan Pope (popey) teeb tsa

Kauj Ruam 2: Nruab Duab ntawm MicroSD Nrog Rpi-imager

Nruab Duab ntawm MicroSD Nrog Rpi-imager
Nruab Duab ntawm MicroSD Nrog Rpi-imager
Nruab Duab ntawm MicroSD Nrog Rpi-imager
Nruab Duab ntawm MicroSD Nrog Rpi-imager
Nruab Duab ntawm MicroSD Nrog Rpi-imager
Nruab Duab ntawm MicroSD Nrog Rpi-imager

Khiav rpi-imager los ntawm kab hais kom ua. Koj yuav tau txais lub ntsej muag teeb tsa los xaiv qhov version ntawm OS koj xav teeb tsa hauv koj li raspberry pi, thiab xaiv daim npav microsd koj xav nruab rau.

robert@robert-nkag mus: ~ $ rpi-imager

Kauj Ruam 3: Rau Lub Hau Tsis Txhim Kho Ntxiv Ssh File

Rau Lub Taub Hau Teeb Ntxiv Ntxiv Ssh File
Rau Lub Taub Hau Teeb Ntxiv Ntxiv Ssh File

Hauv kuv qhov xwm txheej tshwj xeeb kuv nyuam qhuav muaj lub Laptop nyob hauv tsev thiab kuv tsis muaj lub Mouse, Keyboard lossis Screen Kuv tuaj yeem txuas rau Raspberry. Kuv yuav muaj peev xwm siv kuv lub TV tab sis qhov ntawd zoo li nyuaj heev. Kuv theej mus nrog Headless Installation.

Qhov no txhais tau tias koj yuav txuas rau Raspberry Pi los ntawm lub network, thiab siv SSH los pab rau VNC nkag mus rau Raspberry. Ntawm cov kho tshiab tsis ntev los no SSH los xiam oob khab yog li koj xav tau ntxiv SSH cov ntaub ntawv ntawm kev faib ua khau raj, raws li qhia hauv daim duab. Nco ntsoov ntxiv nws ntawm kev faib ua khau raj raws li koj yuav pom ob peb zaug thaum MicroSD txuas nrog koj li OS, Kuv tau muaj teeb meem nrog qhov no ob peb zaug.

Kauj Ruam 4: Txuas rau Network, Nrhiav Tus IP IP thiab teeb tsa DHCP Binding

Txuas mus rau Network, Nrhiav Tus IP IP thiab teeb tsa DHCP Kev Ruaj Ntseg
Txuas mus rau Network, Nrhiav Tus IP IP thiab teeb tsa DHCP Kev Ruaj Ntseg
Txuas mus rau Network, Nrhiav Tus IP IP thiab teeb tsa DHCP Kev Ruaj Ntseg
Txuas mus rau Network, Nrhiav Tus IP IP thiab teeb tsa DHCP Kev Ruaj Ntseg
Txuas mus rau Network, Nrhiav Tus IP IP thiab teeb tsa DHCP Kev Ruaj Ntseg
Txuas mus rau Network, Nrhiav Tus IP IP thiab teeb tsa DHCP Kev Ruaj Ntseg

Cov kauj ruam no yuav txawv ntawm cov duab vim tias koj yuav zoo li muaj Router sib txawv dua li kuv muaj. Hauv kuv qhov xwm txheej kuv muaj Draytek Router, uas muaj qee qhov zoo. Yeej koj yuav nyiam kom paub txog koj Lub Tsev Router thiab pom qee yam. Tej zaum koj yuav muaj qee thaj chaw rau ARP lossis DHCP ntawm koj li Router yog li koj tuaj yeem pom Kev Ruaj Ntseg tsim los ntawm Raspberry.

Raspberry Pi siv lub npe raspberry PI los ntawm lub hauv paus yog li koj tuaj yeem pom nws yooj yim. Hauv qhov no kuv teeb tsa DHCP khi kom Raspberry Pi ib txwm siv tib IP Chaw Nyob 192.168.1.40

Koj yuav tsum muaj peev xwm ping nws los ntawm koj tus Router, thiab tom qab ntawd los ntawm koj lub khoos phis tawj thiab yuav tsum tuaj yeem ncav cuag tam sim no.

Kauj Ruam 5: Txuas los ntawm SSH, Hloov Password thiab Teeb VNC Access

Txuas los ntawm SSH, Hloov Password thiab Teeb VNC Access
Txuas los ntawm SSH, Hloov Password thiab Teeb VNC Access
Txuas los ntawm SSH, Hloov Password thiab Teeb VNC Access
Txuas los ntawm SSH, Hloov Password thiab Teeb VNC Access
Txuas los ntawm SSH, Hloov Password thiab Teeb VNC Access
Txuas los ntawm SSH, Hloov Password thiab Teeb VNC Access
Txuas los ntawm SSH, Hloov Password thiab Teeb VNC Access
Txuas los ntawm SSH, Hloov Password thiab Teeb VNC Access

Txog tam sim no koj tuaj yeem ping koj li Raspberry PI ntawm lub network, thiab sim ssh rau hauv. SSH yuav tsum tau qhib vim tias koj tau ntxiv cov ntaub ntawv SSH rau hauv qhov muab faib ntawm SD daim npav rau Rapsberry Pi.

Siv cov ntawv pov thawj hauv qab no rau ssh: pi / raspberry.

robert@robert-enreach: ~ $ ssh [email protected]

Qhov tseeb ntawm tus tswv '192.168.1.40 (192.168.1.40)' tsis tuaj yeem tsim tsa. ECDSA tus ntiv tes tseem ceeb yog SHA256: no3JtIRZRG2SqSbWHg1sVC35mBjHyeX9SgDr81uPeuU. Koj puas paub tseeb tias koj xav txuas txuas ntxiv (yog/tsis)? yog Ceeb Toom: Ntxiv mus tas li '192.168.1.40' (ECDSA) rau hauv cov npe ntawm cov tswv paub. [email protected]'s password: Linux raspberrypi 5.4.51-v7l+ #1333 SMP Mon Aug 10 16:51:40 BST 2020 armv7l Cov program 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 kev tso cai los ntawm txoj cai lij choj. Nkag mus zaum kawg: Sat Sep 26 13:41:55 2020 SSH tau qhib thiab tus password tsis raug rau 'pi' tus neeg siv tsis tau hloov pauv. Nov yog kev nyab xeeb kev nyab xeeb - thov nkag mus ua tus siv 'pi' thiab ntaus 'passwd' los teeb tus password tshiab. Wi-nkaus tam sim no thaiv los ntawm rfkill. Siv raspi-teeb tsa los teeb tsa lub tebchaws ua ntej siv. Yog tias koj tuaj yeem SSH koj tab tom taug kev. Yog tias tsis yog koj yuav tsum rov qab thiab tshawb xyuas ntawm ssh cov ntaub ntawv ntawm qhov muab faib khau raj. Hloov koj tus password ntawm qhov no

pi@raspberrypi: ~ $ passwd

Hloov tus password rau pi. Tus password tam sim no: Tus password tshiab: Retype tus password tshiab: passwd: password hloov tshiab ua tiav Kuv tab tom npaj yuav siv Rapsberry rau qee qhov Software txhais xov tooj cua, yog li kuv yuav xav tau GUI interface. Khiav qhov teeb tsa kom qhib rau Desktop, hloov kev daws teeb meem thiab pab kom VNC nkag mus

pi@raspberrypi: ~ $ sudo raspi-teeb tsa

Koj tuaj yeem tshawb xyuas tam sim no tias koj li Raspberry PI tau mloog ntawm chaw nres nkoj SSH 22, thiab Chaw nres nkoj VNC 5900

pi@raspberrypi: ~ $ netstat -tupln

(Tsis yog txhua qhov txheej txheem tuaj yeem txheeb xyuas, cov ntaub ntawv tsis yog tus tswv yuav tsis raug qhia, koj yuav tsum tau hauv paus kom pom nws txhua qhov.) Cov kev sib txuas hauv Is Taws Nem nquag (tsuas yog cov servers) Proto Recv-Q Xa-Q Chaw Nyob Hauv Zos Chaw Nyob Txawv Teb Chaws Xeev PID /Lub npe program tcp 0 0 0.0.0.0:5900 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:22 22.0.0.0:* LISTEN - tcp6 0 0::: 5900:::* LISTEN - tcp6 0 0::: 22:::* LISTEN - udp 0 0 0.0.0.0:68 0.0.0.0:* - udp 0 0 0.0.0.0.47273 0.0.0.0:* - udp 0 0 0.0.0.0:5353 0.0.0.0:* - udp6 0 0::: 42453:::* - udp6 0 0::: 5353:::* -

Kauj Ruam 6: Txuas Ntawm RealVNC

Txuas ntawm RealVNC
Txuas ntawm RealVNC
Txuas ntawm RealVNC
Txuas ntawm RealVNC
Txuas ntawm RealVNC
Txuas ntawm RealVNC

Kuv muaj qee qhov teeb meem txuas ntawm VNC vim tias kuv tau txais qhov yuam kev uas tshwm sim ntau heev. Qhov no cuam tshuam nrog hom kev sau npe siv los ntawm vnc server ntawm Rapsberry PI. Txhim kho RealVNC vncviewer yog qhov kev xaiv zoo tshaj plaws rau qhov no. Koj tuaj yeem rub nws los ntawm qhov txuas no: RealVNC Viewer

Siv daim ntawv pov thawj koj teeb tsa ua ntej pi / password.

Kauj Ruam 7: Txaus Siab Rau Koj Rapsberry PI

Txaus siab rau koj Rapsberry PI
Txaus siab rau koj Rapsberry PI

Tam sim no koj tuaj yeem txaus siab koj li Raspberry. Qhov tshiab no tau teeb tsa nrog GUI siv ib puag ncig 5% CPU thiab muaj ib ncig 1.5GB ntawm Kev Nco Dawb. Kuv yuav sim coj kuv txhais tes mus rau hauv 4GB Memory Model yav tom ntej.

Pom zoo: