Skip to content

Instantly share code, notes, and snippets.

@shanonvl
Forked from jtescher/neo4j-enterprise.rb
Last active March 29, 2017 15:25
Show Gist options
  • Save shanonvl/994c0b4c77969846bb1662515a7323c6 to your computer and use it in GitHub Desktop.
Save shanonvl/994c0b4c77969846bb1662515a7323c6 to your computer and use it in GitHub Desktop.
Neo4j Enterprise Homebrew Formula
require 'formula'
class Neo4jEnterprise < Formula
homepage 'http://www.neo4j.org/'
url "http://dist.neo4j.org/neo4j-enterprise-3.1.3-unix.tar.gz"
sha256 'b784a61228bdc31cbc843009e4d36d3e2aee7662f8b40bd608b8759de26b77d5'
version "3.1.3"
devel do
url "http://dist.neo4j.org/neo4j-enterprise-3.1.3-unix.tar.gz"
sha256 'b784a61228bdc31cbc843009e4d36d3e2aee7662f8b40bd608b8759de26b77d5'
version "3.1.3"
end
def install
# Remove windows files
rm_f Dir["bin/*.bat"]
# Fix the permissions on the global settings file.
chmod 0644, Dir["config"]
# Install jars in libexec to avoid conflicts
libexec.install Dir['*']
# Symlink binaries
bin.install_symlink Dir["#{libexec}/bin/neo4j{,-shell}"]
# Symlink binaries
bin.install_symlink Dir["#{libexec}/bin/cypher-shell"]
end
def caveats; <<-EOS.undent
Quick-start guide:
1. Add NEO4J_HOME to your shell profile:
export NEO4J_HOME=/usr/local/Cellar/neo4j-enterprise/3.1.3/libexec
2. Start the server manually:
neo4j start
3. Stop:
neo4j stop
To launch on startup, install launchd-agent to ~/Library/LaunchAgents/ with:
neo4j install
If this is an upgrade, see:
#{libexec}/UPGRADE.txt
The manual can be found in:
#{libexec}/doc/
You may need to add JAVA_HOME to your shell profile:
export JAVA_HOME="$(/usr/libexec/java_home)"
EOS
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment