Você está na página 1de 12

Bag - 0

search this site

NAVIGATION

PART 1

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

MAKE YOUR OWN CLUSTER COMPUTER


(PART 2)

9
m ay

[v c_row][v c_colum n
width= 2 /3 ][v c_separator][v enera_fram ed_im age
content_ty pe= v ideo css_anim ation= appear
fram e_ty pe= browser slider_engine= flexslider
v ideo_link= https://www.y outube.com /watch?
v = lHm FRlETTcQ
browser_url= https://www.y outube.com /watch?
v = lHm FRlETTcQ][v c_separator][/v c_colum n][v c_colum n
width= 1 /3 ][/v c_colum n][/v c_row][v c_row][v c_colum n
width= 2 /3 ][v c_tabs][v c_tab title= About This Project
tab_id= 1 4 02 7 1 3 02 8-1 -3 9 e9 a4 -2 f88][v c_colum n_text]
This is part
two of the
series that
shows y ou
how to m ake
a cluster
com puter
using
Raspberry
Pis!

v iew

You can
watch Part 1 here.
[/v c_colum n_text][/v c_tab][v c_tab title= Parts and
Downloads tab_id= 1 4 02 7 1 3 02 8-2 -3 9 e9 a4 2 f88][v c_colum n_text]

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Acquiring t he Part s
Heres what y ou will need:
1.
2.
3.
4.
5.
6.

2 or m ore Raspberry Pis


SD cards for each Pi
Power Cables for each Pi
Powered USB Hub (optional)
Networking Cables
A Hub or a Router

TOTAL COST: ~$1 00.00


[/v c_colum n_text][/v c_tab][v c_tab title= Code
tab_id= 1 4 02 7 53 9 1 02 7 2 -3 -8][v c_colum n_text]
Inst alling and Configuring Raspbian
Follow the software configuration steps shown in this v ideo
and burn the im age file to an SD card for each com puter in
y our cluster.
For each Raspberry Pi in y our cluster, insert an im aged SD
card, connect them all to the sam e router or switch, and
then connect a power source to each one.
[tabby title= Term inal Com m ands]
Install nm ap
Sudo apt-get update
Sudo apt-get install nm ap
Get current IP
Ifconfig
Scan subnet for Pis

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Sudo nm ap -sn 1 9 2 .1 6 8.1 .*


Run test file
Mpiexec -n 1 hostnam e
Make test folder and file
Mkdir m pi_test
Cd m pi_test
Nano m achinefile
1 9 2 .1 6 8.1 .2
1 9 2 .1 6 8.1 .3
1 9 2 .1 6 8.1 .4
1 9 2 .1 6 8.1 .5
Mpiexec -f m achinefile -n 4 hostnam e
Add key s to all pis
PI01
Ssh-key gen
Cd ~
Cd .ssh
Cp id_rsa.pub pi01
Ssh pi@1 9 2 .1 6 8.1 .3
PI02
Ssh-key gen
Cd .ssh
Cp id_rsa.pub pi02
Scp 1 9 2 .1 6 8.1 .2 :/hom e/pi/.ssh/pi01 .
Cat pi01 > > authorized_key s
Exit
PI03 (ssh pi@1 9 2 .1 6 8.1 .5)

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Ssh-key gen
Cd .ssh
Cp id_rsa.pub pi03
Scp 1 9 2 .1 6 8.1 .2 :/hom e/pi/.ssh/pi01 .
Cat pi01 > > authorized_key s
Exit
PI04
Ssh-key gen
Cd .ssh
Cp id_rsa.pub pi04
Scp 1 9 2 .1 6 8.1 .2 :/hom e/pi/.ssh/pi01 .
Cat pi01 > > authorized_key s
Exit
PI01
Scp 1 9 2 .1 6 8.1 .3 :/hom e/pi/.ssh/pi02
Cat pi02 > > authorized_key s
Run new m achinefile
Cd ~
Nano m achinefile
1 9 2 .1 6 8.1 .2
Mpiexec -f m achinefile -n 4 hostnam e
Run Py thon file
m piexec -n 5 py thon dem o/helloworld.py
Mpiexec -f m achinefile -n 5 py thon
/hom e/pi/build/m pi4 py /dem o/m d5_dict_attack.py
Download and unzip file
Wget

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

http://www.tinkernut.com /dem os/3 6 4 _cluster_com p/py thon_test.


Tar -zxf py thon_test.tar.gz
Nano py thon_test/m d5_attack.py
Change hash
Copy to all com puters
Scp -r py thon_test 1 9 2 .1 6 8.1 .3 :/hom e/pi
Mpiexec -f m achinefile -n 5 py thon
py thon_test/m d5_attack.py
[/v c_colum n_text][/v c_tab][v c_tab title= Im portant Links
tab_id= 1 4 02 7 53 9 81 9 00-3 -1 0][v c_colum n_text]
Help support m y channel:
http://www.patreon.com /tinkernut
Follow Tinkernut!
Google +
Facebook
Twitter
[/v c_colum n_text][/v c_tab][/v c_tabs][/v c_colum n][v c_colum n
width= 1 /3 ][/v c_colum n][/v c_row]
Com m ents (6 )
Read m ore

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

MAKE YOUR OWN CLUSTER COMPUTER

27
april

[v c_row][v c_colum n
width= 2 /3 ][v c_separator][v enera_fram ed_im age
content_ty pe= v ideo css_anim ation= appear
fram e_ty pe= browser slider_engine= flexslider
v ideo_link= https://www.y outube.com /watch?
v = 1 R0UgIgcb5g
browser_url= https://www.y outube.com /watch?
v = 1 R0UgIgcb5g][v c_separator][/v c_colum n][v c_colum n
width= 1 /3 ][/v c_colum n][/v c_row][v c_row][v c_colum n
width= 2 /3 ][v c_tabs][v c_tab title= About This Project
tab_id= 1 4 02 7 1 3 02 8-1 -3 9 e9 a4 -2 f886 e2 a7 d4 3 ][v c_colum n_text]
Learn how to m ake a cluster com puter using Raspberry Pis!
You can also use this m ethod to build y our own super
com puter.
[/v c_colum n_text][/v c_tab][v c_tab title= Parts and
Downloads tab_id= 1 4 02 7 1 3 02 8-2 -3 9 e9 a4 -2 f886 e2 a7 d4 3 ][v c_colum n_text]
Acquiring t he Part s
Heres what y ou will need:
1.
2.
3.
4.
5.
6.

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

2 or m ore Raspberry Pis


SD cards for each Pi
Power Cables for each Pi
Powered USB Hub (optional)
Networking Cables
A Hub or a Router

pdfcrowd.com

TOTAL COST: ~$1 00.00 [tabby title= Software]


[/v c_colum n_text][/v c_tab][v c_tab title= Code
tab_id= 1 4 02 7 53 9 1 02 7 2 -3 -86 e2 a-7 d4 3 ][v c_colum n_text]
Inst alling and Configuring Raspbian
Download the Raspbian Im age from here.
Burn the Raspbian Im age to y our SD Card
If y ou hav e Windows, y ou can follow these instructions.
If y ou hav e a Mac, y ou can follow these instructions.
Once the im age is burned to y our SD Card, but it into the
Raspberry Pi and boot it up with a Key board, Mouse,
Monitor and Internet attached.
Upon first boot, y ou should see the Rasbperry Pi
Configuration screen (otherwise ty pe sudo raspbiconfig. Heres the options well need to configure
Expand the File Sy stem
If needed, set the Internationalization options to
m atch y our countries key board lay out.
Ov erlcock the Pi to 800 Mhz
Adv anced Options
Set the Hostnam e to Pi01
Split the m em ory to 1 6 m b for graphics
Enable SSH
Finish out of the configuration, but dont reboot y et
To enable auto-login, at the term inal com m and
ty pe sudo nano /etc/inittab
Com m ent out this line:
#1:2345:respawn:/sbin/getty --noclear
38400 tty1
And add this line right beneath it:

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

And add this line right beneath it:


1:2345:respawn:/bin/login -f pi tty1
</dev/tty1 >/dev/tty1 2>&1
Now y ou can reboot y our Pi and it should auto-login
[tabby title= Term inal Com m ands]
Inst alling MPICH
MPICH is software that allows for m ulti-processing
com m unication between com puters.
To install it on y our Raspberry Pi, first m ake sure y ou
hav e a v alid Internet connection going to the Pi. Then
follow these Term inal Com m ands
sudo apt-get update
mkdir mpich2
cd ~/mpich2
wget
http://www.mpich.org/static/downloads/3.1/
mpich-3.1.tar.gz
tar xfz mpich-3.1.tar.gz
sudo mkdir /home/rpimpi/
sudo mkdir /home/rpimpi/mpi-install
mkdir /home/pi/mpi-build
cd /home/pi/mpi-build

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

sudo apt-get install gfortran


sudo /home/pi/mpich2/mpich-3.1/configure prefix=/home/rpimpi/mpi-install
sudo make
sudo make install
nano .bashrc
PATH=$PATH:/home/rpimpi/mpi-install/bin
sudo reboot
mpiexec -n 1 hostname
These com m ands will download and install MPICH, as well
as add it as a path to y our BASHRC boot file. The last
com m and runs a test to see if it works. If the last com m and
returns Pi01 , then y ou did ev ery thing successfully .
Inst alling MPI4PY
As it is, MPICH can run C and Fortran program s. But since
the Raspberry Pi has the Py thon coding env ironm ent preinstalled, it would be easiest to install a Py thon to MPI
interpreter. Heres the com m ands to do that:
sudo aptitude install python-dev
wget

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

https://mpi4py.googlecode.com/files/mpi4py
-1.3.1.tar.gz
tar -zxf mpi4py-1.3.1
cd mpi4py-1.3.1
python setup.py build
python setup.py install
export PYTHONPATH=/home/pi/mpi4py-1.3.1
mpiexec -n 5 python demo/helloworld.py
[/v c_colum n_text][/v c_tab][v c_tab title= Im portant Links
tab_id= 1 4 02 7 53 9 81 9 00-3 -1 06 e2 a7 d4 3 ][v c_colum n_text] Help support m y channel:
http://www.patreon.com /tinkernut Follow Tinkernut! Google
+ Facebook Twitter
[/v c_colum n_text][/v c_tab][/v c_tabs][/v c_colum n][v c_colum n
width= 1 /3 ][/v c_colum n][/v c_row]
Com m ents (8)
Read m ore

Get Google Chrome


A faster way to browse the web. Stable, free & installs in seconds!

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Retro 2 01 5 by Tinkernut, LLC

Tinkernut Labs

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Você também pode gostar