HVAC Wiki

All things related to HVAC

User Tools

Site Tools


suppliers:hvac.io:graphivac:installation

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
suppliers:hvac.io:graphivac:installation [2020/07/22 14:58] – old revision restored (2019/03/24 16:49) 95.91.41.38suppliers:hvac.io:graphivac:installation [2020/07/23 12:26] – old revision restored (2017/03/14 18:46) 192.99.4.151
Line 3: Line 3:
 Graphivac server runs on [[http://www.java.com|Java]], meaning it can work on Linux, Windows and Mac. Graphivac server runs on [[http://www.java.com|Java]], meaning it can work on Linux, Windows and Mac.
  
-===== Java =====+==== Java ====
  
 Make sure you have Java on your machine. (preferably 8 or higher)  Make sure you have Java on your machine. (preferably 8 or higher) 
Line 14: Line 14:
 {{:suppliers:hvac.io:vigilia:installation:java-version.png|}} {{:suppliers:hvac.io:vigilia:installation:java-version.png|}}
  
-===== Graphivac Server ===== +==== graphivac-server.jar ====
- +
-**NB: When downloading new versions, you might need to rename the java file.**+
  
 The entire Graphivac server is contained within a single .jar file. The entire Graphivac server is contained within a single .jar file.
Line 25: Line 23:
 The application can be started with the following command: The application can be started with the following command:
  
-<code> java -jar graphivac-server.jar </code> +<code> java -jar graphivac-server.jar <port number> </code>  
- +(where <port number> is the port you want to use.)
-You can also provide a specific port number with the -p argument : +
-<code> java -jar graphivac-server.jar -p 3003 </code> +
  
 After a few seconds, the server should be up and running.  After a few seconds, the server should be up and running. 
 You can now take your browser and go to: You can now take your browser and go to:
-<code> http://localhost:3003 </code> +<code> http://localhost:<port number> </code>
-===== Adding Graphivac as a Service (Optional) ===== +
- +
-You might want to make sure the Graphivac server always starts as soon as the server boots, or that it restores itself in case of a crash. +
- +
-For this, you'll have to add Graphivac as a service. +
- +
-Start by creating a file named "**graphivac.conf**"+
- +
-Open it and paste the following: +
- +
- +
-<code bash graphivac.conf> +
- +
-description "Graphivac Server" +
-author "Christian Fortin, HVAC.IO" +
- +
-start on runlevel [2345] +
-stop on runlevel [!2345] +
- +
- +
-#Respawn the process if it crashes +
-#If it respawns more than 10 times in 60 seconds stop +
-respawn +
-respawn limit 10 60 +
- +
-expect fork +
- +
-#replace PATH-TO-THE-JAR with something like /home/hvacio/graphivac +
-#replace PORT with the desired port number +
-script +
-    cd PATH-TO-THE-JAR +
-    java -jar graphivac-server.jar PORT & +
-end script +
- +
-</code> +
- +
-Now, once you replaced PATH-TO-THE-JAR and PORT with their correct values, move the file to /etc/init: +
- +
-<code> +
-sudo mv graphivac.conf /etc/init/graphivac.conf +
-</code> +
- +
-That's it! +
-Now reboot and Graphivac should start automatically. +
- +
-To get more info about Upstart and services, see http://upstart.ubuntu.com/cookbook/+
  
  
suppliers/hvac.io/graphivac/installation.txt · Last modified: 2020/07/23 08:28 (external edit)