Difference between revisions of "How to install & execute"

From AMTech WikiDocs
Jump to: navigation, search
(Manual installation of initial components and prerequesites)
Line 3: Line 3:
 
* Installs Ubuntu OS on a  
 
* Installs Ubuntu OS on a  
 
: <code>https://ubuntu-mate.org/raspberry-pi/</code>
 
: <code>https://ubuntu-mate.org/raspberry-pi/</code>
 +
* Install java 7
 +
: <code>sudo add-apt-repository ppa:webupd8team/java</code>
 +
: <code>sudo apt-get update</code>
 +
: <code>sudo apt-get install oracle-java7-installer</code>
 
* Install nodejs 5.x by adding this repository 'deb https://deb.nodesource.com/node_5.x xenial main' with:
 
* Install nodejs 5.x by adding this repository 'deb https://deb.nodesource.com/node_5.x xenial main' with:
 
: <code>curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -</code>
 
: <code>curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -</code>

Revision as of 19:44, 7 May 2016

Os and core components

Manual installation of initial components and prerequesites

  • Installs Ubuntu OS on a
https://ubuntu-mate.org/raspberry-pi/
  • Install java 7
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
and then:
sudo apt-get install -y nodejs
  • Allow nodejs program to bind to ports under 1024
sudo setcap 'cap_net_bind_service=+ep' /usr/bin/nodejs
  • Installs and configures Bluetooth core libraries
sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev

M2MBridge installation

  • Clone git repository (https://github.com/AMTechMX/M2MBridge.git)
  • Delete unneeded plugins from /.../M2MBridge/plugins/xxx (optional)
  • Install packages for m2mBridge core and plug-ins (https://docs.npmjs.com/cli/install:)
  • Execute npm install --save at:
    • M2MBridge directory
    • Each plugin directory
  • If you get this error; var cwd = process.cwd(); Error: No such file or directory #200
https://github.com/foreverjs/forever/issues/200

M2MBridge execution

  • Customize the bridge configuration bridgeConfig,json, defining the templateId with the bridge instance from DAP to clone Cloud Configuration
  • Execute node m2mbridge.js (located in the M2MBridge directory)

The ansible way