suppliers:hvac.io:graphivac:installation
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
suppliers:hvac.io:graphivac:installation [2017/03/14 18:46] – created frozenlock | suppliers:hvac.io:graphivac:installation [Unknown date] (current) – external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 3: | Line 3: | ||
Graphivac server runs on [[http:// | Graphivac server runs on [[http:// | ||
- | ==== 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: | ||
{{: | {{: | ||
- | ==== graphivac-server.jar | + | ===== Graphivac Server ===== |
The entire Graphivac server is contained within a single .jar file. | The entire Graphivac server is contained within a single .jar file. | ||
Line 29: | Line 29: | ||
You can now take your browser and go to: | You can now take your browser and go to: | ||
< | < | ||
+ | |||
+ | NB: When downloading new versions, you might need to rename the java file. | ||
+ | ===== Adding Graphivac as a Service ===== | ||
+ | |||
+ | 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 " | ||
+ | |||
+ | Open it and paste the following: | ||
+ | |||
+ | |||
+ | <code bash graphivac.conf> | ||
+ | |||
+ | description " | ||
+ | author " | ||
+ | |||
+ | 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 / | ||
+ | #replace PORT with the desired port number | ||
+ | script | ||
+ | cd PATH-TO-THE-JAR | ||
+ | java -jar graphivac-server.jar PORT & | ||
+ | end script | ||
+ | |||
+ | </ | ||
+ | |||
+ | Now, once you replaced PATH-TO-THE-JAR and PORT with their correct values, move the file to /etc/init: | ||
+ | |||
+ | < | ||
+ | sudo mv graphivac.conf / | ||
+ | </ | ||
+ | |||
+ | That's it! | ||
+ | Now reboot and Graphivac should start automatically. | ||
+ | |||
+ | To get more info about Upstart and services, see http:// | ||
+ | |||
suppliers/hvac.io/graphivac/installation.1489517170.txt.gz · Last modified: 2017/03/14 14:46 (external edit)