Cov txheej txheem:
- Kauj Ruam 1: Me ntsis Txog thiab Raspberry Pi
- Kauj Ruam 2: Npaj thiab Nruab Raspbian
- Kauj Ruam 3: Pab kom SSH thiab VNC
- Kauj Ruam 4: Teeb IP Static rau Kev Nkag Mus
- Kauj Ruam 5: Nkag Mus Rau Lub Rooj Sib Tham Hauv Lub Vev Xaib (SSH)
- Kauj Ruam 6: Nkag Mus Rau Lub Rooj Sib Tham Hauv Ntej Los Ntawm Cov Duab Sib Txuas (VNC)
Video: Nruab thiab teeb tsa Raspbian ntawm Raspberry Pi: 6 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
Cov ntawv qhia no yog rau cov tib neeg uas xav teeb tsa Raspbian ntawm Raspberry Pi.
Thaum pib, phau ntawv qhia no tau sau ua lus Portuguese ntawm no hauv Brazil. Kuv sim kuv qhov zoo tshaj plaws los sau ua lus Askiv. Yog li thov zam txim rau kuv qee qhov yuam kev uas tej zaum yuav tau sau.
Cov lus qhia no tau faib raws li hauv qab no:
Kauj Ruam 1: Me ntsis txog thiab Raspberry Pi
Kauj ruam 2: Npaj thiab nruab Raspbian
Kauj Ruam 3: Pab kom SSH thiab VNC
Kauj Ruam 4: Teeb IP zoo li qub rau kev nkag mus
Kauj Ruam 5: Nkag mus rau lub rooj tsavxwm nyob deb ntawm lub davhlau ya nyob twg (SSH)
Kauj Ruam 6: Nkag mus rau lub rooj tsavxwm nyob deb ntawm cov duab sib tham (VNC)
Kauj Ruam 1: Me ntsis Txog thiab Raspberry Pi
Raspberry Pi yog lub npe ntawm kab ntawm microcomputers tsim los ntawm Raspberry Pi Foundation thiab lub hauv paus chaw haujlwm hauv tebchaws Askiv. Lub hauv paus lub zeem muag yog ua kom yooj yim rau tib neeg nkag mus rau kev suav.
Tib neeg thoob ntiaj teb siv Raspberry Pi los qhia kev tsim kho, tsim kho cov phiaj xwm kho vajtse thiab software, ua haujlwm hauv tsev tsis siv neeg, siv rau cov haujlwm tsim khoom, siv IoT (Internet of Things) cov haujlwm, thiab ua yeeb yaj kiab game los ntawm kev rov ua dua tshiab, piv txwv li Recalbox thiab Retropie.
Raspberry tuaj yeem khiav qee qhov sib txawv ntawm kev paub ua haujlwm, tab sis feem ntau siv yog Raspbian.
Raspbian yog dawb Debian-based Linux sib txawv, qhov tshwm sim ntawm kev txhim kho tas li hauv zej zog txoj haujlwm tsom mus rau kev ruaj ntseg thiab ua haujlwm ntawm ntau pob Debian ntau li ntau tau. Qhov kev ua haujlwm no tau ua kom zoo los khiav ntawm Raspberry Pi thiab tuaj yeem rub tawm ncaj qha los ntawm Raspberry Foundation lub vev xaib.
Kauj Ruam 2: Npaj thiab Nruab Raspbian
Khiav Raspbian ntawm Raspberry Pi xav tau kev txhim kho cov kab ke ntawm micro SD nco daim npav tsawg kawg 8GB thiab nyiam dua chav kawm 10.
Koj tuaj yeem nruab Raspbian ntawm txhua qhov hloov pauv ntawm Raspberry Pi. Txog qhov kev qhia no kuv siv Raspberry Pi 3 Qauv B +.
Txhawm rau txuas ntxiv nrog kev teeb tsa thiab teeb tsa ntawm lub operating system koj yuav xav tau cov khoom hauv qab no:
01 - Raspberry Pi01 - Lub Hwj Huam rau Raspberry Pi 3 (Pi 2 / B / B+) 01 - Acrylic Case nrog Txias rau Raspberry Pi 3 (xaiv tau) 01 - Micro SD Memory Card (16Gb lossis 32Gb) 01 - Memory Card SD Reader01 - HDMI Saib 01 - HDMI Cable01 - MouseUSB01 - Keyboard USB
Koj tuaj yeem siv TV ua tus saib xyuas ntev li ntev tau nws muaj HDMI txuas. Tus saib yuav tsuas xav tau ib zaug yog li peb tuaj yeem teeb tsa ntawm lub rooj tsavxwm. Tom qab nkag mus rau hauv kab ke yuav ua tiav nyob deb ntawm lwm lub khoos phis tawj. Kev siv rooj plaub nrog lub tshuab txias yog xaiv tau, tab sis nws zoo tagnrho, vim li no txoj kev koj lub rooj tsavxwm tau tiv thaiv thiab ua kom txias thaum lub sijhawm nws siv.
Siv lub micro SD daim npav nyeem ntawv los txuas daim npav nco rau lub khoos phis tawj:
Rub tawm SD Memory Card Formatter thiab nruab:
www.sdcard.org/downloads/formatter/eula_windows/index.html
Tom qab kev teeb tsa, qhib qhov program, xaiv tsav uas koj daim npav nco tau faib, txheeb xyuas qhov "Quick format" xaiv, nyem "Format" thiab tos rau cov txheej txheem kom tiav:
Rub tawm Raspbian nrog lub desktop thiab pom zoo software:
www.raspberrypi.org/downloads/raspbian/
Tom qab rub tawm, unzip cov ntawv kom cov duab tau tsim.
Rub tawm Etcher thiab nruab:
www.balena.io/etcher/
Qhib Etcher, xaiv Raspbian duab koj rub tawm, xaiv lub cim xeeb daim npav qhov twg cov duab yuav raug kaw, nyem "Txuas ntxiv", nyem qhov "Flash" xaiv, tos rau tus txheej txheem kom tiav, thiab kaw qhov program:
Tshem daim npav nyeem ntawv los ntawm lub khoos phis tawj, tshem daim npav los ntawm tus nyeem ntawv, thiab ntxig rau hauv Raspberry Pi. Txuas lub HDMI cable rau hauv Raspberry Pi thiab tus saib, ntsaws rau hauv lub hwj chim muab lub zog rau nws.
Nrog tus saib tau qhib, tos kom lub kaw lus pib. Tom qab khau raj koj yuav pom hla lub vijtsam zoo ib yam li cov duab hauv qab no:
Koj yuav raug ceeb toom kom xaiv lub tebchaws teeb tsa, teeb tsa lus, thiab txuas WiFi network. Tom qab txuas rau WiFi, qhib qhov browser nyob rau sab laug hauv kab sab saum toj thiab sim nkag mus rau txhua lub vev xaib kom paub tseeb tias koj muaj internet nkag tau.
Nws yuav yog tias lub kaw lus ua qee qhov hloov tshiab ntawm thawj lub khau raj no thiab rov pib dua, yog li tsuas yog tos kom ua mus.
Kauj Ruam 3: Pab kom SSH thiab VNC
Tom qab ua kom ob txoj kev xaiv no lub rooj tsav xwm tuaj yeem nkag mus tau deb ntawm SSH davhlau ya nyob twg lossis VNC cov duab sib cuam tshuam. Nyob rau sab saud nyem rau ntawm raspberry, "Nyiam" thiab "Raspberry Pi Configuration":
Nyem rau ntawm "Interfaces," kos "Enable" rau SSH thiab VNC, thiab nyem OK:
Nrog rau cov kev xaiv no tau qhib Raspberry Pi tam sim no tau npaj los tso cai nkag mus deb ntawm SSH lossis VNC.
Kauj Ruam 4: Teeb IP Static rau Kev Nkag Mus
Los ntawm lub neej ntawd lub rooj tsavxwm yuav txuas rau lub network (ethernet lossis WiFi), tau txais IP muaj zog thiab ntawm txhua qhov kev sib txuas koj tuaj yeem tau txais IP chaw nyob sib txawv los ntawm kev sib txuas yav dhau los, yog li thaum twg koj nkag mus rau hauv lub rooj tsavxwm yuav tsum tau txheeb xyuas yog tias IP tseem zoo ib yam. Vim li no, peb yuav teeb tsa tus IP chaw nyob ruaj khov.
Qhib lub davhlau ya nyob twg:
Los ntawm no koj yuav lis kab hais kom koj tuaj yeem teeb tsa lossis ua cov haujlwm ntawm lub platform. Kuv pom zoo tias koj txuas ntxiv ua raws cov lus qhia no ncaj qha los ntawm Raspbian, raws li txoj kev no koj tuaj yeem luam tawm thiab muab cov lus txib uas yuav siv tom ntej. Txhawm rau ua qhov no, tsuas yog qhib Raspbian web browser, nkag mus rau cov lus qhia no thiab tom qab ntawd txuas ntxiv los ntawm no.
Cov kab hais kom ua hauv qab no koj yuav ntaus hauv lub davhlau ya nyob twg thiab nias nkag mus kom ua. Hauv qee qhov lus txib koj yuav raug nug kom pom zoo thiab koj yuav tsum nyeem thiab lees paub.
ip r | ib grep default
Nco tseg tias kab rov qab los qhia pom ob tus IP chaw nyob, thawj zaug yog lub qhov rooj nkag mus rau koj lub router thiab qhov chaw nyob thib ob yog qhov uas muab rau koj li Raspberry Pi. Nco ntsoov tias hauv kuv rooj plaub thawj qhov chaw nyob tau xaus rau hauv "2.1" thiab qhov chaw nyob thib ob tau xaus rau hauv "2.112". Peb tus lej kawg ntawm qhov chaw nyob thib ob hloov pauv ntawm txhua lub cuab yeej txuas nrog koj lub router. Muaj feem yuav yog qhov chaw nyob nthuav qhia rau koj yuav txawv ntawm cov uas tau qhia hauv daim duab. Sau thawj qhov chaw nyob (rooj vag) raws li koj xav tau tom qab.
Ntaus cov lus txib hauv qab no ntawm lub davhlau ya nyob twg thiab ntaus nkag:
sudo nano /etc/resolv.conf
Hauv lub davhlau ya nyob twg qhib cov ntawv uas muaj cov ntaub ntawv DNS ntawm koj lub network. Sau qhov chaw nyob uas pom ntawm thawj kab (thawj DNS) thiab tom qab ntawv ceeb toom zaum ob (DNS thib ob). Nias lub CTRL + X tuav ntawm lub davhlau ya nyob twg los kaw cov ntaub ntawv.
Ntaus cov lus txib hauv qab no ntawm lub davhlau ya nyob twg thiab ntaus nkag:
sudo nano /etc/dhcpcd.conf
Siv tus lej qis ntawm cov keyboard lossis nqes mus rau qhov kawg ntawm cov ntawv yog li koj tuaj yeem kho qhov tsim nyog kho:
1) Yog tias koj siv lub network txuas nrog koj li Raspberry los muab kev sib txuas hauv network, koj tsis tas yuav hloov qhov kev sib txuas, tab sis yog tias koj siv WiFi txuas, rho tawm eth0 thiab sau wlan0.
2) Hauv "zoo li qub ip_address =" rho tawm cov ntaub ntawv thiab sau tus IP chaw nyob uas yuav muab rau koj li Raspberry, nco ntsoov khaws lub qhov rooj tsis raug, tab sis hloov peb tus lej kawg ntawm qhov chaw nyob. Koj tuaj yeem xaiv tus lej (los ntawm peb tus lej) mus txog 254. Nyiam siv cov lej ntau dua kom tsis txhob muaj teeb meem IP hauv koj lub network. Khaws / 24 tom qab tus IP chaw koj xaiv.
3) Hauv "routers zoo li qub =" rho tawm cov ntaub ntawv thiab sau qhov rooj qhov rooj ntawm koj lub router uas koj tau sau tseg ua ntej.
4) Rho tawm cov ntaub ntawv thiab sau thawj DNS koj tau sau tseg ua ntej.
5) Rho tawm cov ntaub ntawv thiab sau DNS thib ob uas koj tau sau tseg ua ntej.
6) lwv cov cim "#" los ntawm kab uas koj tau kho. Nco ntsoov tias cov kab uas lub cim phaus "#" raug tshem tawm yuav yog xim txawv.
Tom qab hloov pauv koj yuav muaj cov ntaub ntawv nrog cov ntaub ntawv zoo ib yam li cov duab hauv qab no, tab sis nrog koj cov ntaub ntawv network:
Txhawm rau khaws cov ntawv kho kom raug nyem CTRL + O thiab tom qab ntawd CTRL + X kom kaw cov ntawv.
Tom qab ntawd ntaus cov lus txib hauv qab no rau hauv lub davhlau ya nyob twg thiab nias nkag mus kom rov pib dua lub system thiab siv cov chaw:
sudo rov pib dua
Tom qab rov pib dua lub kaw lus, qhib lub davhlau ya nyob twg dua, ntaus cov lus txib hauv qab no thiab nias nkag mus txhawm rau txheeb xyuas tias cov teeb tsa yav dhau los tsis ua li cas:
ip r | ib grep default
Qhib tus browser sab laug nyob rau sab saum toj thiab sim nkag mus rau txhua lub xaib kom paub tseeb tias koj muaj internet nkag tau.
Tus IP chaw nyob uas koj teeb tsa rau Raspberry Pi tau tsau thiab yuav tsis hloov pauv ntawm kev sib txuas tshiab. Txuag nws rau siv thaum nkag mus rau lub rooj tsav khoom nyob deb.
NCO TSEG: Yog tias koj hloov lub router thiab lub rooj vag IP ntau qhov hloov pauv, hloov DNS chaw lossis hloov pauv kev sib txuas, nco ntsoov hloov pauv cov ntaub ntawv kom lub rooj tsavxwm tsis plam kev sib txuas hauv lub network
Kauj Ruam 5: Nkag Mus Rau Lub Rooj Sib Tham Hauv Lub Vev Xaib (SSH)
Txhawm rau nkag mus rau Raspberry Pi nyob deb ntawm lub davhlau ya nyob twg thiab tsis muaj duab sib tham koj tuaj yeem siv SSH (Ruaj Ntseg Plhaub). Koj tuaj yeem siv, piv txwv, Putty lossis lwm yam cuab yeej rau lub hom phiaj uas koj nyiam. Kuv tshwj xeeb tshaj yog siv Windows hais kom sai nws tus kheej, hauv qhov no Windows PowerShell.
Piv txwv tias SSH twb tau qhib rau Raspberry Pi, mus rau Windows "Pib" ntawv qhia zaub mov, tshawb rau Windows PowerShell thiab thaum koj pom nws, nyem rau ntawm nws thiab xaiv "Run as administrator":
Nrog rau qhov hais kom ua sai sai, koj yuav tsum sau cov lus txib ssh pi @ nrog koj li Raspberry's IP chaw nyob tom qab @. Piv txwv tias koj teeb IP 192.168.0.120 rau koj li Raspberry, cov lus txib yuav yog:
Hauv kuv qhov xwm txheej, Raspberry Pi muaj tus IP ruaj khov 192.168.2.129, yog li kuv yuav ntaus kab hauv qab no thiab nias sau:
Thaum xub nkag los ntawm ssh koj yuav tau txais kev pom zoo rau kev lees paub, koj yuav tsum ntaus yog thiab nias nkag mus. Thaum kawg, koj yuav raug ceeb toom rau tus password uas koj yuav tsum nkag mus thiab nias nkag mus. Yog tias koj tsis tau hloov koj tus password nws yuav yog raspberry:
Txhawm rau ntsuas kev nkag mus deb ntawm lub davhlau ya nyob twg, ntaus cov lus txib hauv qab no thiab nkag rau hauv Windows PowerShell:
ip r | ib grep default
Yog tias txhua yam zoo, rov qab los yuav yog cov ntaub ntawv peb tau pom dua, uas qhia txog lub rooj vag IP chaw nyob ntawm lub router Raspberry txuas nrog thiab tus IP chaw nyob uas tau muab rau pawg thawj coj. Yog tias koj theej kab kab hais kom ua los ntawm ib qho twg thiab xav muab nws tso rau hauv lub davhlau ya nyob twg, tsuas yog nyob rau ntawm txoj cai tam sim no nyem qhov kab theej theej tawm yuav raug muab kaw thiab nias sau cov lus txib (yog siv tau) yuav ua tiav. Txhawm rau tshem tawm cov lus txib dav dav, tsuas yog ntaus rov pib dua thiab nias nkag mus. Txhua cov lus txib uas koj nkag mus tau raug khaws tseg hauv kev nco thiab nkag mus rau cov lus txib no yooj yim nias tus lej tseem ceeb ntawm koj cov keyboard.
Nrog kev ua haujlwm nyob deb, koj tuaj yeem tswj hwm koj li Raspberry Pi los ntawm lwm lub khoos phis tawj lossis khoom siv uas tso cai rau koj siv lub davhlau ya nyob twg thiab txuas nrog tib lub network zoo li lub rooj tsavxwm.
Kauj Ruam 6: Nkag Mus Rau Lub Rooj Sib Tham Hauv Ntej Los Ntawm Cov Duab Sib Txuas (VNC)
Yog tias koj xav tau lossis xav tau nkag mus rau koj li Raspberry Pi nyob deb, tab sis dhau los ntawm cov duab sib tham, koj yuav tsum tau siv VNC (Kev Sib Txuas Network Virtual). Piv txwv tias VNC twb tau qhib rau Raspberry Pi, rub tawm VNC Viewer thiab nruab:
www.realvnc.com/pt/connect/download/viewer/windows/
Tom qab rub tawm qhib qhov program thiab hauv daim teb sau tus IP chaw nyob ntawm koj li Raspberry Pi.
Piv txwv tias koj teeb IP 192.168.0.120 rau koj li Raspberry Pi, sau tus IP thiab qhov kev zov me nyuam yuav nug koj yog tias koj xav ua qhov txuas lossis koj tuaj yeem nias nkag mus. Hauv kuv qhov xwm txheej, Raspberry muaj tus IP ruaj khov 192.168.2.129. Koj yuav raug ceeb toom rau tus username (pi) thiab tus password. Yog tias koj tsis tau hloov koj tus password nws yuav yog raspberry:
Lub qhov rai tshiab yuav qhib qhov twg koj tuaj yeem pom qhov pom ntawm koj li Raspberry Pi's GUI thiab yuj rau saum yuav muab rau koj nkag mus rau VNC Viewer xaiv cov ntawv qhia zaub mov:
Lub qhov rai tshiab yuav qhib qhov twg koj tuaj yeem pom qhov pom ntawm koj li Raspberry Pi's GUI thiab yuj rau saum yuav muab rau koj nkag mus rau VNC Viewer xaiv cov ntawv qhia zaub mov:
Nrog kev ua haujlwm nyob deb, koj tuaj yeem tswj hwm koj li Raspberry Pi los ntawm lwm lub khoos phis tawj lossis cov khoom siv uas muaj VNC Viewer teeb tsa thiab txuas nrog tib lub network zoo li lub rooj tsavxwm.
Tom qab Raspbian tau teeb tsa thiab teeb tsa, koj tuaj yeem tshawb xyuas qhov ua haujlwm tau zoo thiab kawm paub me ntsis ntxiv txog kev siv kab hais kom ua ntawm Linux-based systems.
Yog tias koj muaj IoT thiab cov cuab yeej siv hauv tsev, tab sis tsis tuaj yeem ua ke nrog Homekit Lub Tsev app thiab Siri vim tias lawv tsis yog Apple tau ntawv pov thawj, Kuv pom zoo kom nyeem cov ntawv qhia Qhia Nruab Homebridge ntawm Raspberry Pi thiab Windows.
Pom zoo:
Yuav Ua Li Cas Nruab Raspbian OS hauv Raspberry Pi Siv NOOBS Software thiab Smartphone: 6 Cov Kauj Ruam
Yuav Ua Li Cas Nruab Raspbian OS hauv Raspberry Pi Siv NOOBS Software thiab Smartphone: Nyob Zoo Txhua Tus! hnub no hauv qhov kev qhia no kuv qhia koj yooj yim nruab Raspbian OS hauv Raspberry Pi siv NOOBS software thiab Smartphone
Nruab Nrab Nruab Nrab Chav Dej Teeb: 5 Kauj Ruam (nrog Duab)
Nruab Nrab Nruab Nrab Chav Dej Teeb: Peb ib txhia ntsib kev xav tau siv chav dej nyob nruab nrab hmo ntuj. Yog tias koj qhib lub teeb, tej zaum koj yuav tsis pom kev hmo ntuj. Lub teeb dawb lossis xiav ua rau koj plam qhov pw tsaug zog lawm, Melatonin, ua rau nws nyuaj rau rov mus pw. Yog li
Nruab thiab teeb Shinken Network Monitor ntawm Raspberry Pi: 14 Cov Kauj Ruam
Nruab thiab teeb Shinken Network Monitor ntawm Raspberry Pi: NCO TSEG: shinken tau hloov kho zaum kawg hauv MAR2016 rau kev tso tawm ruaj khov ntawm 2.4.3. Yog li, ntau xyoo dhau los kuv tau txav mus rau lwm txoj hauv kev los saib xyuas lub network hauv tsev. Ib qho ntxiv, php5 tsis zoo li muaj, yog li, thov tsis txhob siv cov lus qhia no! Nruab ib qho
Los ntawm lub teeb nyem mus rau Tsab ntawv tsa suab Sensor nrog ESP8266 thiab MQTT: 5 Cov Kauj Ruam (nrog Duab)
Los ntawm Lub Teeb Nyeem rau Tsab Ntawv Pom Zoo Nrog ESP8266 thiab MQTT: Hauv kab ntawv no, kuv yuav nthuav qhia cov khoom hauv qab no: LEDs xav tau qhov txwv tam sim no circuithow kom ua lub teeb nyem ua lub teeb pom kev los ntawm lub roj teeb nqa tau, thiab dimming LEDs los ntawm ESP8266 ntawm MQTT thiab piav qhia luv luv txog yuav ua li cas th
Cov Roj Teeb Lemon Me, thiab Lwm Cov Qauv rau Xoom Tus Nqi Hluav Taws Xob thiab Coj Lub Teeb Tsis Muaj Roj Teeb: 18 Kauj Ruam (nrog Duab)
Cov Roj Teeb Lemon Me, thiab Lwm Cov Qauv rau Xoom Tus Nqi Hluav Taws Xob thiab Coj Lub Teeb Tsis Muaj Roj Teeb: Nyob zoo, tej zaum koj twb paub txog txiv qaub roj teeb lossis roj teeb roj teeb. Lawv tau siv ib txwm siv rau lub hom phiaj kev kawm thiab lawv siv cov tshuaj tiv thaiv hluav taws xob uas tsim hluav taws xob qis, feem ntau pom nyob rau hauv daim ntawv ntawm cov coj lossis lub teeb ci ci. Cov no