Cov txheej txheem:
- Kauj Ruam 1: Saib Daim Video
- Kauj ruam 2: Yam Koj Yuav Tsum Tau
- Kauj Ruam 3: Txhim Kho thiab Kho Kho Raspbian
- Kauj Ruam 4: Txhim Kho MPICH
- Kauj Ruam 5: Txhim Kho MPI4PY
- Kauj ruam 6: Luam theej duab
- Kauj Ruam 7: Kho Kho Qhov Tseem Ceeb Raspberry Pi's
- Kauj Ruam 8: Txheeb Xyuas Tus Tswv Cuab
- Kauj Ruam 9: Khiav Txoj Haujlwm ntawm Koj Lub Supercomputer
Video: Yuav Ua Li Cas Raspberry Pi SuperComputer!: 9 Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:30
Los ntawm nws tus kheej Raspberry Pi tsis khav theeb cov yam ntxwv tshwj xeeb. Tab sis nrog cov av pheej yig tus nqi, yuav ob peb ntawm cov no thiab txuas rau lawv siv lawv tau siv ua ke ua ke lub zog tuaj yeem ua rau lub khoos phis tawj qis tus nqi. Muaj ntau qhov zoo tshaj plaws rigs tsim txuas kaum ob ntawm Pi's ua ke. Yog li hauv cov lus qhia no, cia peb tshawb xyuas yuav ua li cas thev naus laus zis nyob tom qab ua ke ua ke thiab ua peb tus kheej Bramble Pi!
Kauj Ruam 1: Saib Daim Video
Kuv kuj tau ua ob ntu video version ntawm qhov haujlwm zoo ib yam. Yog li yog tias koj tsis yog tus nyeem ntawv, ncaws rov qab thiab saib cov vis dis aus! Thov nco ntsoov tias cov vis dis aus siv Raspbian Wheezy. Txawm li cas los xij, cov lus qhia hauv qab no yog rau Raspbian Distro tam sim no, uas yog Jessie thaum lub sijhawm kuv sau qhov no.
Kauj ruam 2: Yam Koj Yuav Tsum Tau
Txhawm rau ua raws nrog txoj haujlwm no, ntawm no yog cov khoom koj yuav xav tau
Nov yog yam koj yuav xav tau:
- 2 lossis ntau dua Raspberry Pi's
- SD daim npav rau txhua Pi
- Fais Fab Cables rau txhua Pi
- Powered USB Hub (yeem)
- Networking Cables
- Hub los yog Router
QHOV TSEEB: ~ $ 100.00
Kauj Ruam 3: Txhim Kho thiab Kho Kho Raspbian
Thaum koj muaj txhua ntu, cov kauj ruam tom ntej yog rub tawm thiab teeb tsa Raspbian OS ntawm ib qho ntawm Raspberry Pi's. Qhov no yuav yog koj tus tswv Pi. Nov yog cov kauj ruam:
- Rub tawm Raspbian Duab los ntawm no.
-
Hlawv Raspbian duab rau txhua SD Card koj muaj rau txhua tus Raspberry Pi.
- Yog tias koj muaj Windows, koj tuaj yeem ua raws cov lus qhia no.
- Yog tias koj muaj Mac, koj tuaj yeem ua raws cov lus qhia no.
- Thaum cov duab raug hlawv rau koj daim npav SD, muab tso rau hauv txhua ntawm Raspberry Pi thiab khau raj nws.
- Thaum xub pib, koj yuav tsum pom Rasbperry Pi Desktop. Nyem rau ntawm lub tshuab raj icon nyob rau sab saud sab laug thiab mus rau Nyiam> Raspberry Pi Kev teeb tsa. Nov yog cov kev xaiv peb yuav xav tau teeb tsa
- Nthuav Cov Ntaub Ntawv SystemIf xav tau.
- Hloov lub hostname rau Pi01
- Hloov qhov kev xaiv khau raj rau CLI (Command Line Interface), txij li peb yuav tsis siv lub Desktop Interface tiag tiag.
- Clock rau ntawm "Interfaces" tab thiab paub tseeb tias SSH tau qhib.
- Nyem rau ntawm "Overclock" tab thiab xaiv "Turbo".
- Hloov lub cim xeeb GPU rau 16mb.
- Nyem rau ntawm "Localization" tab thiab teeb tsa koj cov keyboard teeb tsa kom haum rau koj lub tebchaws.
- Ua tiav qhov kev teeb tsa, thiab rov pib dua koj Pi.
Kauj Ruam 4: Txhim Kho MPICH
Tseem siv tsuas yog ib tus Pi ua tus tswv, tam sim no peb yuav tsum teeb tsa thawj lub software uas yuav tso cai rau peb siv lub zog ua haujlwm ntawm txhua tus Pi hauv peb lub network. Qhov software ntawd hu ua MPICH, uas yog Kev Tshaj Tawm Xov Tooj Sib Txuas. Nov yog yam koj yuav tsum tau ua los nruab nws:
sudo apt-tau hloov tshiab
mkdir2 ib
cd ~/mpich2
wget
txz | | |-mpich-3.1.tar.gz
sudo mkdir/tsev/rpimpi/
sudo mkdir/tsev/rpimpi/mpi-install
mkdir/tsev/pi/mpi-build
cd/tsev/pi/mpi-build
sudo apt-tau nruab gfortran
sudo /home/pi/mpich2/mpich-3.1/configure -prefix =/tsev/rpimpi/mpi-install
sudo ua
sudo ua kom nruab
nano.bashrc
PATH = $ PATH:/home/rpimpi/mpi-install/bin
sudo rov pib dua
mpiexec -n 1 hostname
Cov lus txib no yuav rub tawm thiab teeb tsa MPICH, ntxiv rau nws ntxiv rau koj li BASHRC boot file. Qhov kawg hais kom ua qhov kev xeem seb nws puas ua haujlwm. Yog tias qhov lus txib kawg rov qab "Pi01", tom qab ntawd koj tau ua txhua yam ua tiav.
Kauj Ruam 5: Txhim Kho MPI4PY
Raws li nws yog, MPICH tuaj yeem ua haujlwm C thiab Fortran cov haujlwm. Tab sis txij li Raspberry Pi muaj Python coding ib puag ncig ua ntej, nws yuav yooj yim rau nruab Python rau MPI tus neeg txhais lus. Nov yog cov lus txib ua qhov no:
sudo aptitude nruab sej-dev
wget
tar -zxf mpi4py -1.3.1
cd mpi4py-1.3.1
nab hab sej setup.py tsim
nab hab sej setup.py nruab
export PYTHONPATH =/tsev/pi/mpi4py-1.3.1
mpiexec -n 5 nab hab sej demo/helloworld.py
Qhov lus txib zaum kawg yuav tsum rov qab tsib lo lus teb. Txhua tus yog cov txheej txheem sib txawv ntawm Pi01 khiav qhov kev pab cuam nab nab "Nyob Zoo Ntiaj Teb" uas peb nyuam qhuav ua.
Kauj ruam 6: Luam theej duab
Tam sim no peb tau ua tiav kev teeb tsa peb tus tswv Pi, peb yuav tsum luam daim Pi ntawd daim npav SD daim duab rau txhua lwm tus Pi. Nov yog qhov koj tuaj yeem ua li ntawd ntawm Windows:
- Coj tus tswv SD Card tawm ntawm Pi thiab ntxig rau hauv koj lub computer.
- Siv Win32DiskImager, siv "Nyeem" khawm kom khaws cov ntsiab lus ntawm daim npav SD rau hauv koj lub computer.
- Tshem tus tswv SD Card thiab ntxig daim npav SD rau ib qho ntawm lwm tus Pi. Tom qab ntawd siv Win32DiskImager "Sau" xaiv los sau cov duab peb khaws tseg rau hauv SD Card tshiab.
- Rov ua cov kauj ruam 3 kom txog thaum koj muaj tus duab qub sau rau txhua daim npav SD.
Kauj Ruam 7: Kho Kho Qhov Tseem Ceeb Raspberry Pi's
Tam sim no peb muaj txhua daim npav SD npaj ua ntej, ntxig rau Master SD Card rov qab rau hauv Master Pi, txuas nws mus rau lub router thiab khau raj rov qab. Tom qab ntawd ntxiv rau Raspberry Pi's, ntxig SD Daim Npav rau txhua tus ntawm lawv, txuas lawv mus rau tib lub router zoo li koj tus tswv Pi, thiab tom qab ntawd khau raj lawv tag nrho. Tsis muaj qhov thib ob Pi xav tau kom muaj cov twj siv hluav taws xob, nas, lossis saib.
Thaum tag nrho Pi's tau qhib, siv peb tus tswv Pi, peb yuav tsum muaj peev xwm tau txais IP chaw nyob ntawm txhua Pi ntawm lub network. Nov yog li cas:
-
Ua ntej Nruab NMAP
sudo apt-tau hloov tshiab
sudo apt-tau nruab nmap
-
Tom qab ntawd tau txais tus IP tam sim no rau tus tswv Pi
ifconfig
-
Tam sim no koj tuaj yeem tshuaj xyuas koj lub routers subnet rau lwm qhov chaw nyob IP IP
sudo nmap -sn 192.168.1.*
Luam tawm txhua qhov IP chaw nyob uas cuam tshuam rau lwm tus Raspberry Pi's hauv lub network. Peb yuav tuaj yeem siv cov IP ntawd txuas rau txhua tus Pi siv SSH. Dab tsi peb yuav tsum tau ua ua ntej yog hloov pauv txhua tus Pi thib ob mus rau lub npe network tshwj xeeb. Tam sim no lawv tau teeb tsa Pi01. Piv txwv tias yog ib tus thib ob Pi tus IP chaw nyob yog 192.168.0.3, ntawm no yog li cas koj tuaj yeem txuas rau nws thiab hloov nws lub npe:
-
Tsim kom muaj kev sib txuas SSH
-
Khiav raspi-config
sudo raspi-teeb tsa
- Hauv lub interface, nqes mus rau qhov Advanced xaiv, thiab tom qab ntawd xaiv Hostname.
- Txog tus tswv tsev, hloov Pi01 mus rau tus lej txuas ntxiv, uas yog Pi02.
-
Tom qab ntawv tawm ntawm SSH ntu
tawm
Koj xav rov ua cov kauj ruam no rau txhua tus Pi's ntawm lub network hloov lawv mus rau Pi03, Pi04, thiab lwm yam.
Ntawm koj tus tswv Pi, koj xav tsim cov ntawv tshiab hu ua "machinefile"
nano tshuab ntawv
Thiab hauv nws, koj xav ntaus txhua tus Pi tus IP chaw nyob (suav nrog tus tswv IP chaw nyob) ntawm kab tshiab thiab tom qab ntawd khaws cov ntawv.
Txij ntawm no mus, peb tuaj yeem khiav cov ntawv xeem siv
mpiexec -f machinefile -n 4 hostname
tab sis nws yuav yuam kev tawm hais tias muaj "tus tswv tsev pov thawj qhov tsis ua tiav". Yog li hauv cov kauj ruam tom ntej, cia peb kho qhov ntawd.
Kauj Ruam 8: Txheeb Xyuas Tus Tswv Cuab
Txhawm rau kho nws kom kev sib txuas lus nrog txhua Pi tsis ua rau tus tswv tsev pov thawj qhov tsis ua tiav, peb yuav tsum tsim thiab pauv cov yuam sij rau txhua tus ntawm peb Raspberry Pi's. Ib feem no yuav nyuaj me ntsis, tab sis cia siab tias koj tuaj yeem nyob nrog kuv.
-
Ntawm Tus Xib Hwb Pi, hauv cov ntawv tais ceev tseg hauv tsev, tsim tus yuam sij tshiab.
cd ~ ib
ssh-keygen cov
-
Nkag mus rau ssh nplaub tshev thiab luam cov ntawv tseem ceeb rau ib daim ntawv tshiab hu ua "pi01"
cd. hws
cp id_rsa.pub pi01
-
Tom ntej no koj xav txuas ntawm SSH rau Pi02 thiab rov ua cov kauj ruam tib yam los tsim Pi02 keyfile
ssh-keygen cov
cd. hws
cp id_rsa.pub pi02
-
Ua ntej tawm ntawm Pi02, peb yuav tsum luam theej tawm Pi01 keyfile rau nws thiab tso cai rau nws.
scp 192.168.1.2:/home/pi/.ssh/pi01.
miv pi01 >> tso cai_key
tawm
-
Nrog Pi02 ua tiav, rov ua txhua yam ntawm cov kauj ruam no rau Pi03
ssh-keygen cov
cd. hws
cp id_rsa.pub pi03
scp 192.168.1.2:/home/pi/.ssh/pi01.
miv pi01 >> tso cai_key
tawm
- Rov ua cov kauj ruam kawg rau qhov Pi uas tseem tshuav uas koj muaj hauv koj lub network.
-
Tom qab tsim cov yuam sij rau txhua tus Pi's, tawm rov qab mus rau koj tus tswv Pi thiab luam tawm tag nrho cov yuam sij tau tsim ntawm txhua tus Pi's.
cp 192.168.1.3:/home/pi/.ssh/pi02
miv pi02 >> tso cai_key
cp 192.168.1.4:/home/pi/.ssh/pi03
miv pi03 >> tso cai_key
cp 192.168.1.5:/home/pi/.ssh/pi02
miv pi04 >> tso cai_key
- (rov ua ntau npaum li Pi's nyob hauv koj lub network)
Kauj Ruam 9: Khiav Txoj Haujlwm ntawm Koj Lub Supercomputer
Tam sim no txhua yam yuav tsum teeb tsa. Thaum tseem nyob ntawm koj tus Xib Hwb Pi, sim khiav lub tshuab ntawv no dua:
cd ~ ib
mpiexec -f machinefile -n 4 hostname
Yog tias txhua yam tau ua tiav raug, nws yuav tsum xa tus IP chaw nyob ntawm txhua yam koj li Raspberry Pi. Tam sim no peb tau ua tiav qhov kev sim tawm peb lub supercomputer, cia khiav ib qhov kev pab cuam nab nab rau nws:
-
Rub tawm thiab unzip kuv qhov kev xeem Python lo lus zais tawg tsab ntawv.
wget
tar -zxf python_test.tar.gz
-
Kho tus password hash rau ib qho uas koj xav tawg.
nano python_test/md5_attack.py
-
Luam theej sej cov ntaub ntawv rau txhua tus ntawm koj li Pi.
scp -r python_test 192.168.1.3:/home/pi
scp -r python_test 192.168.1.4:/home/pi
scp -r python_test 192.168.1.5:/home/pi
- (rov hais dua rau txhua qhov Pi uas tseem tshuav)
-
Khiav tus nab hab sej tsab ntawv.
mpiexec -f machinefile -n 5 python python_test/md5_attack.py
Tsab ntawv yuav khiav siv lub zog ua haujlwm ntawm txhua tus Pi hauv koj lub network! Xav tias dawb los sim nws siv koj tus kheej cov ntawv nab hab sej!
Qhov khoom plig thib peb hauv Raspberry Pi Contest 2016
Pom zoo:
YUAV UA LI CAS YUAV UA LI CAS YUAV TSUM MUAJ KEV LAG LUAM CIRCUIT Siv D882 Tus Neeg Soj Ntsuam: 3 Kauj Ruam
YUAV UA LI CAS YUAV UA LI CAS YUAV TSUM TAU LWM YAM CIRCUIT Siv D882 Tus Kws Tshaj Lij: HELLO phooj ywg, Zoo siab txais tos rau kuv CHANNEL, Hnub no kuv yuav qhia koj li cas kom ua tau CIRCUIT ntawm kev siv hluav taws xob tsis siv neeg lub teeb pom kev siv D882
YUAV UA LI CAS YUAV UA LI CAS YUAV TSUM ROBOT COOB SCARECROW: 16 Cov Kauj Ruam (nrog Duab)
YUAV UA LI CAS YUAV TSUM NYOB ROBOT COW SCARECROW: Kuv nyuam qhuav tsim Moo-Bot, tus neeg hlau nyuj scarecrow dhia hla lub hli, rau kev sib tw hauv zej zog scarecrow.Kuv kev tshoov siab yog los ntawm kuv tus tub hu nkauj "hey diddle diddle, miv thiab fiddle. .. " Txoj haujlwm zoo heev los ua haujlwm nrog kuv
Yuav Ua Li Cas Thiaj Li Tshem Tawm Lub Computer Nrog Cov Kauj Ruam Yooj Yim thiab Duab: 13 Kauj Ruam (nrog Duab)
Yuav Tsum Tshem Tawm Lub Khoos Phis Tawj Li Cas Nrog Cov Kauj Ruam Yooj Yim thiab Duab: Nov yog cov lus qhia txog yuav ua li cas tshem lub PC. Feem ntau ntawm cov khoom siv yooj yim yog hloov pauv thiab tshem tawm tau yooj yim. Txawm li cas los xij nws yog ib qho tseem ceeb uas koj tau koom nrog nws. Qhov no yuav pab tiv thaiv koj kom tsis txhob poob ib feem, thiab tseem ua rau kev rov ua dua tshiab
YUAV UA LI CAS YUAV UA LI CAS NYOB ZOO TSHAJ PLAWS NROG IR IR LIGHT: 5 Kauj Ruam (nrog Duab)
YUAV UA LI CAS Ua Ib Lub Koob Yees Duab Tsis Muaj IR IR LIGHT: Kuv tau pom lub koob yees duab Infrared thiaj li siv nws hauv lub kaw lus kaw suab. Nrog nws koj tseem tuaj yeem tau txais cov duab txias no: cov khoom ci hauv lub zeem muag lub koob yees duab uas ib txwm muaj nyob hauv qhov tseeb. Koj tuaj yeem tau txais cov txiaj ntsig zoo nkauj rau tus nqi pheej yig Nws
Yuav Ua Li Cas Thiaj Li Yooj Yim Yooj Yim 'Calendar & Scrapbook (txawm hais tias Koj Tsis Paub Yuav Ua Li Cas Scrapbook): 8 Kauj Ruam (nrog Duab)
Yuav Ua Li Cas Thiaj Li Yooj Yim Yooj Yim 'Calendar & Scrapbook (txawm hais tias Koj Tsis Paub Yuav Ua Li Cas Scrapbook): Nov yog qhov kev lag luam pheej yig (thiab muaj txiaj ntsig ntau!) Hnub so khoom plig rau niam tais yawm txiv. Kuv tau ua 5 daim qhia hnub hli xyoo no rau tsawg dua $ 7 txhua qhov khoom siv: 12 daim duab zoo ntawm koj tus menyuam, menyuam yaus, ntxhais xeeb ntxwv, tub xeeb ntxwv, dev, miv, lossis lwm tus txheeb ze 12 daim sib txawv