Cov txheej txheem:
- Kauj Ruam 1: Sau Qhov Chaw
- Kauj ruam 2: Download Diet Pi
- Kauj Ruam 3: Hlawv Diet-pi Duab rau Micro SD Card
- Kauj ruam 4: Raspberry Pi Teeb thiab Kev Sib Txuas
- Kauj Ruam 5: Teeb DietPi
- Kauj Ruam 6: Kho DietPi
- Kauj Ruam 7: Xaiv tau: Teeb Wi-nkaus
- Kauj Ruam 8: Ntxiv Tus Neeg Siv Pi rau DietPi
- Kauj Ruam 9: Tau FTDI USB rau Serial Interface Ua Haujlwm
- Kauj ruam 10: Txiav txim siab USB Port
- Kauj Ruam 11: Qhib Terminal Window thiab Txuas rau Raspberry Pi
- Kauj Ruam 12: Ib txwm hloov kho thiab txhim kho
- Kauj Ruam 13: Nthuav Tawm Cov Ntaub Ntawv
- Kauj Ruam 14: Tsis teb los tau: Tshem GUI
- Kauj ruam 15: Teeb Gmail
- Kauj Ruam 16: Nrhiav IP Chaw Nyob Ntawm Lub Npe
- Kauj ruam 17: Backup Micro SD Card
- Kauj Ruam 18: Cov Ntawv Ntxiv: Ua Ntej Qhov Tseem Ceeb
- Kauj Ruam 19: Cov ntawv txuas ntxiv: Ntxiv Cov Neeg Siv Khoom Certs rau Web Servers
- Kauj Ruam 20: Cov Ntawv Ntxiv: RSA Qhov Teeb Meem Tseem Ceeb
- Kauj Ruam 21: Cov Ntawv Ntxiv: Cov lus qhia
- Kauj ruam 22: Cov ntawv txuas ntxiv: Hloov kho tshiab
- Kauj ruam 23: Cov ntawv txuas ntxiv: Kev daws teeb meem
- Kauj Ruam 24: Cov Ntawv Ntxiv: Tsis Siv Neeg Nruab Nrab Script
Video: Teeb Raspberry Pi Siv Diet Pi Tsis Saib Xyuas lossis Keyboard: 24 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Cov lus qhia no yog tsis pom zoo. Thov siv: DietPi Teeb
NOOBS xav tau tus saib xyuas, keyboard thiab nas, uas ntxiv ~ $ 60 (USD) lossis ntau dua hauv tus nqi. Txawm li cas los xij, thaum Wi-nkaus ua haujlwm, cov cuab yeej no tsis xav tau ntxiv lawm. Tej zaum, DietPi yuav txhawb USB rau cov lej hauv daim duab.
Txhua lub sijhawm kuv pib qhov tshiab Raspberry Pi qhov haujlwm, Kuv nqa lub monitor, keyboard thiab nas thiab nrhiav chaw los teeb tsa lawv. Tom qab ua tiav kuv qhov haujlwm Raspberry Pi thib peb, Kuv xav tias yuav tsum muaj txoj hauv kev zoo dua.
Txoj hauv kev no tau nce qib me ntsis thiab siv MacBook Pro hloov chaw saib, keyboard thiab nas. Yog li, nws txuag $ 45 thiab siv qhov chaw tsawg dua.
Nrog cov lus qhia no, Kuv tau pib siv Diet Pi hloov chaw ntawm Raspbian. Feem ntau ntawm kuv cov phiaj xwm tsis muaj taub hau. Siv Diet Pi muab SD daim npav lub neej ntev dua thiab txo cov txheej txheem ua haujlwm, yog li ua kom muaj kev ua tau zoo.
Thawj kis yuav tsum muaj cov keyboard, saib xyuas thiab nas. Qhov thib ob tshem tawm qhov xav tau rau cov no.
Lub hom phiaj ntawm txoj haujlwm no yog:
- Siv Diet Pi
- Tshem tawm qhov xav tau rau tus saib xyuas, keyboard thiab nas ntawm kev teeb tsa tom ntej
- Tsim tus qauv micro SD daim npav duab yog li tom ntej no kuv tuaj yeem hla ntau cov kauj ruam
- Hlais daim micro SD daim duab
Kauj Ruam 1: Sau Qhov Chaw
Kuv tau pom cov ntu hauv qab no ua tau zoo tshaj plaws hauv kuv daim ntawv thov. Cov khoom no kim dua li cov uas muaj nyob hauv cov khoom siv ib txwm pib.
Tau txais cov khoom thiab cov cuab yeej (tus nqi hauv USD):
- MacBook Pro (lub PC tuaj yeem siv tau)
- Raspberry Pi 3 lossis Raspberry Pi 2 Model B Element14 $ 35
- Panda 300n WiFi Adapter Amazon $ 16.99
- 5.2V 2.1A USB Power Adapter los ntawm Amazon $ 5.99
- Micro USB rau USB cable 3ft los ntawm Amazon $ 4.69
- FTDI TTL-232R-RPI Serial rau USB cable los ntawm Mouser $ 15
- Case los ntawm Amazon $ 6.99
- SanDisk Ultra 16 GB microSDHC Class 10 nrog Adapter (SDSQUAN-016G-G4A) los ntawm Amazon $ 8.99
- TV nrog HDMI chaw nres nkoj, USB keyboard, USB nas, HDMI Cable (tsuas yog xav tau thawj zaug dhau)
Sau ntawv:
Cov ntawv nyob hauv cov spades, xws li, ♣ replace-this ♣, yuav tsum hloov nrog tus nqi tiag. Tau kawg, tshem cov spades
Kauj ruam 2: Download Diet Pi
Piv rau lub khoos phis tawj lossis lub khoos phis tawj PC, raspberry pi tus txheej txheem tsis muaj zog. Yog li, lub hauv paus ntsiab lus tseem ceeb hauv kev tau txais qhov ua tau zoo yog tshem tawm qhov tsis tsim nyog thauj khoom ntawm tus txheej txheem.
Diet-Pi yog kev teeb tsa me me ntawm raspbian. Diet-Pi tshem tawm cov txheej txheem txheej txheem kev ua haujlwm uas tsis xav tau tso cai rau tus txheej txheem ua tus neeg siv cov haujlwm sai dua. Khiav cov lus txib saum toj kawg nkaus ntawm ib qho ntawm kuv cov kab ke raspbian qhia 126 cov haujlwm ua haujlwm, thaum noj zaub mov-pi tsuas muaj 91.
Diet-Pi kuj muaj lub teeb GUI thiab tshem tawm qhov tsis tsim nyog I/O rau micro SD daim npav. Daim npav SD tau hnav tawm tom qab rov sau dua. Txo tus naj npawb ntawm kev sau, ncua lub neej ntawm SD daim npav. Feem ntau ntawm kuv cov haujlwm tsis xav tau GUI. Yog li, hauv qib tom ntej, LDXE raug tshem tawm.
DietPi sau ntau lub cav mus rau RAM disk txuag sau rau hauv daim npav micro SD.
Cov kauj ruam:
- Rub tawm qhov hloov tshiab kawg ntawm no Diet-Pi. Mus rau Download. Xaiv Raspberry Pi. Xaiv Raspberry Pi Txhua Tus Qauv. Thiab tom qab ntawd xaiv Download Duab.
- Thaum qhov no tau hloov kho qhov hloov tshiab kawg yog: DietPi_v6.0_RPi-ARMv6-Stretch
- Thaum nws tau rub tawm, rub rub los ntawm rub tawm mus rau cov npe uas koj khaws cov duab. Kuv nyiam khaws cov duab rub tawm thiab thaub qab cov duab ntawm raspberry pi cov haujlwm hauv phau ntawv teev npe ntawm kuv Mac.
- Nco ntsoov txhua yam uas nyob hauv ♣ hloov los ntawm koj lub npe lossis tus nqi
♣ macbook-duab-npe ♣
- Qhib lub davhlau ya nyob twg qhov rai ntawm MacBook
- Hloov mus rau koj cov npe duab thiab teev cov ntaub ntawv
$ cd (macbook-duab-phau ntawv teev npe)
$ ls 2015-11-21-raspbian-jessie.img SDCardBackupSetup.dmg DietPi_RPi- (Jessie).7z disk_test.dmg
- Kuv siv unarchiver rau decompress zip cov ntaub ntawv (.7z) ntawm kuv lub MacBook.
- Thiab tom qab ntawd tshem tawm cov ntaub ntawv compressed (rub cov ntawv zip rau hauv lub thoob khib nyiab)
$ cd (macbook-duab-phau ntawv teev npe)
$ ls 2015-11-21-raspbian-jessie.img SDCardBackupSetup.dmg DietPi_v136_RPi- (Jessie).img disk_test.dmg
Yog tias lub npe duab muaj cov cim, tom qab cov kauj ruam yuav tsis nyiam qhov ntawd. Yog li, hloov npe cov ntaub ntawv thiab tshem tawm cov npe. Cov duab tam sim no: ♣ diet-pi-image ♣
Kauj Ruam 3: Hlawv Diet-pi Duab rau Micro SD Card
Rub tawm lwm yam los ntawm no, thiab tom qab ntawd teeb tsa lwm yam. Etcher ua kev teeb tsa dag pov thawj.
Pib lwm yam
- Xaiv koj cov duab ♣ diet-pi-image ♣:
- Xaiv koj daim npav microSD
- Nyem
- Sau tus password MacBook
Vim li cas los xij, lwm yam tsis tshem tawm daim npav microSD. Yog li, kuv yuav tsum xaiv tus tsav thiab tom qab ntawd nyem rau nws kom tshem nws (lossis yog tias ib lub pob nyem CTRL-nyem). Yog tias koj tsis tshem nws tsis muaj teeb meem tiag, koj yuav tau txais lus ceeb toom.
Kauj ruam 4: Raspberry Pi Teeb thiab Kev Sib Txuas
Rhaub Dej Kub Tshem daim kab xev thiab nias khov kho rau lub tshuab ua haujlwm. Lub dab dej kub thiab nti yuav luag zoo ib yam. Nws tau pom tseeb yog tias nws yuav tsum mus. Kuv tsis tau thaij duab.
Case
Siv rooj plaub sib nrug. Cov laus dua muaj peb ntu: saum, hauv qab thiab nruab nrab. Xaub Raspberry Pi rau hauv qab ntu ntawm rooj plaub Swb Raspberry Pi mus rau hauv qab. Muaj ob qhov yeeb yaj kiab ntawm qhov kawg uas tso daim npav SD. Lub rooj tsavxwm yuav tsum swb hauv qab cov yeeb yaj kiab no. Nws swb yooj yim, tsis tas yuav yuam nws. Ib zaug ntxiv, qhov no zoo li yooj yim heev. Yog li, tsis muaj daim duab. Nws yog qhov zoo kom tus pi nyob hauv qab ntawm rooj plaub.
Cables thiab SD Card
Tshwj tsis yog qhia, ntxig cov hauv qab no rau hauv Raspberry Pi
-
Tsuas yog xav tau rau Pass 1
- HDMI cable rau TV
- USB Keyboard
- USB Mus
- Micro SD daim npav
- Ethernet cable
- Wi-nkaus dongle
-
USB serial I/O cable (saib cov duab saum toj no)
- Hauv av = xaim dub, tus pin 06 ntawm RPi
- Tx = Yellow wire, pin 08
- Rx = Liab hlau, tus pin 10
Thaum cov lus saum toj no tiav lawm:
Ntxig lub hwj huam kab
Ntxig USB/Serial cable rau hauv MacBook USB chaw nres nkoj
Yog tias siv myDietPi_v104_RPi-jessie.img tsim hauv Pass 1, tom qab ntawd
- Txheeb cov ntawv ntxiv kom pom tias muaj cov kauj ruam twg uas koj xav ntxiv
- Khiav dietpi-teeb tsa los hloov lub npe hostname
- Tom qab hloov lub npe hostname, koj yuav xav tshem RSA Key. Cov lus qhia kom ua qhov no yog nyob hauv daim ntawv ntxiv rau qhov kev qhia no.
- Koj ua tiav!
Kauj Ruam 5: Teeb DietPi
Teem DietPi.
Nkag mus rau raspberry pi
ID nkag mus: hauv paus
lo lus zais: dietpi
Ua raws cov lus qhia. DietPi yuav hloov kho thiab teeb tsa software tsim nyog.
Kauj Ruam 6: Kho DietPi
ID nkag mus thaum hais kom ua li ntawd.
Hloov chaw txog 25 teeb tsa cov ntxaij vab tshaus, Kuv tau siv cov ntawv qhia zaub mov ua tus qhia.
Yog hais qhia nrog cov ntawv qhia zaub mov, tom qab ntawv hla cov ntawv qhia zaub mov siv:
- xub tuav
- tab kom txav mus
- qhov chaw toggle xaiv los ntawm qhov chaw rau *
- thiab ENTER
Ua raws cov lus qhia, nws yooj yim siv. Qee cov kauj ruam yuav xav tau rov pib dua. Mus los ntawm txhua cov ntawv qhia zaub mov xaiv thiab txiav txim siab yam koj xav tau.
Yog tias koj mess, nws tsis muaj teeb meem loj. Cia li pib dua.
Nov yog kuv teeb. Hloov kom haum rau koj cov kev xav tau.
DietPi-Software
Thawj cov ntawv qhia zaub mov yog DietPi-Software
Xaiv dietpi-teeb tsa.
Ntawv qhia zaub mov tseem ceeb
- Zaub Xaiv
- Kev Xaiv Suab
- Kev Xaiv Ua Haujlwm
- Advanced Xaiv
-
Lus/Cheeb Tsam Xaiv
-
Qhov chaw (rau Asmeskas siv qhov chaw bar los ua *)
- [*] en. US. UTF-8 UTF-8
- en. US. UTF -8 - lub hauv paus pib
- yuav tsim kev hloov pauv
-
Lub Sijhawm
- US
- Nruab Nrab
-
Keyboard
-
Lwm yam
Lus Askiv (Asmeskas)
- Tsis muaj tus yuam sij sau
- Default rau keyboard layout
- Qauv: Dell
-
-
-
Kev Nyab Xeeb Kev Xaiv
- Hloov Root Password
- Hloov Hostname
- Networking Options
-
AutoStart Options
0. Console: Phau Ntawv Teev Npe Nkag Mus (lub neej ntawd)
- Cov cuab yeej
thiab ces reboot.
ID nkag mus nrog hauv paus thiab ♣ koj tus password ♣
DietPi-Software
Nruab qhov software xaiv tau.
DietPi Software teeb tsa cov ntawv qhia zaub mov:
-
Xaiv DietPi Optimized Software
- [*] RPi. GPIO
- [*] LLSP: lighttpd | sqlite | Cov php NCO TSEG: qhov no yog nyob ntawm yeem
- [*] certbot - NCO TSEG: Raws li ntawm 16APR2018 certbot tsis ua haujlwm nrog lighttpd
-
Xaiv Software Ntxiv Linux
- [*] Python pip NCO TSEG: qhov no yog nyob ntawm yeem, tab sis feem ntau ntawm kuv cov phiaj xwm siv sej
- [*] Avahi-daemon
- SSH Server: hloov ntawm DropBear mus rau OpenSSH
- File Server: Tsis muaj
- Log System: DietPi-Ramlog #1
- Pab!
- Mus Pib Nruab
DietPi yuav teeb tsa lub software
Kauj Ruam 7: Xaiv tau: Teeb Wi-nkaus
Feem ntau, Raspberry Pi tuaj yeem siv ib qho xaim lossis wireless txuas.
Yog tias koj xav siv Wi-nkaus, tom qab ntawd tshem lub ethernet cable thiab qhib Wi-nkaus
ID nkag mus thiab khiav dietpi-launcher.
$ dietpi-launcher
Cov ntawv qhia zaub mov zoo li no:
- DietPi-Software
- DietPi-Kho
- DietPi-AutoStart
- DietPi-Cron
- …
Xaiv DietPi-Config, uas zoo ib yam li:
- Zaub Xaiv
- Kev Xaiv Suab
- Kev Xaiv Ua Haujlwm
- Advanced Xaiv
- Lus/Cheeb Tsam Xaiv
- Kev Nyab Xeeb Kev Xaiv
- Network Options: Adapters
- …
Xaiv Network Options: Adapters
- Xaiv WiFi - qhib WiFi
- Xaiv Onboard WiFi - pab kom nyob hauv Wi -nkaus
Xaiv Network Options: Adapters thiab tom qab ntawd WiFi
Xaiv Scan thiab Txuas, xaiv koj lub tsev SSID
Hloov Lub Tebchaws: Asmeskas
Pab kom Auto Reconnect
Sau koj tus password (aka Access Key): ♣ your-home-ssid ♣
Thov hloov
Tom qab rov pib dua, DietPi yuav qhia:
IP eth0: ♣ koj-ip-chaw nyob ♣
Qhib lub davhlau ya nyob twg ntawm koj lub khoos phis tawj thiab pom tias koj tuaj yeem txuas wirelessly rau Raspberry Pi siv ib qho ntawm cov lus txib hauv qab no.
$ ssh hauv paus@♣ ip-address ♣
$ ssh root@♣your-hostname♣.local
Thiab WiFi yuav tsum ua haujlwm.
Kauj Ruam 8: Ntxiv Tus Neeg Siv Pi rau DietPi
Los ntawm lub neej ntawd, DietPi siv tus ID nkag mus siv: hauv paus, thaum raspbian siv lub npe siv: pi.
Ntau Raspberry Pi cov lus qhia thiab kuv cov lus qhia xav tias yog pib ntawm /tsev /pi thiab nkag mus ntawm pi. Yog li, ntxiv tus neeg siv hu ua: pi
$ useradd pi -m -G sudo
$ passwd pi Lo lus zais: ♣ raspberry-pi-password ♣ Lo lus zais: ♣ raspberry-pi-password ♣
Yog tias koj ua yuam kev, siv cov lus txib hauv qab no kom tshem tus neeg siv:
$ userdel pib
Luam daim ntawv theej ntawm /etc /sudoers
Raws li tus neeg siv, hauv paus, kho cov ntaub ntawv, tab sis ceev faj nrog cov ntawv no. Nco ntsoov nws raug ua ntej txuag
$ sudo nano /etc /sudoers
Tsis muaj qhov hloov pauv hauv qab no koj yuav tsum nkag mus rau tus password txhua zaus siv sudo.
Tom qab cov lus pom, #suav nrog …, ntxiv kab uas pib, pi TXHUA =:
#suav nrog /etc/sudoers.d
pi ALL = (ALL) NOPASSWD: TXHUA
CTRL-o, ENTER, CTRL-x kom txuag thiab kaw cov ntawv
Ntxiv bash plhaub, siv
$ sudo nano /etc /passwd
thiab kho cov neeg siv pi ntxiv rau /bin /bash thaum kawg. Tsis txhob hloov dab tsi ntxiv:
pi: x: 1001: 1001::/home/pi:/bin/bash
CTRL-o, ENTER, CTRL-x kom txuag thiab kaw cov ntawv
Txheeb xyuas tus neeg siv tshiab ua haujlwm
$ tawm
thiab nkag mus ua pi nrog ♣ raspberry-pi-password ♣
$ ssh pi@♣ ip-address ♣
Yog tias nkag rau hauv li pi, DietPi cov khoom siv muaj nyob hauv:
/DietPi/dietpi
dietpi cov ntawv sau siv daim tshev rau hauv paus UID = 0, uas tiv thaiv pi lub npe siv los ntawm kev khiav cov ntawv dietpi. Tsab ntawv txheeb xyuas yog tias $ UID = 0, uas yuav tsum tau tseg rau lub npe siv hauv paus. Ntxiv cov npe rau PATH tsis pab.
Yog li kom khiav dietpi-teeb tsa lossis ib qho ntawm cov khoom siv dietpi los ntawm pi, nkag mus ua tus siv super, thiab tom qab ntawd khiav cov lus txib. Txhawm rau tawm superuser, nkag mus tawm.
$ sudo ua
$ sudo/DietPi/dietpi/dietpi-config ♣ hloov-teeb tsa ♣ $ tawm
Yog lawm, koj tuaj yeem hloov kho tsab ntawv thiab ntxiv pi username's UID lossis tshem tawm daim tshev rau hauv paus UID. Tej zaum yuav xav tau kev hloov pauv ntxiv.
yog (($ UID! = 0)); ces
Yeem Kauj Ruam
Feem ntau, hauv paus yuav tsum tsis txhob siv ua tus ID nkag mus. Lub hauv paus nkag mus yuav tsum tsis txhob xiam, tab sis yuav tsum raug thaiv los ntawm kev nkag mus ib txwm muaj.
Txhawm rau tiv thaiv cov neeg siv los ntawm kev nkag ncaj qha raws li hauv paus, teeb lub hauv paus tus account lub plhaub rau /sbin /nologin hauv /etc /passwd file.
$ sudo nano /etc /passwd
Hloov
hauv paus: x: 0: 0: hauv paus:/hauv paus:/rau hauv/bash
rau
hauv paus: x: 0: 0: hauv paus:/hauv paus:/usr/sbin/nologin
Kauj Ruam 9: Tau FTDI USB rau Serial Interface Ua Haujlwm
Los ntawm lub neej ntawd, DietPi muaj usb rau cov neeg xiam oob khab. Pab kom qhov kev pabcuam no yog li peb tuaj yeem siv nws yav tom ntej.
$ sudo nano /boot /cmdline.txt
Hauv cov ntawv, ntxiv ua ntej console = tty1
console = ttyAMA0, 115200
CTRL-o, ENTER, CTRL-x kom txuag tau cov ntaub ntawv thiab tawm mus
Pab kev pabcuam thiab rov pib dua Raspberry Pi
$ sudo systemctl pab [email protected]
$ sudo reboot -h 0
Yog tias tsis tau ntsaws, ntsaws rau hauv FTDI USB rau txuas txuas
USB serial I/O cable (saib duab saum toj no). Lub kaum sab nrauv ntawm Raspberry Pi muaj tus pin 2. Cov kab sab nraud ze rau ntawm ntug yog txawm tias muaj tus lej lej (2, 4, 6), thiab kab sab hauv yog suav tus lej
- Hauv av = xaim dub, tus pin 06
- Tx = Yellow wire, pin 08
- Rx = Liab hlau, tus pin 10
Kauj ruam 10: Txiav txim siab USB Port
Txiav txim siab USB Port siv los ntawm USB-Serial adapter. Kuv MacBook siv lub nti los ntawm FTDI.
Qhib lub davhlau ya nyob twg qhov rai ntawm MacBook
Muaj ntau yam khoom siv hauv /dev. Siv qhov lus txib no txhawm rau txheeb xyuas lub cuab yeej (hauv qhov no, nws yog FT9314WH):
$ ls /dev/tty.*/dev/tty. Bluetooth-Incoming-Port /dev/tty.usbserial-FT9314WH
Nov yog lwm txoj hauv kev los tshawb pom:
$ ls /dev | grep FT | Cov grep twg
tty.usbserial-FT9314WH
Yog tias tsis ua haujlwm saum toj no, sim qhov no:
Ntxig USB cable rau hauv MacBook, thiab khiav:
$ ls /dev | grep twg
Unplug USB cable, tos ob peb feeb thiab khiav:
$ ls /dev | grep twg
Txheeb xyuas qhov sib txawv
Kauj Ruam 11: Qhib Terminal Window thiab Txuas rau Raspberry Pi
Qhib (lossis txuas ntxiv siv) lub qhov rai qhov rai ntawm MacBook.
Saib daim duab saum toj no thiab teeb tsa lub davhlau ya nyob twg qhov nyiam.
- Terminal, xaiv Nyiam, nyem Advanced tab
- xterm thiab vt100 ua haujlwm, tab sis ansi ua haujlwm zoo dua thaum siv nano
- Teeb Western ASCII hloov chaw unicode (UTF-8)
Hauv lub qhov rai davhlau ya nyob twg nkag mus:
$ screen /dev/tty.usbserial-FT9314WH 115200
Siv lub davhlau ya nyob twg qhov rai ntawm MacBook, nkag mus rau RPi: username = pi password = raspberry
Nco tseg: USB-serial cable tuaj yeem tso tus cim. Yog tias cov cim tau poob koj yuav tsis tau txais qhov hais kom sai, nyem Rov qab los yog nkag mus rau lub npe siv thiab nias Enter.
Yog tias hom rov tshwm sim, tom qab ntawv micro SD tsis tau teeb tsa kom raug. Pib dua.
- Kev Noj Qab Haus Huv Pi qhov sai rau cov neeg siv hauv paus # (ntawm raspbian hom rov qab siv # sai)
- Kev noj zaub mov Pi qhov kev hais daws ib txwm rau cov neeg siv pi yog $
Kauj Ruam 12: Ib txwm hloov kho thiab txhim kho
Ib txwm hloov kho thiab hloov kho dua tshiab.
- "apt-tau hloov tshiab" rub tawm cov npe pob tshiab los ntawm cov chaw khaws khoom tsim nyog.
- "apt-get upgrade" hloov kho cov pob khoom
- "apt-get autoremove" tshem cov pob khoom uas tsis xav tau ntxiv lawm
- Rov pib dua yog xaiv tau. Qee qhov kev pabcuam yuav tsum tau rov pib dua tom qab hloov kho dua tshiab. Rebooting yog kuv txoj kev tub nkeeg kom ntseeg tau tias txhua qhov kev pabcuam xav tau rov pib dua
Khiav cov lus txib hauv qab no:
$ sudo apt-tau hloov tshiab
$ sudo apt-tau nce qib $ sudo apt-tau autoremove $ sudo reboot
Yog tias muaj qhov yuam kev, txheeb xyuas tias Ethernet cable tau txuas rau.
Kauj Ruam 13: Nthuav Tawm Cov Ntaub Ntawv
raspi-teeb tsa muaj qhov kev xaiv los nthuav cov ntawv system kom siv tag nrho daim npav micro SD. Kuv tau txhawj xeeb nthuav dav cov ntaub ntawv system tau raug saib xyuas hauv dietpi-teeb tsa.
Txawm li cas los xij, los ntawm lub neej ntawd, "DietPi cov duab los ua ntej ua kom zoo nrog cov yam ntxwv zoo li tsis siv neeg kaw lus kaw lus."
Txhawm rau qhia cov ntaub ntawv kaw lus tau nthuav dav, khiav cov lus txib:
$ df -h
Ntawm DietPi, tsis tas yuav nthuav cov kab ke system.
Kauj Ruam 14: Tsis teb los tau: Tshem GUI
Yeem qib. Kuv cov haujlwm tsis siv GUI, yog li tshem nws. Tshem tawm GUI txuag txog 2MB ntawm kev cia thiab txhim kho kev ua haujlwm.
$ sudo apt-tau -purge tshem tawm 'x11-*'
$ sudo apt-tau --purge autoremove
Ntxiv hom turbo muaj qee qhov txiaj ntsig kev ua haujlwm wifi. Kho cov ntaub ntawv:
$ sudo nano /boot /cmdline.txt
Thiab ntxiv
smsc95xx.turbo_mode = Y, yog li nws zoo li:
dwc_otg.lpm_enable = 0 console = ttyAMA0, 115200 console = tty1 root =/dev/mmcblk0p2 rootfstype = ext4 elevator = hnub kawg fsck.repair = yog smsc95xx.turbo_mode = Y rootwait rootdelay = 10
CTRL-o, ENTER, CTRL-x kom txuag thiab tawm
Tom qab ntawd pib dua
$ sudo rov pib dua
Kauj ruam 15: Teeb Gmail
Kev xa ntawv muaj txiaj ntsig zoo rau kev tau txais ntawv ceeb toom thiab ceeb toom txog teeb meem ntawm Raspberry Pi.
Xyuas kom cov chaw khaws khoom tau hloov kho tshiab. Khiav cov lus txib:
$ sudo apt-tau hloov tshiab
Nruab SSMTP thiab xa ntawv xa tuaj:
$ sudo apt-tau nruab ssmtp
$ sudo apt -tau nruab mailutils -y
Kho cov ntaub ntawv teeb tsa SSMTP:
$ sudo nano /etc/ssmtp/ssmtp.conf
raws li nram no:
hauv paus = koj-gmail-account♣@gmail.com
mailhub = smtp.gmail.com: 587 hostname = ♣ your-hostname ♣ AuthUser=♣your-gmail-account♣@gmail.com AuthPass = ♣ your-gmail-password ♣ UseSTARTTLS = YOG
CTRL-o, ENTER, CTRL-x kom txuag thiab tawm
Kho cov ntaub ntawv SSMTP aliases:
$ sudo nano/etc/ssmtp/revaliases
Tsim ib kab rau txhua tus neeg siv hauv koj li kab ke uas tuaj yeem xa email. Piv txwv li:
hauv paus: ♣your-gmail-account♣@gmail.com: smtp.gmail.com: 587
pi:-koj-gmail-account♣@gmail.com: smtp.gmail.com: 587
Teem cov kev tso cai ntawm SSMTP cov ntaub ntawv teeb tsa:
$ sudo chmod 664 /etc/ssmtp/ssmtp.conf
Kauj Ruam 16: Nrhiav IP Chaw Nyob Ntawm Lub Npe
Kuv lub tsev siv tshuab hluav taws xob hauv tsev xav tau nkag mus rau kuv cov txiv pos nphuab. Txawm li cas los xij, DHCP faib IP chaw nyob tuaj yeem hloov pauv. Yog li, kuv tau sim muab IP chaw nyob zoo li qub. Kuv tsis txaus siab nrog cov tshuaj no. Tom ntej no, Kuv sim siv nmap txhawm rau nrhiav tus IP chaw nyob ntawm lub npe hostname, tab sis qhov no zoo li koom nrog. Kuv tau teeb tsa DNS server, thaum kuv tau hla txoj kev daws teeb meem hauv qab no.
Nws yooj yim dua rau xa mus rau raspberry pi los ntawm nws ♣ hostname ♣.local.
Yog tias koj teeb tsa avahi-daemon siv dietpi-teeb tsa thiab hloov lub npe hostname, tom qab ntawd koj tuaj yeem hla mus rau qib tom ntej
Nruab multicast DNS.
$ sudo apt-tau nruab avahi-daemon
$ hostname -I
192.168.1.100
Hloov lub hostname
$ sudo nano /etc /hosts
Lub hostname yuav tsum default rau dietpi. Hloov kab kawg ntawm dietpi mus rau qhov tshiab "hostname"
192.168.1.100 ♣ hostname ♣
CTRL-O, CTR-X, ENTER kom txuag thiab tawm ntawm tus editor
$ sudo nano /etc /hostname
"Lub npe hostname"
CTRL-O, CTR-X, ENTER kom txuag thiab tawm ntawm tus editor
Cog lus hloov pauv rau hauv kab ke
$ sudo /etc/init.d/hostname.sh
$ sudo rov pib dua
Lub rooj vag tsis teeb tsa kom raug.
$ sudo txoj kev -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
Khiav cov lus txib, qhov twg 192.168.1.254 yog tus IP chaw nyob ntawm koj li ISP lub qhov rooj:
$ sudo txoj kev ntxiv default gw 192.168.1.254
$ sudo route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Siv Iface 0.0.0.0 192.168.1.254 0.0.0.0 UG 0 0 0 wlan0 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
Kom meej meej, Kuv plam qee yam hauv kev teeb tsa.
$ miv/etc/network/interfaces
# Wifi lub qhov rooj 192.168.0.1
Kauj ruam 17: Backup Micro SD Card
Thaum Raspberry Pi tau teeb tsa, tom qab ntawd thaub qab cov duab. Siv daim duab no los tsim txoj haujlwm tom ntej.
Tsis tas li, thaub qab txoj haujlwm thaum nws ua tiav. Yog tias muaj dab tsi mus tsis raug nrog daim npav SD, tom qab ntawd nws yog qhov yooj yim los kho nws.
Kaw lub Raspberry Pi
$ sudo kaw –h 0
Tos kom txog thaum daim npav kaw, thiab tom qab ntawd tshem lub hwj chim tawm, thiab tom qab ntawd tshem daim npav micro SD
Ntxig daim npav micro SD rau hauv SD Adapter, thiab tom qab ntawd ntxig daim npav SD rau hauv MacBook
Ntawm MacBook siv cov lus qhia los ntawm The Pi Hut nrog kev hloov kho raws li hauv qab no:
Qhib lub dav hlau qhov rai
Hloov mus rau cov npe uas muaj cov duab raspbian
$ cd ♣ your-macbook-image-directory ♣
Txheeb xyuas daim disk# (tsis muab faib) ntawm koj daim npav SD xws li disk2 (tsis disk2s1). Los ntawm diskutil cov zis, = 4. Lub disk# yuav tsum yog FAT_32. Hauv cov npe hauv qab no, ♣ micro-SD-card-disk#♣ = 2
$ daim ntawv teev npe
/dev/disk0 #: HOM NPE SIZE IDENTIFIER 0: GUID_partition_scheme *160.0 GB disk0 1: EFI EFI 209.7 MB disk0s1 2: Apple_HFS Cartwright 159.2 GB disk0s2 3: Apple_Boot Recovery HD 650.0 MB disk0s3/dev/disk1 #: HOM NPE SIZE: Apple_partition_scheme *2.5 GB disk1 1: Apple_partition_map 1.5 KB disk1s1 2: Apple_HFS Hnub nyoog ntawm Empires III 2.5 GB disk1s2 /dev /disk2 #: HOM NPE SIZE IDENTIFIER 0: FDisk_partition_scheme *15.5 GB disk2 1: Windows_FAT_32 khau raj 58.7 MB disk2.1 GB disk2s2 /dev /disk4 #: HOM NPE SIAB IDENTIFIER 0: Apple_partition_scheme *18.1 MB disk4 1: Apple_partition_map 32.3 KB disk4s1 2: Apple_HFS Flash Player 18.1 MB disk4s2
TSEEM CEEB: Nco ntsoov tias koj siv qhov raug ♣ micro-SD-card-disk#♣-yog tias koj nkag mus tsis raug ♣ micro-SD-card-disk#♣, koj yuav kawg so tawm koj lub hard disk!
Cov lus piav qhia yuav tsum yog qee yam xws li: ♣ piav qhia ♣ = myDietPi_v104_RPi-jessie
Luam daim duab los ntawm koj daim npav SD. Xyuas kom lub npe duab thiab raug:
$ sudo dd yog =/dev/disk ♣ micro-SD-card-disk#♣ of = ♣ your-macbook-image-directory ♣/SDCardBackup ♣ description im.img
CTRL-t kom pom cov xwm txheej ntawm kev theej.
Thaum tsim cov duab, nyem cov duab. Ib daim duab tshiab tsim 8GB yuav ua rau qis dua 2GB.
$ gzip ♣ piav qhia im.img
Txhawm rau decompress siv:
$ gunzip ♣ piav qhia ♣.img.gz
Thaum ua tiav, unmount SD Card:
$ diskutil unmountDisk /dev /disk ♣ micro-SD-card-disk#♣
Tshem SD adapter los ntawm MacBook thiab tshem daim npav micro SD los ntawm adapter
Ntxig micro SD Card hauv Raspberry Pi
Ntawm qhov haujlwm tom ntej, siv uncompress cov duab no thiab hla ntau qib hauv cov lus qhia no.
Thiab koj ua tiav!
Kauj Ruam 18: Cov Ntawv Ntxiv: Ua Ntej Qhov Tseem Ceeb
Cov yuam sij ua ntej tsim nyob ntawm Raspberry Pi's MAC thiab tsis yog tshwj xeeb rau daim npav micro SD. Cov no yuav tsum tau teeb tsa rau txhua lub cuab yeej.
Siv tus yuam sij tsim ua ntej yuav tsum tau hloov pauv mus rau/etc/network/interfaces, yog li nws siv wpa_supplicant/conf. Cov lus qhia rau teeb tsa Wi-nkaus qhia yuav ua li cas thiaj ua tau li no.
Tsim qhov tsim ua ntej PSK qhov tseem ceeb. Nkag mus rau Raspberry Pi thiab khiav cov lus txib:
$ wpa_passphrase ♣ your-ssid ♣ ♣ your-pass-phrase ♣
tso tawm:
network = {
ssid = "♣ your-ssid ♣" psk = ♣ koj tus lej tsim ua ntej ♣}
/etc/wpa_supplicant/wpa_supplicant.conf
Txhua qhov ntsuas hauv/etc/network/interfaces file tau ntsuas.
Cov ntaub ntawv wpa_supplicant.conf yuav tsum raug lossis wifi yuav tsis ua haujlwm.
Nkag mus rau hauv raspberry pi thiab khiav cov lus txib:
$ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
Kho cov ntawv kom zoo li no:
ctrl_interface = DIR =/var/run/wpa_supplicant GROUP = netdev
update_config = 1 network = {ssid = "♣ your-ssid ♣" # siv tus lej tsim ua ntej psk = ♣ your-pre-generated-key ♣ # yog tsim cov qauv txheem rau ntau txoj haujlwm, tom qab ntawd siv kab lus # hloov chaw tsim qhov tseem ceeb # tus tsim qhov tseem ceeb nyob ntawm Raspberry Pi's MAC # psk = "♣ koj cov kab lus dhau ♣" # qhia kom meej meej key_mgmt = wpa_psk proto = rsn # CCMP yog qhov raug encryption siv rau WPA-PSK pairwise = CCMP pab pawg = CCMP }
CTRL-o los sau cov ntawv
ENTER kom paub meej tias sau
CTRL-x kom tawm nano editor
Kauj Ruam 19: Cov ntawv txuas ntxiv: Ntxiv Cov Neeg Siv Khoom Certs rau Web Servers
Kuv cov phiaj xwm tau tsom mus rau kev siv tshuab hauv tsev, thiab thaum nws muaj txiaj ntsig rau kuv kom nkag tau, Kuv tsis xav kom lub ntiaj teb tswj hwm kuv lub tsev. Ib tus neeg rau zaub mov/tus neeg siv daim ntawv pov thawj ua ke tiv thaiv cov neeg siv tsis tau tso cai los ntawm kev nkag mus.
Ua raws li cov lus qhia no ntxiv certs: Txwv Kev Nkag Mus Rau Raspberry Pi Web Server
Kauj Ruam 20: Cov Ntawv Ntxiv: RSA Qhov Teeb Meem Tseem Ceeb
Yog tias lub npe host cuam tshuam nrog mac hloov, tom qab ntawd kuv MacBook qhia cov lus hauv qab no thaum kuv sim nkag mus.
$ ssh [email protected]
@ CEEB TOOM: REMOTE HOST IDENTIFICATION HAUV TSHAJ! @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@ Nws yog qhov ua tau uas qee tus neeg ua qee yam tsis zoo! Qee tus neeg tuaj yeem mloog koj tam sim no (tus txiv neej-hauv-nruab nrab nres)! Nws kuj tseem ua tau tias tus yuam sij tus tswv tau nyuam qhuav raug hloov pauv. Cov ntiv tes rau tus lej RSA xa los ntawm tus tswv tsev nyob deb yog eb: 98: 60: 31: 52: ac: 7b: 80: 8e: 8f: 41: 64: c1: 11: f9: ef. Thov hu rau koj tus thawj tswj hwm kab ke. Ntxiv qhov tseem ceeb tus tswv cuab hauv /Users/jeffcartwright/.ssh/known_hosts kom tshem tawm cov lus no. Ua txhaum RSA qhov tseem ceeb hauv /Users/-your-username♣/.ssh/known_hosts:16 RSA tus tswv tseem ceeb rau 192.168.1.94 tau hloov pauv thiab koj tau thov nruj soj ntsuam. Tus tuav pov thawj yuam kev ua tsis tau tejyam.
Muaj qhov kho tau yooj yim.
Qhib lub qhov rai MacBook thiab lub vi editor
$ sudo vi /Users/-your-username♣/.ssh/known_hosts
Nkag mus nrog koj tus password MacBook.
Thawj qhov nkag yog kab 1, nias tus xub xub nqis (16 - 1) kom txog thaum koj nyob ntawm 192.168.1.94, lossis tus IP dab tsi cov lus qhia.
Hom (rho tawm kab, sau cov ntawv, thiab tawm):
dd ua
w: twg! q: siv!
Tam sim no, tus ID nkag mus yuav tsum ua haujlwm
$ ssh [email protected]
Yog nug kom txuas txuas ntxiv, lees paub los ntawm kev ntaus yog.
Qhov tseeb ntawm tus tswv '192.168.1.94 (192.168.1.94)' tsis tuaj yeem tsim tsa.
RSA tus ntiv tes tseem ceeb yog eb: 98: 60: 31: 52: ac: 7b: 80: 8e: 8f: 41: 64: c1: 11: f9: ef. Koj puas paub tseeb tias koj xav txuas txuas ntxiv (yog/tsis)? yog Ceeb Toom: Ntxiv mus tas li '192.168.1.94' (RSA) rau hauv cov npe ntawm cov tswv paub.
Kauj Ruam 21: Cov Ntawv Ntxiv: Cov lus qhia
Cov ntaub ntawv:
- Raspberry Pi Micro SD Phaib
- RPi.org SD Card Cov Qauv Ntsuas
- elinux.org rau micro SD Card tus qauv
- Txuas mus rau Raspberry Pi micro SD daim ntawv qhia
- Txuas rau Raspberry Pi tau tshaj micro SD Card
- RaspberryPi.org hlawv duab ntawm daim npav micro SD
- rip-clone yog tsab ntawv bash los sau rau hauv cov ntaub ntawv uas tsis tau nkag mus rau USB SD card
- Raspberry Pi.org fourdee4d txoj kev koom tes rau xov
Kauj ruam 22: Cov ntawv txuas ntxiv: Hloov kho tshiab
Muaj peev xwm txhim kho yav tom ntej:
-
tshem FTDI cov kauj ruam thiab kho cov ntaub ntawv ntawm daim npav microSD thaum nws tseem txuas rau hauv MacBook
Tsiv cov FTDI cov kauj ruam mus rau daim ntawv ntxiv
- Nruab e2fsprogs ntawm MacBook
- Ntxig daim npav micro SD hauv MacBook
- Unmount micro SD daim npav
-
Xoom sau cov duab ua ntej zaws nws:
e2fsck -E pov tseg src_fs
- dd daim duab thiab tom qab ntawd gzip
- Sib piv xoom cov duab kom tsis xoom puv
- Qhov no puas tsim nyog siv zog?
10 Peb 2017
Tau hloov pauv kom ua raws li DietPi nruab txheej txheem tshiab kawg
11 Hlis ntuj nqeg 2016
- Tshem Cov Ntawv Ntxiv ntawm nmap thiab hais qhia IPs
- Siv hostname.local
22 nov 2016 nr
- Hloov kho rau v136 ntawm DietPi
- Hloov tshiab rau Raspberry Pi 3
Kauj ruam 23: Cov ntawv txuas ntxiv: Kev daws teeb meem
Kauj Ruam 24: Cov Ntawv Ntxiv: Tsis Siv Neeg Nruab Nrab Script
Yuav tsum tsim cov ntawv tsis muaj neeg saib xyuas uas siv cov kauj ruam 5-15. Upload qhov chaw rau github. Siv wget txhawm rau rub cov khoom siv raw los ntawm github, thiab tom qab ntawd ua tiav tsab ntawv. Tawm hloov pauv tus tswv tsev lub npe thiab tus lej nkag mus kom txog thaum tom qab UAI tsab ntawv. Tej zaum yuav tsum tau khaws lub xeev thiab ua ntau qhov pib dua.
Pom zoo:
Teeb Raspberry Pi 4 Los Ntawm Laptop/pc Siv Ethernet Cable (Tsis Saib Xyuas, Tsis Muaj Wi-Fi): 8 Kauj Ruam
Teeb Raspberry Pi 4 Los Ntawm Laptop/pc Siv Ethernet Cable (Tsis Saib Xyuas, Tsis Muaj Wi-Fi): Hauv qhov no peb yuav tsum ua haujlwm nrog Raspberry Pi 4 Qauv-B ntawm 1Gb RAM rau teeb tsa. Raspberry-Pi yog ib lub computer pawg thawj coj saib siv rau lub hom phiaj kev kawm thiab DIY cov phiaj xwm nrog tus nqi pheej yig, xav tau lub zog hluav taws xob ntawm 5V 3A.Operating Systems nyiam
Yuav Ua Li Cas Teeb Raspberry Pi Tsis Saib Xyuas thiab Keyboard: 7 Kauj Ruam
Yuav Ua Li Cas Teeb Raspberry Pi Tsis Muaj Tus Saib Xyuas thiab Keyboard: Raspberry Pi yog lub khoos phis tawj me me uas ua haujlwm Linux raws li kev ua haujlwm hu ua Raspbian. Kuv yuav siv kuv li Raspberry Pi 3 B+ nrog Raspbi
Teeb Raspberry Pi Tsis Saib Xyuas lossis Keyboard: 18 Cov Kauj Ruam
Teeb Raspberry Pi Tsis Muaj Tus Saib Xyuas lossis Keyboard: NOOBS xav tau tus saib xyuas, keyboard thiab nas, uas ntxiv ~ $ 60 (USD) lossis ntau dua hauv tus nqi. Txawm li cas los xij, ib zaug Wi-nkaus ua haujlwm, cov cuab yeej no tsis xav tau ntxiv lawm. Txhua lub sijhawm kuv pib ua haujlwm tshiab Raspberry Pi, Kuv nqa lub monitor, keyboard thiab nas thiab pom
Kev Nyuaj Siab: Kev Saib Xyuas thiab Saib Xyuas Ntxiv rau Kev Teeb Meem: 9 Cov Kauj Ruam
Hard Drive: Kev Saib Xyuas thiab Kev Saib Xyuas Ntxiv Teeb Meem: Daim duab saum toj no yog Hard Drive ib txwm muaj. Cov no yog cov tsav tsheb feem ntau siv niaj hnub no, tab sis tsis tas yuav nrawm tshaj. Tib neeg siv tus tsav no rau nws tus nqi qis dua gigabyte thiab lub neej ntev dua. Phau ntawv qhia no yuav qhia koj txog qhov sib txawv
Teeb Raspberry Pi Tsis Muaj Tus Saib Xyuas Sab Nraud lossis Keyboard: 7 Kauj Ruam
Teeb Raspberry Pi Tsis Muaj Tus Saib Xyuas Sab Nraud lossis Keyboard: Koj tsis xav tau tus saib sab nraud, keyboard, thiab nas kom pib nrog Raspberry Pi, muaj lwm txoj kev daws teeb meem - hom tsis muaj hau