#Installing NuBot on Raspbian This gist leans on https://bitbucket.org/JordanLeePeershares/nubottrading/src/6dfde29c56f66e16c0e506ad3f1ff3d203c58f84/docs/SETUP.md?at=release%2F0.3.2&fileviewer=file-view-default and tries to mitigate issues when trying to follow it on Raspbian.
E.g. no trustworthy repository for Java 8 installation packets available. Need to do it manually...
##Installing Java 8
###Resources
- Download page for Java 8: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
- Used download link: http://download.oracle.com/otn-pub/java/jdk/8u60-b27/jdk-8u60-linux-arm32-vfp-hflt.tar.gz
Remark: wget will not work with this link, because an authentication token is missing; start the download on a regular browser and use the download link that include the authentication token.
wget http://download.oracle.com/otn-pub/java/jdk/8u60-b27/jdk-8u60-linux-arm32-vfp-hflt.tar.gz?AuthParam=[some_more_number]
sudo tar zxvf jdk-8-linux-arm-vfp-hflt.tar.gz -C /opt
sudo update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_60/bin/javac 1
sudo update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_60/bin/java 1
sudo update-alternatives --config javac #confirm with enter
sudo update-alternatives --config java #confirm with enter
##Installing NuBot ###Resources
- Download page for NuBot: https://bitbucket.org/JordanLeePeershares/nubottrading/downloads
- Most recent NuBot at time of writing: https://bitbucket.org/JordanLeePeershares/nubottrading/downloads/nubot-v0.3.2.zip
Remark: sample-option.json needs to contain "streamingServer" : "stream.tradingbot.nu:8889"
wget https://bitbucket.org/JordanLeePeershares/nubottrading/downloads/nubot-v0.3.2.zip
unzip nubot-v0.3.2.zip
nano nubot-v0.3.2/config/sample-options.json #adjust parameters
cd nubot-v0.3.2
java -jar NuBot.jar -cfg=config/sample-options.json -skipCredentials
##Requesting credential token http://goo.gl/forms/nPjiDdsIUb
##Remark NuBot is often above 100% CPU load on a RaspberryPi 2. The RaPi 2 has 4 CPU cores and each of it is faster than the single core of the RaspberryPi 1 series.
RaspberryPi 2 seems to be the minimum requirement for running NuBot (at least for 0.3.2) on the RaspberryPi platform especially if running nud on the same machine is intended