How to setup a node on Raspberry

Hello
This tutorial explains how to install a node with harvester in the [url=https://en.wikipedia.org/wiki/Raspberry_Pi]Raspberry Pi.
[hr]
Note that you need a few items to turn on the computer:
1 [url=http://pt.aliexpress.com/wholesale?SearchText=raspberry+pi&catId=0&initiative_id=AS_20150418033525]Raspberry or [url=http://pt.aliexpress.com/wholesale?SearchText=banana+pi&catId=0&initiative_id=]Banana Pi ( It's almost the same thing and also works),
1 Power suply 5V 2A (from your mobile phone or can buy one [url=http://pt.aliexpress.com/wholesale?catId=0&initiative_id=SB_20150418034643&SearchText=raspberry+power]here)
1 Bluetooth USB Keyboard
1 MicroSD Card, [url=http://elinux.org/RPi_SD_cards]Here are a few that are compatible, only if you werent bad luck (like me)will have one that is not compatible.
The internet connection can be made via Ethernet cable or low power USB Wifi.
The connection to an image device can be done via HDMI or RCA in Rasp B / Banana Pi, and only HDMI from rasb B+ or above
[hr]

Has been tested with all permissions, i wanted to test using limited, but gave mistakes, and I do not understand almost anything bash. ;(
If you want to do this, use [url=https://forum.ournem.com/technical-discussion/secure-nis-and-ncc-setup-on-linux/msg4107/#msg4107]this guide:

I tested and worked well in Rasp B (not B+).

Just download the Raspibian OS customized image of the [url=https://www.linuxsystems.it/raspbian-wheezy-armhf-raspberry-pi-minimal-image/]source or trhough [url=http://torcache.net/torrent/230FF534180EE71DB902A13ABE98ACB1EF9DBC54.torrent]torrent
Unpack and

On Linux:
use this command to record on the SD card:
dd bs=1M if=raspbian_wheezy_name.img of=/dev/sdX
*/dev/sdX is name of your SD card, use gparted to view it, also expand the system partition on the SD card and move swap partition to the end.

On Windows you can save the .img using the [url=http://sourceforge.net/projects/win32diskimager/]Win32 Disk Imager and move/expand partitions with [url=http://www.partitionwizard.com/free-partition-manager]MiniTool Partition Wizard .

Is recommended that you copy the updated NEM blockchain to  /root/NEM/nis/data to synchronize faster. To do this will have to enter as super user on Linux or Windows.
Use[url=http://www.paragon-software.com/home/extfs-windows/] this program in windos in order to read and write partitions on Raspbian Filesystem

Use these [url=https://drive.bitcasa.com/send/pnpAcxsBnGB7ZCtj9RXkX6pElF5a1-j0ml075Hgfnd_f]scripts to configure the system for NEM, is scheduled for the version 0.6.28, but if outdated, just edit it and change the part of the version.
The first install java and configures NEM starting it;
The second is for if you want to use your privkey in term to harvest, will have to edit it using text editor to insert privkey before put SD on the Rasp

Now you should be all set to place the Raspberry in action.

Connect the Rasp and wait for the log on screen, use root as login with raspberry as password.

you will be in scripts folder, use chmod +rx confignem.shto give the permissions to read and run, run ./confignem.sh Set location and keyboard input (default values ​​are compatible in most cases) and wait until the screen to change the values ​​of config.properties:

Remove hashes and set
nis.bootKey = preferably[url=https://forum.ournem.com/technical-discussion/using-remote-accounts-private-key-for-auto-boot/] privkey of your remote account
nis.bootName = any name to find cute
nis.unlockedLimit = 1 use 2 to 5, raspberry will dont support many haversters


Save using CTRL+X > Y > Enter

htop appears, check the total RAM you have, this system uses a 22 memory, so it is recommended to limit the use to not use the swap. Because write on SD cards is limited to a certain number of times, from then the data becomes permanent.

Press F10 to exit the htop and appears to config memory usage:

Replace
java -cp -Xms512M -Xmx1G cp
-Xms Is the minimum value to use, do not put very little to not crash.
-Xmx Is the maximum, put a value when added to the normal system use (which is a 25MB) is less than the total amount Memory of Raspberry.
I tested java -cp -Xms350M -Xmx400M cp and is working good.


Salve with ctrl+X > Y > enter

Now you're all set, NIS should start after the last action above.

To Harvest, wait for NIS verify all blocks, switch to the second terminal using Ctrl+Alt+F2

You can start harvesting using pre-configured script with your privkey, simply enter ./heap.sh

Thus your node is online and picking !!

After a while you can check if it is visible to network here: http://nodeexplorer.com/

If public, see if port 7890 is not blocked by [url=https://forum.ournem.com/tutorials/configuring-your-network-to-reach-nem%27s-cloud/]firewalls. You can connect NCC of another computer via web, NCC is heavy for running in Raspberry.

[hr]

Post questions and answers below !!. :slight_smile:

Awesome!!

KC

pretty cool!!! thank you very much  :slight_smile:

that is great.  when I get some time I want to pick up a Pi and try this.  you are using the Pi2 right?

No, I'm using the B+
It seems to run stable, now. Hopefully… But I had to modify some of your instructions…


that is great.  when I get some time I want to pick up a Pi and try this.  you are using the Pi2 right?
No, i use a Pi B, works with 100% CPU, but it reduced in last version(0.5.28).


No, I'm using the B+
It seems to run stable, now. Hopefully... But I had to modify some of your instructions...

Which part?
I tested only on Linux, i will make an image read-to-write when i have time.  ;)



No, I'm using the B+
It seems to run stable, now. Hopefully... But I had to modify some of your instructions...

Which part?
I tested only on Linux, i will make an image read-to-write when i have time.  ;)


puh... ok... hopefully I get all modifications in mind ;-)

ok there was for example:

i had to set up nix.runNis.sh like this: java -cp -Xms300M -Xmx350 -XX:+UseSerialGC cp

i also used the noobs installation-kit - so i didn't need to install java extra. i tried to use your recommended image - but it doesn't work... i had problems to run the 64bit java version.
here it is good to know, that you have to create a new root-password. noobs is only installing the login: pi. so if you created the root there is no more need to start x.
another advantage from noobs is, that you don't need to move/resize partitions - noobs is installing all your partitions right well for your sd-card.

also i created a config.properties on pc - i wrote all my data in advance. so i hadn't to type in the privat-key manually. i only had to copy the file, after installing nem, into the nis-folder (i wrote the command in your config.nem)


the only problem i've still not solved, yet, is that my node is not online. the node appears on node-explorer but everytime with the status: offline - don't know why.
but harvesting is working :) got 2 XEM today  :P

Could someone also write a script to update NEM and Java on RaspberryPi? I guess the ultimate aim would be to provide a yum / apt repository on nem.ninja but I wouldn't have a clue how to do this as I'm a Windows engineer and only dabble in Linux

KC





No, I'm using the B+
It seems to run stable, now. Hopefully... But I had to modify some of your instructions...

Which part?
I tested only on Linux, i will make an image read-to-write when i have time.  ;)


puh... ok... hopefully I get all modifications in mind ;-)

ok there was for example:

i had to set up nix.runNis.sh like this: java -cp -Xms300M -Xmx350 -XX:+UseSerialGC cp

i also used the noobs installation-kit - so i didn't need to install java extra. i tried to use your recommended image - but it doesn't work... i had problems to run the 64bit java version.
here it is good to know, that you have to create a new root-password. noobs is only installing the login: pi. so if you created the root there is no more need to start x.
another advantage from noobs is, that you don't need to move/resize partitions - noobs is installing all your partitions right well for your sd-card.

also i created a config.properties on pc - i wrote all my data in advance. so i hadn't to type in the privat-key manually. i only had to copy the file, after installing nem, into the nis-folder (i wrote the command in your config.nem)


The two simple scripts that i made are automatic, one download, configure and install java and NEM,  run them in the Rasp, and the other serves to put the privatekey trhough PC to avoid having to type it.

Is scheduled to install java ARM version, you installed java 64 bit? But it's done just to intel/AMD processors ?
I used this raspbian image to be more efficient and lightweight, as described in the guy who compiled it.

The good would be an ready-to-use image of the system.
And one way to easily upgrade.



Could someone also write a script to update NEM and Java on RaspberryPi? I guess the ultimate aim would be to provide a yum / apt repository on nem.ninja but I wouldn't have a clue how to do this as I'm a Windows engineer and only dabble in Linux

KC
Heres a script more decent than mine, is the closest we come to a linux package. ;)
https://forum.ournem.com/vps-nodes/how-to-easily-configure-and-install-nem-on-an-amazon-ec2-vps/

:slight_smile: yes, i know - and your scripts are pretty good and they helped me really a lot. thank you so much for this. but in my case your recommended image doesn't work… i tried serveral times… first - of course - i used your java version… after that i tried the 64bit (doesn't work, too)
here, i should say i'm an absolute beginner in linux programming. never done this before…

for me, it was easier to install noobs (with ready to use java and partitions) instead of installing the original image… i think there is no difference between your image and noobs in performance. because i don't run x… (it's installed but not running)


:-) yes, i know - and your scripts are pretty good and they helped me really a lot. thank you so much for this. but in my case your recommended image doesn't work... i tried serveral times... first - of course - i used your java version.. after that i tried the 64bit (doesn't work, too)
here, i should say i'm an absolute beginner in linux programming. never done this before...

for me, it was easier to install noobs (with ready to use java and partitions) instead of installing the original image... i think there is no difference between your image and noobs in performance. because i don't run x... (it's installed but not running)
Ook :)
what raspberry did you use?


:-) yes, i know - and your scripts are pretty good and they helped me really a lot. thank you so much for this. but in my case your recommended image doesn't work... i tried serveral times... first - of course - i used your java version.. after that i tried the 64bit (doesn't work, too)
here, i should say i'm an absolute beginner in linux programming. never done this before...

for me, it was easier to install noobs (with ready to use java and partitions) instead of installing the original image... i think there is no difference between your image and noobs in performance. because i don't run x... (it's installed but not running)
Ook :)
what raspberry did you use?


raspberry pi b+

and it's running really stable, now... i didn't deactivate swap - but it's using very rarely... :-) I'm happy with it! ;-)

Nice guide, too bad the raspi cant support that many harvesters. thanks


Nice guide, too bad the raspi cant support that many harvesters. thanks

Did you test it?

an update of the tutorial would be very apreciated :slight_smile:

Here is an updated guide: