DIY Skyminer Setup for Raspberry Pi on MAC for people who know nothing about coding

in skyminer •  6 years ago 

I'm a basic white girl that has somehow managed to build 4 DIY Skyminers. Before tackling this project, I didn't even know what ssh means. I didn't know what the MAC terminal was. You get the picture.

Make sure you have the following parts-

  1. 8 x Raspberry P Model B Nodes https://www.amazon.com/Raspberry-Pi-RASPBERRYPI3-MODB-1GB-Model-Motherboard/dp/B01CD5VC92
  2. 1 x 16-port switch https://www.amazon.com/gp/product/B0779PZQ1N/ref=oh_aui_detailpage_o06_s00?ie=UTF8&psc=1
  3. 9 x 1-3ft Ethernet Cables https://www.amazon.com/gp/product/B00NQA2H3O/ref=oh_aui_detailpage_o01_s00?ie=UTF8&psc=1
    -8 of these ethernet cables will go from the Raspi to the switch.
    -1 of these ethernet cables will go from the switch into your router
  4. 1 x OpenWRT compatible router (I used the TP-Link) https://www.amazon.com/gp/product/B00NCLSPGA/ref=oh_aui_detailpage_o02_s00?ie=UTF8&psc=1
  5. 8 x SD cards (I suggest 32GB, 16GB will work) https://www.amazon.com/gp/product/B073JWXGNT/ref=oh_aui_detailpage_o03_s01?ie=UTF8&psc=1
  6. 1 x Ethernet cable that will go from the TP-Link 1043N router (mentioned above) to your laptop when you ssh into the raspi
  7. 1 x Ethernet cable that will go from your home router to your TP-Link router
  8. 1 x Anker 60W Power Supply https://www.amazon.com/gp/product/B00YRYS4T4/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1
  9. 8 x 1ft Micro USB Cables (these go from your Raspberry Pi to your Power Supply)
  10. Some sort of oranization is necessary- take a look at this stacker on Amazon... https://www.amazon.com/Raspberry-Pi-Complete-Stackable-Enclosure/dp/B01LVUVVOQ/ref=sr_1_3?ie=UTF8&qid=1527205571&sr=8-3&keywords=raspberry+pi+mounting
    You can also configure it on your own using something like this https://www.amazon.com/gp/product/B014K8MXO8/ref=oh_aui_detailpage_o04_s00?ie=UTF8&psc=1

Now let's get down to business...

SD CARD

  1. First things first, you need to download the latest version of NOOBS for Raspberry Pi: https://www.raspberrypi.org/downloads/noobs/
    You will want to download the Zip file from NOOBS (Not the Torrent download)
  2. You also want to download this SD Card Formatter https://www.sdcard.org/downloads/formatter_4/eula_mac/index.html
  3. Once NOOBs has finished downloading, extract the files from the zip.
  4. Insert the micro SD card into your flash drive, and plug it in to your Mac
  5. Open up the recently downloaded SD Card formatter, make sure you have selected your device, and format (I used "Quick Format" for brand new SD Cards, and "Overwrite Format" for any SD cards that had to be reflashed.
  6. Once your SD card has been formatted, drag all of the files from the NOOBS folder and drop them into the SD Card drive.
  7. Create an ssh file!
    -open up the MAC terminal
    -type in the following code:
    -- touch ssh
    -- mv ssh desktop
    -After typing those 2 commands, you should see the ssh file on your desktop. Drop that into the NOOBS folder in your SD card.
  8. Repeat this process with all 7 SD Cards

LET'S PLUG HER IN

  1. Your Raspberry Pi should be hooked up to power via a micro usb cable. That micro usb should be plugged into the Anker power supply.
  2. Your Raspberry Pi should have be connected to the switch via ethernet cable.
  3. Your switch should be connected to the TP-Link Router via an ethernet cable into an ETHERNET port.
  4. Your TP-Link router should have an Ethernet cable going from one of the ETHERNET ports to your Mac.
  5. Your TP-Link should also have an Ethernet cable going from the INTERNET port into one of the 4 ETHERNET ports of your home router.
  6. Your switch, TP-Link router, and Anker Power Supply should all be plugged in.....
  7. Switch everything on and LET THERE BE LIGHT

HDMI
I used a television monitor to plug into the HDMI port of my raspberry pi. You can use whatever you have that gives you HDMI access. You will also want to have a keyboard or a mouse to plug in to your raspberry pi at this point.

Once everything is powered on for the first boot, make sure you choose Raspberry Pi Lite. Press enter, and then press "i" (lowercase i) to install.

Go eat some food or read a book or something because it's going to take a while to install Raspbian.... or watch this and start planning your Lambo design

LOGIN
username: pi
password: raspberry

Login, then change the password by typing the following command
-- passwd

Test your internet access by typing the following command
-- curl v4.ifconfig.co
You should see your public IP address after this.

Now let's UPDATE THIS BISH
-- sudo apt-get update
-- sudo apt-get upgrade

NOTE: If you are having any issues at this point, reboot your Raspberry Pi by typing in:
-- sudo reboot
(And back track if necessary)

Now we are going to enable SSH access (remember that ssh file we made? This is why!)
Type in the following command:
-- sudo raspi-config
Once you're in the Configuration App, you'll want to go into the "Interfacing Options" and enable ssh. You can also change the following to suit you accordingly:
-Timezone
-Keyboard
-Regional Settings
(I only spent time enabling ssh access, but you do you big dog)

Now, type in the following command on your HDMI interface:
--ifconfig
You will now see your Pi's IP address
It should be a number like 192.168.1.xxx
You will use this to ssh into your Mac!
Open up the terminal in your Mac and type in the following command:
-- ssh [email protected]
If it asks you if you would like to continue, type "Y" for Yes.
Then, type in your password that you made earlier.
Congratulations, you are an SSH master (kind of)

GOLANG!
Some versions of Raspberry Pi have Golang already pre-installed, so we want to be sure to remove that so we can have the latest version
Type in the following commands:
-- sudo apt-get remove golang
-- sudo apt autoremove
(For ME, none of my Pi's had the pre-installed Golang on them, so I was good after the first command.)
For installing Golang v1.9, type in the following commands:
-- wget https://storage.googleapis.com/golang/go1.9.linux-armv6l.tar.gz
-- sudo tar -C /usr/local -xzf go1.9.linux-armv6l.tar.gz
Then type these following commands:
-- cd ~
-- mkdir go
-- mkdir go/bin
-- mkdir go/src
You just created your "Go" folders :)
Now, edit your " ~/.profile "
Type in the following:
-- nano ~/.profile
Use your arrow keys or scroll to the bottom of the file and insert the following at the end:
-- export PATH=$PATH:/usr/local/go/bin
-- export GOPATH=$HOME/go
-- export GOBIN=$HOME/go/bin
After entering this information, press ctl+X, then "Y" to save, then enter.
Type in the following command back on the command line:
-- source ~/.profile
You should now have Golang v1.9 installed on your Pi! Let's check by typing in the following command:
-- go version
It should say that you have Golang v1.9 on that Pi.

INSTALL GIT
Now we are installing Git, type in the following command:
-- sudo apt-get install git
If it asks you if you would like to continue to install, type "Y" for yes.
(Throughout this process, the majority of the time that you are given a Y/N option on the command line, the answer is most likely Yes.)

INSTALL SKYWIRE!!!!!!!!!!!!!
THE MOMENT WE HAVE BEEN WAITING FOR!
Type in the following commands on the command line:
-- mkdir -p $GOPATH/src/github.com/skycoin
-- cd $GOPATH/src/github.com/skycoin
-- git clone https://github.com/skycoin/skywire.git
-- cd $GOPATH/src/github.com/skycoin/skywire/cmd
-- go install ./...

NOW LET'S RUN SKYWIRE BABY! STRAIGHT TO THE MOON IN A LAMBO ROCKET!
Run the manager- this is your very first node. You will only run the manager command code on the very first Raspberry Pi that you configure with SKYwire.
Type in the following commands on the command line:
-- cd $GOPATH/bin
-- nohup ./manager -web-dir ${GOPATH}/src/github.com/skycoin/skywire/static/skywire-manager > /dev/null 2>&1 &sleep 3
(The above "nohup" code will keep the manager running even when you close the terminal :)

Run the Skywire Node-
The following command will only apply to your first Raspberry Pi (your manager) as well. All of your other raspberry pi's will have a node command, but it will be a bit different. For your first Raspi, type the following command:
-- nohup ./node -connect-manager -manager-address :5998 -manager-web :8000 -discovery-address discovery.skycoin.net:5999-034b1cd4ebad163e457fb805b3ba43779958bba49f2c5e1e8b062482904bacdb68 -address :5000 -web-port :6001 > /dev/null 2>&1 &

FOR ALL OTHER NODES
On all 7 of your other Raspberry Pi's, you will follow all of these instructions accordingly, but you will not run the manager (as seen just above)
Instead, you will now run the Skywire node using the following code:
-- nohup ./node -connect-manager -manager-address YOUR.MANAGER.IP.HERE:5998 -manager-web YOUR.MANAGER.IP.HERE:8000 -discovery-address discovery.skycoin.net:5999-034b1cd4ebad163e457fb805b3ba43779958bba49f2c5e1e8b062482904bacdb68 -address :5000 -web-port :6001 > /dev/null 2>&1 &

In the above command, notice that you will place the IP address of your manager in the code, in 2 sections. DON'T FORGET THIS! It will be the same node command for all of your other Raspberry Pi's after the manager.

So the first one is the manager, and that (obviously) runs the manager:
-- nohup ./manager -web-dir ${GOPATH}/src/github.com/skycoin/skywire/static/skywire-manager > /dev/null 2>&1 &sleep 3
And the Skywire Node with the discovery address:
-- nohup ./node -connect-manager -manager-address :5998 -manager-web :8000 -discovery-address discovery.skycoin.net:5999-034b1cd4ebad163e457fb805b3ba43779958bba49f2c5e1e8b062482904bacdb68 -address :5000 -web-port :6001 > /dev/null 2>&1 &

THE FOLLOWING 7 Raspberry Pi's (your secondary nodes) will only run the Skywire node command:
-- nohup ./node -connect-manager -manager-address YOUR.MANAGER.IP.HERE:5998 -manager-web YOUR.MANAGER.IP.HERE:8000 -discovery-address discovery.skycoin.net:5999-034b1cd4ebad163e457fb805b3ba43779958bba49f2c5e1e8b062482904bacdb68 -address :5000 -web-port :6001 > /dev/null 2>&1 &

NOW, after running your first node, the MANAGER, you can type in your browser the IP ADDRESS:8000, so for example if your IP Adress is 192.168.1.200 then you would put 192.168.1.200:8000 in your web browser, which should then take you to the Skywire Monitor where you can see your nodes, and their public keys.

The default login password is: 1234

Make sure to copy all of your public keys.
Also, Be sure to backup all of your nodes. You can do so by typing the following command:
-- cat ~/.skywire/node/keys.json
Copy the Seed and the keys that it gives you (literally copy the entire text) and save this somewhere on your computer, or on a hard drive, for backup.

HAVE FUN :D
I'm no pro by any means, but I hope this can help someone who started off as lost as I did!

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Hi, I just followed and upvoted you Follow and upvot back we can help each other succeed @imadha

Coins mentioned in post:

CoinPrice (USD)📉 24h📉 7d
FUNFunFair0.034$-2.79%-26.14%
LETLinkEye0.049$-1.73%-27.31%
MOONMooncoin0.000$-7.83%-14.5%

@surfsaltstrings you were flagged by a worthless gang of trolls, so, I gave you an upvote to counteract it! Enjoy!!

Congratulations @surfsaltstrings! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 1 year!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!