Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
raspberry_pi_guide [2018/10/03 12:41]
armchairguru
raspberry_pi_guide [2019/05/06 19:46] (current)
armchairguru
Line 1: Line 1:
-===== Raspberry Pi Headless Setup for Profit Trailer =====+/* 
 +This is a hidden comment area - don't delete 
 +This page is also a slide - be careful with markup, and test both the page AND the slide when editing 
 +*/
  
-Java v8 (1.8.0_131 and up) is required. Upgrade instructions are shown below+~~REVEAL~~ 
 +====Raspberry Pi Pre-Setup for ProfitTrailer==== 
 +In slideshow mode, use arrow keys or the navigation buttons at lower right of screen to move forward/​back.\\
  
-Here is an article that explains installing Java on a Pi. Reference it if you are unfamiliar. [[http://​blog.livthomas.net/​installing-java-8-on-raspberry-pi-3/​]]+Java v8 (1.8.0_131 and up) is required.\\ 
 +Here is an article that explains installing Java on a Pi. Reference it if you are unfamiliar.\\ 
 +[[http://​blog.livthomas.net/​installing-java-8-on-raspberry-pi-3/​]]
  
- +====Remove the old Java===
-=== Remove the old Java===+Enter one line at a time\\
 <​code>​ <​code>​
 sudo apt-get purge openjdk sudo apt-get purge openjdk
Line 13: Line 20:
 </​code>​ </​code>​
  
-=== Install needed package===+====Install needed package====
 <​code>​ <​code>​
 sudo apt-get install dirmngr sudo apt-get install dirmngr
 </​code>​ </​code>​
  
-=== Add Keyserver===+====Add Keyserver====
 <​code>​ <​code>​
 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key EEA14886 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key EEA14886
 </​code>​ </​code>​
  
-=== Edit Source list===+====Edit Source list====
 <​code>​ <​code>​
 sudo nano /​etc/​apt/​sources.list sudo nano /​etc/​apt/​sources.list
 </​code>​ </​code>​
  
-=== Add these lines to the bottom and exit with CTRL+X, type "​Y"​ and enter twice===+====Add these lines to the bottom and exit with CTRL+X, type "​Y"​ and enter twice====
 <​code>​ <​code>​
 deb http://​ppa.launchpad.net/​webupd8team/​java/​ubuntu trusty main deb http://​ppa.launchpad.net/​webupd8team/​java/​ubuntu trusty main
Line 34: Line 41:
 </​code>​ </​code>​
  
-=== Update repo and install the latest version of Java===+====Update repo and install the latest version of Java====
 <​code>​ <​code>​
 sudo apt-get update sudo apt-get update
Line 41: Line 48:
 </​code>​ </​code>​
  
-=== Check java version===+====Alternatively try the following commands if above does not work for you==== 
 +<​code>​ 
 +sudo add-apt-repository ppa:​openjdk-r/​ppa 
 +sudo apt update 
 +sudo apt install openjdk-8-jdk 
 +</​code>​ 
 + 
 +====Check java version====
 <​code>​ <​code>​
 java -version java -version
 </​code>​ </​code>​
  
----- +====Raspberry Pi Headless Setup for Profit Trailer==== 
- +Requirements\\
-==== Raspberry Pi Headless Setup for Profit Trailer ==== +
- +
-=== Requirements ​===+
   * Raspberry Pi 3 Model B (+ Power & MicroSD)   * Raspberry Pi 3 Model B (+ Power & MicroSD)
   * ProfitTrailer (including bought license key)   * ProfitTrailer (including bought license key)
Line 56: Line 67:
   * And of course a little bit of BTC to trade   * And of course a little bit of BTC to trade
  
-----+====Downloads==== 
 +  * Etcher (https://​etcher.io) 
 +  * Raspbian Stretch with Desktop image (https://​www.raspberrypi.org/​downloads/​raspbian/​) 
 +  * RealVNC (https://​www.realvnc.com/​en/​connect/​download/​viewer/​) 
 +  * Profit Trailer (https://​github.com/​taniman/​profit-trailer/​releases)
  
-=== Downloads === +====SD Card Preparation====
-  * Etcher //​(https://​etcher.io)//​ +
-  * Raspbian Stretch with Desktop image //​(https://​www.raspberrypi.org/​downloads/​raspbian/​)//​ +
-  * RealVNC //​(https://​www.realvnc.com/​en/​connect/​download/​viewer/​)//​ +
-  * Profit Trailer //​(https://​github.com/​taniman/​profit-trailer/​releases)//​ +
- +
- +
----- +
- +
-=== SD Card Preparation ===+
   * Download the latest version of Raspbian Stretch with Desktop   * Download the latest version of Raspbian Stretch with Desktop
   * Burn the firmware IMG on your MicroSD card using Etcher   * Burn the firmware IMG on your MicroSD card using Etcher
   * Create an empty file called ''​ssh''​ using a text editor   * Create an empty file called ''​ssh''​ using a text editor
   * Place the ''​ssh''​ file in the “root” (''/​boot''​) of the MicroSD card   * Place the ''​ssh''​ file in the “root” (''/​boot''​) of the MicroSD card
-  * OPTIONAL for WiFi: Create a file called ''​wpa_supplicant.conf''​ containing this code with your own WiFi credentials(!):​ +(Next Slide -->) 
-  *<​code>​+---->>​ 
 +OPTIONAL for WiFi: Create a file called ''​wpa_supplicant.conf''​ containing this code with your own WiFi credentials(!):​ 
 +<​code>​
 ctrl_interface=DIR=/​var/​run/​wpa_supplicant GROUP=netdev ctrl_interface=DIR=/​var/​run/​wpa_supplicant GROUP=netdev
 update_config=1 update_config=1
Line 84: Line 92:
 } }
 </​code>​ </​code>​
- 
   * Place the ''​wpa_supplicant.conf''​ file in the “root” (''/​boot''​) of the MicroSD card.   * Place the ''​wpa_supplicant.conf''​ file in the “root” (''/​boot''​) of the MicroSD card.
- +<---- 
----- +---->> 
- +====Raspberry Pi Installation====
-=== Raspberry Pi Installation ===+
   * Place the MicroSD card inside the Pi (+ LAN if you don't use WiFi)   * Place the MicroSD card inside the Pi (+ LAN if you don't use WiFi)
   * Turn on the Raspberry Pi and wait till the yellow light turns off   * Turn on the Raspberry Pi and wait till the yellow light turns off
   * Open up your console (Terminal, CMD etc.) and ssh into your Pi using:   * Open up your console (Terminal, CMD etc.) and ssh into your Pi using:
   *<​code>​ssh pi@your_network_id</​code>​   *<​code>​ssh pi@your_network_id</​code>​
 +(Next Slide-->​)
 +<----
 +---->>​
   * The standard password should be “raspberry” with user being “pi”   * The standard password should be “raspberry” with user being “pi”
   * Once you’re in, update your Raspberry Pi with:   * Once you’re in, update your Raspberry Pi with:
-  *<​code>​sudo apt-get update+<​code>​sudo apt-get update
 sudo apt-get dist-upgrade sudo apt-get dist-upgrade
 sudo apt-get clean sudo apt-get clean
 </​code>​ </​code>​
   * Once done, reboot your Raspberry Pi using: <​code>​sudo reboot</​code>​   * Once done, reboot your Raspberry Pi using: <​code>​sudo reboot</​code>​
- +<---- 
----- +---->> 
- +====Configure Raspberry Pi and VNC====
-=== Configure Raspberry Pi and VNC ===+
   * Once again, open up your console and ssh into your Raspberry Pi   * Once again, open up your console and ssh into your Raspberry Pi
   * Open up the Raspberry Pi configurator using <​code>​sudo raspi-config</​code>​   * Open up the Raspberry Pi configurator using <​code>​sudo raspi-config</​code>​
   * Start by changing the password *(highly recommended for security reasons)*   * Start by changing the password *(highly recommended for security reasons)*
   * Change ''​Boot Options''​ -> ''​Desktop / CLI''​ -> ''​Desktop Autologin''​   * Change ''​Boot Options''​ -> ''​Desktop / CLI''​ -> ''​Desktop Autologin''​
 +(Next Slide -->)
 +<----
 +---->>​
   * Change Localisations   * Change Localisations
     * ''​Change Locale''​ -> ''​OK''​ -> ''​OK''​     * ''​Change Locale''​ -> ''​OK''​ -> ''​OK''​
Line 115: Line 126:
   * Lastly, go to ''​Advanced Settings''​ -> ''​Resolution''​ -> ''​1280x720''​   * Lastly, go to ''​Advanced Settings''​ -> ''​Resolution''​ -> ''​1280x720''​
   * Then ''​Finish''​ these settings and ''​Reboot''​ *(don’t exit using ESC)*   * Then ''​Finish''​ these settings and ''​Reboot''​ *(don’t exit using ESC)*
- +<---- 
----- +---->> 
- +====Ready! Login using VNC====
-=== Ready! Login using VNC ===+
   * Open VNC Viewer and type the network address from your Raspberry Pi   * Open VNC Viewer and type the network address from your Raspberry Pi
   * Login using username ''​pi''​ and the password you set earlier   * Login using username ''​pi''​ and the password you set earlier
Line 124: Line 134:
   * To access your Pi from anywhere, create a VNC Account   * To access your Pi from anywhere, create a VNC Account
 (And login using that account on the Pi VNC client) (And login using that account on the Pi VNC client)
- +<---- 
----- +---->> 
- +====Installing Profit Trailer====
-=== Installing Profit Trailer ===+
   * Download Profit Trailer and put in in your ''/​home/​pi''​ folder   * Download Profit Trailer and put in in your ''/​home/​pi''​ folder
-  * Follow the Profit Trailer Wiki on how to set up the bot //(https://github.com/taniman/​profit-trailer/​wiki)// +  * Follow the [[https://wiki.profittrailer.com/doku.php?​id=mandatory_settings|mandatory settings]] for the bot 
-  * Enjoy your headless Raspberry Pi with Profit Trailer! +(Next Slide for example Application Properties ​-->
- +<---- 
-When you open the GUI for the first time you will be asked to set a password. You will also need to enter your [[application.properties#​default_api_key]] to confirm you are the owner. +---->>​ 
- +{{ app-properties.mp4?​640x480&​app-prop-preview.png |Application Properties Video Guide}} 
----- +<---- 
- +---->>​ 
-=== Easy ProfitTrailer Startup Script ===+When you open the GUI for the first time you will be asked to set a password. You will also need to enter your default_api_key to confirm you are the owner. 
 +<---- 
 +---->> 
 +====Easy ProfitTrailer Startup Script====
   * Start ProfitTrailer with just ''​profittrailer''​ in the terminal?   * Start ProfitTrailer with just ''​profittrailer''​ in the terminal?
   * Create a file by typing the following command in the terminal:   * Create a file by typing the following command in the terminal:
   *<​code>​sudo nano /​usr/​local/​bin/​profittrailer</​code>​   *<​code>​sudo nano /​usr/​local/​bin/​profittrailer</​code>​
 +(Next Slide -->)
 +<----
 +---->>​
   * Paste the following script inside it:   * Paste the following script inside it:
-  *<​code>​+<​code>​
 #!/bin/bash #!/bin/bash
 cd ~/​ProfitTrailer cd ~/​ProfitTrailer
-sudo java -Djava.net.preferIPv4Stack=true -Dsun.stdout.encoding=UTF-8 -XX:+UseConcMarkSweepGC ​-Xmx512m -Xms512m ​-jar ProfitTrailer.jar ​+sudo java -Djava.net.preferIPv4Stack=true -Dsun.stdout.encoding=UTF-8 ​-Dio.netty.allocator.numDirectArenas=0 -Djdk.nio.maxCachedBufferSize=262144 ​-XX:+UseSerialGC -XX:​+UseStringDeduplication -Xms64m ​-Xmx512m -XX:​CompressedClassSpaceSize=300m -XX:​MaxMetaspaceSize=128m ​-jar ProfitTrailer.jar ​
 </​code>​ </​code>​
   * Close and save the file with ctrl + x (select YES when asked)   * Close and save the file with ctrl + x (select YES when asked)
Line 150: Line 165:
   *<​code>​sudo chmod +x /​usr/​local/​bin/​profittrailer</​code>​   *<​code>​sudo chmod +x /​usr/​local/​bin/​profittrailer</​code>​
   * Enjoy running ProfitTrailer without typing the whole command   * Enjoy running ProfitTrailer without typing the whole command
- +<---- 
-~~DISCUSSION~~+---->>​ 
 +This concludes the ProfitTrailer Raspberry Pi Setup Guide  
 +<----
  • raspberry_pi_guide.1538570460.txt.gz
  • Last modified: 9 months ago
  • by armchairguru