Cov txheej txheem:
- Kauj Ruam 1: Kev npaj - Cov lus qhia thiab cov npe khoom lag luam
- Kauj Ruam 2: Mounting Brackets
- Kauj Ruam 3: Tie Down Cables
- Kauj Ruam 4: Txhim Kho Cov Hluav Taws Xob
- Kauj Ruam 5: Txhim Kho Txhua Yam Ntawm Phab Ntsa
- Kauj Ruam 6: Clamping Down Cov Kab Tawm
- Kauj Ruam 7: Txhim Kho NOOBS ntawm Raspberry Pi
- Kauj Ruam 8: Teeb Raspbian - Txheej txheem cej luam
- Kauj Ruam 9: Teeb Network Kev Sib Txuas (LAN/Wifi)
- Kauj ruam 10: Teeb VNC
- Kauj Ruam 11: Ua VNC Khau Yeej
- Kauj ruam 12: Hom HDDs
- Kauj Ruam 13: Muaj HDDs Tau Txais Txuas Thaum Pib
- Kauj Ruam 14: Teeb Samba Server
- Kauj Ruam 15: Teeb Cov Ntaub Ntawv Backup System
- Kauj Ruam 16: Zoo Paub Txog Kev Ua Haujlwm Linux
Video: Lwm Pi ntawm Phab Ntsa: 16 Cov Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Phau ntawv qhia tsis tau qhia no qhia koj li cas los tsim NAS (Network-Attached Storage) siv Raspberry Pi (RasPi) thiab ob HDDs. Phau ntawv qhia no yuav tsum muab cov lus qhia ntxaws ntxaws txog yuav ua li cas
- mount RasPi, ob lub HDDs, thiab tag nrho cov khoom siv hluav taws xob ntawm lub rooj tsavxwm, uas tom qab ntawd tuaj yeem teeb tsa ntawm phab ntsa hauv koj lub tsev
-
program RasPi, xws li nws ua haujlwm li
- a NAS
- thiab / lossis lub tshuab luam ntawv server (yog xav tau)
- cuam tshuam nrog Linux thiab qhia koj qee cov lus txib yooj yim (yog tias koj tsis tau ua haujlwm nrog nws ua ntej (ib yam li nws tsis tau)
Qhov kev qhia no tau muab faib ua 4 tshooj hauv qab no:
- HW-teeb tsa
- Debian/Linux Pib
- Kev teeb tsa thiab NAS teeb tsa
- Ua RasPi system thaub qab
- Qee cov lus qhia thiab cov lus qhia
Kauj Ruam 1: Kev npaj - Cov lus qhia thiab cov npe khoom lag luam
Ua ntej peb pib, qee qhov kev qhia tseem ceeb uas yuav ua rau koj tsis txhob ntsib teeb meem:
- Hint thib 1: Ua ntej koj yuav lub thawv ntim sab nraud sab nraud nrog SATA rau USB tus tswj hwm -> txheeb xyuas yog tias tus tswj hwm tuaj yeem tswj hwm qhov ntim cia uas koj xav siv! Vim li cas: Kuv siv HDDs uas zaum hauv tsev (zoo li rooj plaub rau siv HDD ua tus tsav sab nraud) uas muaj SATA-rau-USB tswj. Muaj ntau tus tswj hwm sib txawv, qhov uas lawv tshwj xeeb tshaj yog sib txawv hauv HDD ntim ntim uas lawv tuaj yeem ua tau. Kuv siv 4TB-HDDs thiab thaum xub thawj kuv yuav lub maub los uas tuaj yeem ua haujlwm tsuas yog txog 2TB, yog li kuv yuav tsum hloov nws
- Qhov thib ob hint: Nco ntsoov tias lub zog siv hluav taws xob uas koj xav kom muaj zog koj li RasPi tuaj yeem tsawg kawg muab 5VDC thiab 2A.
Lus ceeb toom tseem ceeb: Tsis yog kuv thiab tsis yog instruct.com.com yog lub luag haujlwm rau cov ntsiab lus tom qab cov kab ntawv txuas kuv tau tso rau hauv cov lus qhia no.
Tom ntej no kuv xav muab daim ntawv yuav khoom me me rau cov khoom koj xav tau:
- Raspberry Pi (yuav tsum ua haujlwm nrog Version 2 lossis 3, Kuv siv RasPi Version 2)
- 8 GB SD daim npav nrog tsawg kawg chav kawm 4 nrawm
- ib lub tsev rau RasPi
- lub hwj chim, 5VDC / 2A, nrog lub micro-USB txuas
- 2x sab nraud HDDs (lossis SSDs) nrog USB txuas lossis 2x HDDs (lossis SSDs) nrog SATA txuas
- 2x vaj tsev nrog SATA rau USB tus tswj hwm (tsis xav tau yog tias koj muaj sab nraud HDD nrog lub qhov hluav taws xob USB)
- lub rooj ntoo ntoo txog 50 cm x 30 cm thiab tuab 2 cm, xim yog koj xaiv;)
- lub hwj huam hluav taws xob nrog tsawg kawg 3 qhov hluav taws xob (qhov zoo tshaj yog lub hwj huam hluav taws xob muaj xim zoo ib yam li koj lub rooj tsavxwm)
- 5 txog 6 cov hlau hlau (uas koj tuaj yeem yuav tau ntawm koj lub khoos phis tawj hauv zos / DIYstore (piv txwv li zoo li no) Cov kab zauv yuav tsum yog txog tus ntiv tes xoo nrog qhov dav thiab lawv yuav tsum muaj lub qhov ntsia hlau
- hlau perforated daim kab xev (tsuas yog yam ntawm spool ntawm no)
- 12 tus ntsia hlau uas muaj qhov ntev txog 50-80% ntawm lub rooj tsavxwm nrog (hauv kuv qhov xwm txheej txog 1, 5 cm)
- 1m ntawm txoj hlab ntsws me me uas haum rau ntawm cov khoom sib dhos thiab cov kab xev hlau
- Ethernet (LAN) cable
- 1 lub hnab ntawm Sugru (los npog cov ntug ntawm lub qhov thiab ua kom nws zoo nkauj)
- 1 lub hnab nrog tsawg kawg 50 kab txuas
- 1 cov ntsia hlau tsis zoo nrog tsawg kawg 50 daim, cov ntsia hlau yuav tsum tsis txhob ntev dua 1, 5 cm (!)
- 1 lub hnab ntawm ob-tivthaiv nplaum
- xaiv tau: 10 muaj ntaub qhwv (piv txwv li cov no)
Kuj rau Software teeb tsa koj yuav xav tau
- ib qho screen uas tuaj yeem txuas nrog HDMI (tseem tuaj yeem yog koj lub TV)
- ib tug USB keybaord
- usb mus
Kauj Ruam 2: Mounting Brackets
- Txiav 4 daim nrog txhua txog 8 cm los ntawm cov kab xev hlau ua kom tawg.
- Khoov daim kab xev xws li ib qho haum nyob ib puag ncig ntawm txhua rooj plaub HDD thiab ib ncig ntawm RasPi
- Teem HDD cov xwm txheej ntawm lub rooj tsavxwm raws li koj xav tau (piv txwv li kuv tau ua ntawm kuv lub rooj tsavxwm) thiab muab cov kab zauv tso rau hauv qab ntawm HDD cov xwm txheej thiab RasPi, tab sis tsuas yog nyob rau sab qis (uas yog sab uas yuav tig mus rau sab tom qab, thaum lub rooj tsavxwm tau dai rau ntawm phab ntsa). Cov teeb meem HDD thiab RasPi yuav sawv ntawm cov kab zauv tom qab.
- Kos rau txoj hauj lwm ntawm kab zauv. Daim kab xev tuaj yeem nyob ze qhov chaw txij li nws tuaj yeem khoov tom qab ntawm qhov yooj yim heev. Tom qab ntawd tshem tawm cov teeb meem HDD thiab Pi.
- Muab lub raj me me tso rau ntawm cov khoom sib dhos thiab cov kab xev hlau thiab xuas lub qhov hla los, qhov ntsia hlau qhov nyob qhov twg. Ceev faj ua tsuas yog lub qhov me me, vim tias lub qhov yuav nthuav dav thaum cua sov lub raj uas nqaim.
- Ua kom sov lub raj me me nrog rab phom cua kub lossis lub teeb sib zog.
- Mount cov nkhaus (tam sim no tau npog hauv cov raj me me) ntawm lub rooj tsavxwm nrog cov ntsia hlau. Tam sim no ua tib yam rau daim kab xev perforated hlau.
- Khoov daim kab xev perforated hlau nyob ib puag ncig sab saud ntawm HDD rooj plaub thiab RasPi
Tam sim no koj muaj lub rooj tsavxwm nrog RaspBerry Pi thiab ob lub HDDs ntsia ntawm nws.
Rau qhov khawb tsawg dua ntawm rooj plaub thiab tsis muaj suab nrov nrov los ntawm HDDs koj tseem tuaj yeem tso qee qhov ncoo rau saum cov ntsia hlau.
Kauj Ruam 3: Tie Down Cables
Lub tswv yim hauv cov kauj ruam no yog kom muaj cov hlua zais tom qab lub rooj tsavxwm.
- Laum 2 qhov hla lub rooj tsavxwm txog 3 - 4 tus ntiv tes xoo qhov dav los ntawm qhov chaw USB thiab lub zog nkag ntawm HDDs yog qhov uas cov xaim hluav taws xob tuaj yeem hla dhau lub qhov.
- Nco ntsoov tias USB txuas thiab lub txuas hluav taws xob tuaj yeem hla lub qhov nrog ntau qhov chaw sab laug (li 3-4 hli ntawm txhua sab)
- Npog lub qhov nrog Sugru thiab thaum koj ua qhov ntawd ib txwm tshawb xyuas yog tias ob qho txuas txuas tseem tuaj yeem hla lub qhov yooj yim (tom qab thaum Sugru tau qhuav nws yuav nyuaj rau nthuav lub qhov dua)
- Tom qab Sugru tau qhuav lawm, muab tag nrho cov khoom sib txuas los ntawm
- Tam sim no koj yuav tsum kaw cov kab txuas ntxiv ntawm sab nraub qaum. Kuv paub tseeb tias koj tuaj yeem ua haujlwm zoo dua li kuv tau ua hauv daim duab:)
Kauj Ruam 4: Txhim Kho Cov Hluav Taws Xob
Tam sim no teeb tsa lub hwj huam hluav taws xob nrog ob daim ntawv nplaum ua ke ntawm lub rooj tsavxwm. Koj tuaj yeem roughen cov nplaim hluav taws xob thiab lub rooj tsavxwm yog tias koj xav tau.
Thiab yog: Koj xav tau ob yam sib xyaw ua ke, vim tias tsis li ntawd koj lub hwj huam hluav taws xob yuav poob txhua lub sijhawm;)
Kauj Ruam 5: Txhim Kho Txhua Yam Ntawm Phab Ntsa
- Tam sim no txiav lwm 2 daim nrog 10 cm txhua los ntawm cov kab xev hlau perforated
- Muab qee lub raj tso rau ntawm daim kab xev.
- ntsia hlau txhua daim kab xev ntawm ib sab tom qab ntawm lub rooj tsavxwm (ib yam li hauv daim duab)
- ntsia hlau rau lwm qhov kawg rau phab ntsa (rau phab ntsa pob zeb ua ntej koj yuav tsum tau ntsaws ntsaws, ib yam li kuv yuav tsum tau)
Kauj Ruam 6: Clamping Down Cov Kab Tawm
Thaum kawg kaw qhov seem ntawm cov kab hluav taws xob uas khiav los ntawm pawg thawj coj mus rau lub qhov hluav taws xob thiab lub router/hloov.
Kauj Ruam 7: Txhim Kho NOOBS ntawm Raspberry Pi
Ua ntej peb pib ua haujlwm Raspberry Pi peb yuav tsum tau tso lub tshuab ua haujlwm (OS) ntawm SD daim npav uas yuav nkag mus rau hauv RasPi.
Peb yuav siv qhov yooj yim dua ntawm Raspbian hu ua "NOOBS". Qhov no yog qhov yooj yim dua rau nruab vim tias yuav muaj tus kws pab tswv yim qhia koj txog cov txheej txheem.
Koj kuj tseem yuav xav nyeem cov lus qhia rau kev teeb tsa ntawm no.
- Rub tawm qhov tseeb ntawm NOOBS ntawm https://www.raspberrypi.org/downloads/noobs/Kuv qhia koj siv tus lej zip ntawm "Offline thiab teeb tsa network" ib qho.
- Extract zip ntaub ntawv
- Format SD card kom tiav
- Luam tag nrho cov ntaub ntawv rho tawm los ntawm zip rau SD card.
- Muab daim npav SD tso rau hauv RasPi
- Txuas lub vijtsam rau HDMI chaw nres nkoj thiab cov keyboard thiab nas rau USB chaw nres nkoj.
- Hwj chim rau Raspi.
Tom qab ntawd
- ua raws li cov lus qhia teeb tsa.
- xaiv "Raspbian" thiab tsis txhob hnov qab xaiv koj lub tebchaws thiab cov keyboard hauv qab (nws yog yam nyuaj los hloov nws tom qab nrog cov keyboard tsis raug)
Kauj Ruam 8: Teeb Raspbian - Txheej txheem cej luam
Ua ntej peb tuaj yeem pib siv peb RasPi kom raug peb yuav tsum teeb tsa qee yam. Piv txwv li koj yuav tsis xav siv lub vijtsam cais txhua lub sijhawm. Lwm txoj hauv kev yog VNC, uas tso cai rau koj los tswj RasPi nyob deb ntawm koj lub PC. Cov theem hauv qab no yuav yog:
- Teeb tsa lub network connetions (LAN/Wifi)
- Teeb tsa VNC *)
- Ua kom VNC khau raj cia
- Format HDDs mus rau qhov ua tau zoo dua linux file system (ext4) thiab tua cov ntawv sau tub nkeeg.
- Muaj HDDs tau teeb tsa thaum pib (txuas lawv cov software ntse rau Raspbian)
- Teeb tsa Samba server (txheej txheem uas tso cai rau koj nkag mus rau HDDs cov ntsiab lus los ntawm kev deb ntawm lub PC)
- Teeb tsa cov ntaub ntawv thaub qab system nrog thib ob/thaub qab HDD.
*) Nco tseg: VNC (Virtual Network Computing) ua rau koj tswj hwm koj li RasPi ntawm kev deb ntawm koj lub PC. Koj yuav pom txhua yam uas yuav pom yog tias lub vijtsam txuas nrog, koj muaj kev tswj tus nas thiab cov keyboard … txhua yam. Tsuas yog koj tab tom zaum ntawm koj lub PC tej zaum qhov chaw sib txawv kiag li.
Txij li koj xav kom koj RasPi nyob ntawm phab ntsa tsis muaj lub vijtsam, muaj VNC yog qhov tseem ceeb.
Kauj Ruam 9: Teeb Network Kev Sib Txuas (LAN/Wifi)
Ib phau ntawv qhia zoo txog yuav teeb tsa koj li LAN / Wifi kev sib txuas tuaj yeem pom ntawm no.
Txhawm rau qhia Raspbian hom kev sib txuas twg koj xav siv koj yuav tsum sau nws hauv cov ntawv tshwj xeeb. Cov teeb tsa hauv qab no teeb tsa LAN txuas. Yog tias koj xav teeb tsa Wifi siv cov chaw piav qhia ntawm no.
Qhib lub plhaub thiab ntaus hauv
sudo nano/etc/network/interfaces
Uas qhib cov ntaub ntawv "cuam tshuam" hauv kab ntawv "nano". Hauv tus editor sau kab hauv qab no
auto hlo
iface lo inet loopback iface eth0 inet dhcp hostname "myRasPi" # "myRasPi" tuaj yeem pauv nrog lub npe uas koj xaiv tso cai-hotplug wlan0 iface wlan0 inet dhcp wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf iface default inet dhc
(Tom qab txhua # ua raws cov lus pom). Tom qab ntawv txuag thiab tawm nrog "Ctrl + X" thiab "Enter".
Tam sim no peb yuav tsum muab peb cov ntaub ntawv pov thawj rau LAN/Wifi txuas. Yog li koj yuav tsum qhib
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
thiab muab tso rau hauv koj daim ntawv pov thawj. Hloov "YOURSSID" nrog lub npe ntawm koj li LAN/Wifi network thiab "YOURPASSWORD" nrog tus lej network sib xws. Huag thiab hloov lub tebchaws yog tias tsim nyog:)
lub teb chaws = DE
ctrl_interface = DIR =/var/run/wpa_supplicant GROUP = netdev update_config = 1 network = {ssid = "YOURSSID" psk = "YOURPASSWORD" # hom kev cai tuaj yeem yog RSN (rau WP2) thiab WPA (rau WPA1) proto = RSN # ib txwm siv RSN # Kev tswj hwm tus yuam sij hom key_mgmt = WPA-PSK # Pairwise tuaj yeem yog CCMP (rau WPA2) thiab TKIP (rau WPA1) pairwise = CCMP # Kev tso cai xaiv yuav tsum qhib rau ob qho WPA1/WPA2 auth_alg = Qhib
}
Tus so ntawm qhov teeb tsa yuav tsum yog raws li tau piav qhia saum toj no. Tshwj xeeb tshaj yog "pairwise = CCMP" thiab "proto = RSN".
Kauj ruam 10: Teeb VNC
Lwm cov lus qhia zoo txog kev teeb tsa VNC yog Guide1, Guide2 thiab Guide3.
Ua ntej koj nruab VNC software koj yuav tsum zaum ua qhov hloov tshiab:
sudo apt-tau hloov tshiab && apt-tau upgrade
Tom qab ntawd rub tawm thiab teeb tsa "tightVNCserver" app
sudo apt-tau nruab tightvncserver
Tom qab ua tiav, teeb tus password rau VNC server no
vncpasswd
uas yuav nug tom qab ntawm koj lub PC thaum koj nkag mus rau RasPi ntawm cov chaw taws teeb.
Txhawm rau ntsuas seb VNC server twb ua haujlwm lawm, hu rau nruj VNC server ntu ntawm RasPi nrog
tightVNCserver
Tam sim no mus rau koj lub PC thiab rub tawm tus tuav nruj VNC los ntawm no thiab nruab nws (ntawm kev teeb tsa koj tuaj yeem tshawb xyuas qhov "tightVNCserver" xaiv, koj yuav tsis xav tau ntawm koj lub PC).
Koj tuaj yeem tshawb xyuas hauv Windows lossis ntawm koj lub router uas IP-Chaw nyob koj RasPi muaj (yog tias koj ua haujlwm nrog DHCP). Tom qab ntawd pib TightVNC-Viewer ntawm koj lub PC thiab ntaus tus IP chaw nyob ntawm RasPi tom qab ntawv nyuv thiab tom qab ntawd tus lej chaw nres nkoj uas feem ntau yog 5901.
Piv txwv: PasPi IP chaw nyob yog 192.168.1.50 ces tus tswv tsev nyob deb yog 192.168.1.50:5901.
Koj yuav tsum muaj peev xwm pom qhov screen ntawm koj RasPi.
Kauj Ruam 11: Ua VNC Khau Yeej
Peb tau pib VNC tab sis yog tias koj rov pib dua RasPi qhov kev sib tham yuav ploj mus thiab koj tsis tuaj yeem txuas rau koj li RasPI ntawm qhov chaw deb ntawm koj lub PC ntxiv lawm.
Txhawm rau ua kom VNC server sib ntsib rau pib rov pib dua koj yuav tsum rub tawm tsab ntawv ntawm no, uas yuav tsum qhia qhov no:
#!/bin/sh
### Pib INIT INFO # Muab: tightvncserver # Yuav tsum-Pib: $ local_fs # Yuav tsum-Nres: $ local_fs # Default-Start: 2 3 4 5 # Default-Stop 0 1 6 # Nqe lus piav qhia: Pib/nres trightvncserver # Xaus INIT INFO # Xav paub ntau ntxiv saib: # https://www.penguintutor.com/linux/tightvnc # Customize this entry # Teem tus USER sib txawv rau lub npe ntawm tus neeg siv kom pib tightvncserver hauv qab USER = 'pi' ### Xaus kev kho kom haum yuav tsum tau ntsuas cd ~ $ USER rooj plaub "$ 1" thaum pib) su $ USER -c '/usr/bin/tightvncserver: 1' ncha "Pib TightVNC server rau $ USER";; nres) pkill Xtightvnc ncha "Tightvncserver nres";; *) ncha "Siv: /etc/init.d/tightvncserver {pib | nres}" tawm 1;; esac Exit 0
Tseem ceeb yog qhov pib #!/Bin/sh. Tom qab rub tawm koj yuav tsum theej cov ntsiab lus. Tom qab ntawd qhib cov ntawv tshiab nrog nano
sudo nano /etc/init.d/tightvncserver
thiab muab cov ntsiab lus tso rau hauv daim ntawv no. Txhawm rau Raspbian kom khau raj cov ntawv no ntawm kev pib peb yuav tsum hloov pauv txoj cai nkag nrog
sudo chown paus: hauv paus /etc/init.d/tightvncserver
ua cov ntaub ntawv executable nrog
sudo chmod 755 /etc/init.d/tightvncserver
thiab ntxiv cov ntaub ntawv mus rau qhov kev ua haujlwm tsis raug (xws li nws yuav pom thiab ua los ntawm Raspbian)
sudo hloov tshiab-rc.d tightvncserver defaults
Thiab koj txhua tus tau teeb tsa:)
Tam sim no koj RasPi yuav tsum pib kaw nruj nchavNCserver thaum pib. Kos yog tias ua haujlwm. Txwv tsis pub mus tab sis nyob rau hauv kev nthuav dav thiab sib piv kuj rau lwm cov lus qhia.
Kauj ruam 12: Hom HDDs
Sai li koj tau txuas koj lub HDDs rau RasPi lawv lub npe lossis qhov ntsuas tuaj yeem pom nrog
sudo fdisk -l cov
Ib daim ntawv yuav nthuav qhia koj cov npe HDD uas muaj daim ntawv "/dev/sda" lossis "/dev/sdb".
Txhawm rau ua thawj hom HDDs hu
sudo mkfs.ext4 -E lazy_itable_init = 0, lazy_journal_init = 0 /dev /sdX
Qhov twg koj yuav tsum hloov X rau HDD qhov ntsuas uas koj muaj hauv cov npe fdisk, xws li sd ua.
Tam sim no koj yuav tsum tau tos ib pliag rau HDD los ua qauv.
Tom qab ntawd ua qhov qub rau HDD thib ob (thaub qab HDD)
Nco tseg: Qhov kev xaiv tub nkeeg sau ntawv ua rau kev teeb tsa siv sijhawm ntev heev rau 4TB HDD. Txawm li cas los xij tom qab, thaum koj pib koj li RasPi, HDDs yuav raug kaw thiab teeb tsa sai dua. Ntau hom txog nws ntawm no.
Kauj Ruam 13: Muaj HDDs Tau Txais Txuas Thaum Pib
Khau raj koj lub hard drive cia li lossis ua haujlwm, hauv ob qho tib si koj thawj zaug yuav tsum rub tawm qee cov apps
sudo apt-tau -y nruab ntfs-3g hfutils hfsprogs exfat-fuse
Ntfs-3g yog daim ntawv thov tsim nyog los nyeem NTFS cov ntaub ntawv system uas muaj ntau nyob hauv Windows. Yog tias koj piv txwv li txuas koj lub HDD ntawm USB chaw nres nkoj, koj yuav tsum xub nce lub HDD ua ntej koj tuaj yeem nkag mus rau cov ntaub ntawv. Cia peb xav hauv qhov piv txwv no tias HDD muaj NTFS cov ntaub ntawv kaw lus. Tom qab ntawd koj teeb lub HDD nrog
sudo mount -t ntfs -3g -o utf8, uid = pi, gid = pi, noatime /dev /sda /media /usbstick
Tom qab koj tau ua tiav txoj cai no, HDD yuav raug teeb tsa hauv/media/usbstick/.
Raspbian niaj hnub no tau nce cov cuab yeej txuas nrog zoo li USB lo lossis HDDs cia rau hauv / media / folder. Tab sis yog tias koj xav kom ntseeg tau tias HDDs ib txwm txhim kho kom raug, ua raws cov theem hauv qab no:
Ua ntej tshaj, nrhiav UUID (lub npe khoom siv tshwj xeeb) ntawm koj HDDs los ntawm kev ntaus ntawv
sudo blkid -o npe -w /dev /null
Nkag mus rau UUIDs ntawm ob qho HDDs hauv /etc /fstab los ntawm kev hu nano nrog
sudo nano/thiab/fstab/
thiab ntxiv cov kab hauv qab no hauv fstab-npe:
UUID = xxxxxxxx /mnt /myDrive ext4 defaults 0
UUID = yyyyyyyy /mnt /myDrive_mirror ext4 defaults 0
hloov ntawm xxxxxxxx thiab yyyyyyyy nkag mus rau UUID tiag tiag ntawm koj HDDs thiab tseem hloov "myDrive" rau txhua yam uas koj hu ua koj cov ntawv tais ceev tseg.
Ceev faj: Tsis txhob rho tawm ib yam dab tsi uas twb tau sau rau hauv cov ntawv no! Tsuas yog ntxiv kab tshiab.
Raws li lwm txoj hauv kev qhia no Qhia 1, Qhia 2 lossis Qhia 3 kuj tseem qhia koj yuav ua li cas (txiav lossis ua tus kheej) nce cov tsav xws li koj tuaj yeem nkag mus rau lawv cov ntsiab lus.
Kauj Ruam 14: Teeb Samba Server
Raws li tau hais dhau los "Samba muab cov ntawv thiab luam cov kev pabcuam rau ntau yam Microsoft Windows cov neeg siv khoom […]" (Txuas) Hauv peb qhov xwm txheej peb tsim Samba server muab rau txhua lub khoos phis tawj (piv txwv li los ntawm koj lub Laptop) kom nkag tau cov ntaub ntawv uas nyob ntawm HDD uas yog txuas nrog RasPi.
Txhawm rau pib lub Samba server peb xub xav tau los nruab nws ntawm RasPi
sudo apt-tau nruab samba samba-common-bin
Tom qab ntawd peb yuav tsum hloov kho cov teeb tsa los ntawm kev hu cov ntaub ntawv teeb tsa nrog nano
sudo nano /etc/samba/smb.conf
thiab hauv cov ntawv no hauv kab
# kev ruaj ntseg = neeg siv
tshem qhov ua ntej "'#". Qhov no tso cai rau tus neeg siv teeb tsa Samba server password (uas tau pom zoo). Qhov no yog tus password txhua tus neeg siv uas xav nkag mus rau cov ntaub ntawv ntawm HDD yuav tsum paub.
Tam sim no peb txhais tus password los ntawm kev hu xov tooj
sudo smbpasswd -a pib
thiab nkag mus rau tus password.
Tam sim no peb yuav tsum qhia rau Samba server uas cov ntaub ntawv nws tau muab nkag rau
sudo chown -R pi: pi /mnt /myDrive
qhov twg koj yuav tsum hloov pauv /mnt /myDrive nrog txoj hauv kev uas koj lub HDD tau teeb tsa.
Muaj qee qhov kev teeb tsa ntxiv peb xav tau ntxiv rau smb.conf. Hauv qab ntawm smb.conf ntxiv cov kab hauv qab no
[MyNetworkDrive]
path =/mnt/myDrive sau tau = yog qhua ok = tsis muaj pawg ua haujlwm = WORKGROUP tuaj yeem tshawb pom = yog
qhov twg qhia txoj hauv kev dua qhov twg koj lub HDD tau teeb tsa, sau ntawv qhia tias cov neeg siv raug tso cai hloov pauv thiab ntxiv cov ntaub ntawv (sau nkag). qhua ok = tsis tau txhais hais tias txhua tus neeg siv uas xav nkag mus rau cov ntaub ntawv ntawm HDD yuav tsum paub tus password. Qab pawg ua haujlwm koj yuav tsum ntxiv lub npe ntawm koj Windows pab pawg ua haujlwm uas koj siv (lub neej ntawd feem ntau yuav yog "WORKGROUP"). Browseable = yog nrawm cov khoom me ntsis yog tias koj piv txwv li hla ntau cov duab sai sai.
Tom qab koj ua tiav nrog kev hloov pauv cov ntaub ntawv teeb tsa rov qab Samba server nrog
sudo /etc/init.d/samba rov pib dua
thiab sim los ntawm koj lub Windows PC yog tias koj nkag tau rau koj cov ntaub ntawv.
Phau Ntawv Qhia 1 muab lwm txoj kev qhia rau koj yuav teeb tsa txhua qhov no li cas.
Kauj Ruam 15: Teeb Cov Ntaub Ntawv Backup System
Tam sim no peb muaj ob lub HDDs ntawm Raspberry Pi ntawm pawg thawj coj saib ntawm phab ntsa … tab sis txog tam sim no peb tsuas siv ib HDD xwb. Zoo, vim tias peb tab tom siv lub HDD thib ob los ua lub thaub qab uas yuav dhau los ua ke nrog thawj tus los ntawm RasPi tsis tu ncua. Qhov no txhais tau tias, piv txwv li, txhua hnub txhua qhov kev hloov pauv uas koj tau ua ntawm koj thawj HDD yuav raug tsom iav/theej mus rau HDD thib ob.
Txhawm rau ua qhov ntawd peb yuav tsum teeb tsa lub app rsync los ntawm kev ntaus ntawv
sudo apt-tau hloov tshiab
sudo apt -tau nruab hdparm sudo hdparm -C /dev /sda
Tam sim no peb xub ntsuas tag nrho cov txheej txheem ntawm ib daim ntawv dummy. Rau qhov no peb tsim cov ntaub ntawv dummy nrog
sudo nano /mnt/myDrive/TestFile.txt
thiab ntaus ib yam dab tsi xav tau. Tom qab kaw nano nrog "Strg+x" thiab tam sim no cia ua rsync ncaj qha synchronize ob qho HDDs
rsync -av --delete /mnt /myDrive /mnt /myDrive_mirror
Yog tias txhua yam mus tau zoo, peb yuav tsum nrhiav TestFile.txt ntawm HDD thib ob (txhais tau tias hauv /mnt /myDrive_mirror). Hauv qab no kuv yuav hu /mnt /myDrive "qhov chaw" thiab /mnt /myDrive_mirror lub "phiaj".
Qhov kev xaiv -av muaj cov lus txib
- -v uas qhia koj hauv lub plhaub dab tsi nws tau theej/synchronizing
-
-a uas ua txhua yam ntawm cov lus txib hauv qab no
- -r luam tawm tag nrho cov npe hauv qab
- -l luam cov cim txuas
- -p khaws cov cai ntawm cov ntaub ntawv los
- -t khaws sijhawm nyiaj muas ntawm cov ntaub ntawv los
- -g khaws cov pab pawg neeg txoj cai ntawm cov ntaub ntawv los
- -tshem tawm uas sib piv cov ntaub ntawv ntawm ob qhov chaw thiab lub hom phiaj thiab tshem tawm cov ntaub ntawv ntawm lub hom phiaj yog tias lawv tsis nyob tam sim no ntxiv ntawm qhov chaw.
Tam sim no peb tau ua tiav synchronized peb qhov chaw thiab lub hom phiaj tsav. Tam sim no peb xav kom rsync ua qhov ntawd tsis tu ncua. Rau qhov ntawd peb yuav tsum tsim lub crontab
sudo crontab -e
Cov lus txib no qhib rsync teeb tsa cov ntaub ntawv hauv nano (ceev faj siv "sudo" hais kom ua. Tsis li ntawd Raspbian yuav nkag mus rau cov ntaub ntawv tsis raug!). Crontab muaj cov lus txib ib yam li peb tau siv ua ntej los ua ke peb lub hauv paus thiab lub hom phiaj. Txawm li cas los xij hauv crontab muaj cov ntawv ua ntej uas qhia rsync thaum nws yuav tsum ua kom sib haum peb cov ntaub ntawv. Cov ntawv ua ntej muaj cov lej hauv qab no
Teev Sijhawm Teev Sijhawm Hauv Lub Hlis Ib Hlis HnubOfTheWeek rsync-Command
Cov piv txwv crontab hauv qab no yuav tsum tshem tawm txhua yam
00 05 * * * rsync -av --delete /mnt /myDrive /mnt /myDrive_mirror
uas txhais tau tias koj RasPi synchronizes qhov chaw thiab phiaj xwm txhua hnub thaum 05:00 teev sawv ntxov.
Lwm txoj kev qhia tau muab rau ntawm no lossis ntawm no.
Kauj Ruam 16: Zoo Paub Txog Kev Ua Haujlwm Linux
Ib yam dab tsi txog Linux (qhov kuv tau kawm):
- ntawm RasPi peb tau ua haujlwm tshwj xeeb ntawm Linux hu ua "Raspbian" uas yog qhov tshwj xeeb ntxiv ntawm "Debian" uas yog ua raws Linux kernel
-
Raspbian tau qhib qhov chaw thiab los nrog ntau yam ntawm cov program tau teeb tsa ua ntej:
- lub web browser: IceWeasel (tshem tawm Firefox version)
- Nab hab sej 2 & 3
- Minecraft
- LibreOffice
- Wolfram & Mathematica
- PDF-Saib
- Java IDE
- nano (ib qho yooj yim editor)
- Linux lossis Raspbian feem ntau ua haujlwm los ntawm cov lus txib koj ntaus rau hauv lub qhov rai hais kom ua (hu ua "plhaub")
- yog tias koj yog tus thawj coj (lossis hauv linux "super user") ces koj raug tso cai hloov pauv thiab hloov ntau yam, muab koj sau "sudo" ua ntej txhua qhov hais kom ua ("sudo" = "super user do") Piv txwv: sudo nano path/myfile super siv hu xov tooj editor nano qhib "myfile" hauv daim nplaub tshev "path"
Lwm qhov tseem ceeb hu rau Raspbian:
sudo apt-tau hloov tshiab && apt-tau upgrade
hu rau hloov tshiab (xav tau kev sib txuas hauv internet)
sudo apt-tau nruab XYZ
rub tawm thiab teeb tsa pob XYZ (tsuas yog piv txwv) ntawm RasPi
Yog tias koj xav backup koj Linux OS ntawm koj RasPi ua raws cov theem no:
- Rub tawm Win32DisImager
- Kaw koj lub RasPi thiab tshem daim npav SD thiab muab tso rau hauv koj lub PC thiab khiav Win32DiskImager.
- Xaiv qhov chaw (nrog khawm daim nplaub tshev) qhov twg koj xav muab koj cov ntaub ntawv thaub qab (nws yuav tsim cov duab ntawm daim npav SD tag nrho thiab muab tso rau hauv daim ntawv img-file ntawm lub hard drive ntawm koj lub PC.
- Tsim cov duab thaub qab los ntawm nias "Nyeem". (Qhov no yuav siv sijhawm me ntsis)
- Ua tiav
Pom zoo:
Arduino - Cov Maze Solving Robot (MicroMouse) Phab Ntsa Tom Qab Neeg Hlau: 6 Cov Kauj Ruam (nrog Duab)
Arduino | Cov Maze Solving Robot (MicroMouse) Phab Ntsa Tom Qab Neeg Hlau: Txais Tos Kuv Isaac thiab qhov no yog kuv thawj tus neeg hlau " Striker v1.0 " .Qhov Robot no tau tsim los daws qhov yooj yim Maze. muaj peev xwm txheeb xyuas lawv.Yog lwm qhov kev hloov pauv hauv qhov tshawb nrhiav yuav xav tau kev hloov pauv hauv
Suav Tsoos Xim NeoPixel Phab Ntsa Art (Tsim los ntawm Arduino): 6 Cov Kauj Ruam (nrog Duab)
Suav Tsoos Xim NeoPixel Phab Ntsa Art (Tsim los ntawm Arduino): Xav me ntsis txog koj lub phab ntsa? Cia peb ua kom zoo nkauj thiab yooj yim phab ntsa kos duab los ntawm Arduino hnub no! Koj tsuas yog yuav tsum tau yaum koj txhais tes ua ntej ntawm tus ncej, thiab tos rau qhov khawv koob! Hauv qhov kev qhia no, peb yuav tham txog yuav tsim koj li cas
Caij Los Ntawm Cov Phab Ntsa: Google Txoj Kev Pom Kev Ruaj Ntseg Tsheb Npav Interface: 12 Cov Kauj Ruam (nrog Duab)
Caij Los Ntawm Cov Phab Ntsa: Google Txoj Kev Pom Kev Ruaj Ntseg Tsheb Cuam Tshuam: Kev Caij Tsheb Los Ntawm Cov Phab Ntsa: Google Txoj Kev Pom Kev Ruaj Ntseg Hauv Nroog Ua Ntej tso cai rau koj mus los ntawm Google Txoj Kev-Saib los ntawm kev yooj yim ntawm koj chav nyob. Siv qee yam khoom siv hluav taws xob yooj yim, Arduino, tsheb kauj vab nyob ruaj khov, khoos phis tawj, thiab lub projector lossis TV
Shanzhai Remix: Zaub Phab Ntsa ntawm Knockoffs: 7 Cov Kauj Ruam (nrog Duab)
Shanzhai Remix: Zaub Phab Ntsa ntawm Knockoffs: Shanzhai Remix tshawb xyuas lub ntsiab lus txuas ntxiv ntawm shanzhai 山寨, lus Suav ib txwm hais txog cov khoom cuav uas ua raws cov khoom lag luam uas paub zoo. Txawm hais tias lo lus tuaj yeem cuam tshuam lub ntsiab lus tsis zoo ntawm qib saum npoo, nws nqa cov yam ntxwv ntawm kev rov ua dua
Phab Ntsa ClOCK Los Ntawm Cov Tsav Tsheb Qub: 5 Kauj Ruam (nrog Duab)
Phab Ntsa ClOCK Los Ntawm Cov Qub Hard Drives: Nov yog Qhia paub yuav ua li cas rov kho lub khoos phis tawj qub Hard Drives mus rau qhov qub saib WALL CLOCK