Pages

Sunday, August 14, 2016

systemd Neo4j service on Ubuntu

systemd ships as the default process manager on Ubuntu 15; get the neo4j systemd service file to install and learn about the configuration. systemd has a lot of great features and I encourage you to check it out as it’s a big improvement IMO from SystemV and Upstart. If you’ve started working with systemd to manage your neo4j process, then you

might have stumble through the new setup. Here are a couple things I found helpful and some config that might get you moving along faster. I won’t go into detail on how to install services with systemd but it basically breaks down into these steps:
  1.  Save service file  /lib/systemd/system/neo4j.services 
  2.  Reload config sudo systemctl daemon-reload 
  3.  Enable on startup sudo systemctl enable neo4j.service 

Service file for systemd and neo4j

For those simply looking for a working neo4j.service file one is shown below. The rest of the writeup goes into detail how to install this service file and why some of the properties are set the way they are. This configuration assumes you have linked the neo4j script into /etc/init.d/neo4j and that your neo4j installation is at /opt/neo4j e.g. NEO4J_HOME=/opt/neo4j. The file below should be located at:
/lib/systemd/system/neo4j.services


Backwards compatibility of systemd service for neo4j

From all my readings (and experience) systemd is backwards compatible with SystemV. This means that running services such as service neo4j start should continue to work if you have linked the neo4j process into

No comments:

Post a Comment