Skip to content

Instantly share code, notes, and snippets.

@fforres
Last active August 4, 2016 20:48
Show Gist options
  • Save fforres/8f493e169af80d6e8ac6e7f2cb4406ef to your computer and use it in GitHub Desktop.
Save fforres/8f493e169af80d6e8ac6e7f2cb4406ef to your computer and use it in GitHub Desktop.
setting up digitalocean's instance of neo4j
free -m
df -h
sudo fallocate -l 1500M /swapfile
df -h
sudo chmod 600 /swapfile
ls -lh /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
free -m
sudo nano /etc/fstab
/swapfile none swap sw 0 0
Ctrl+O
Ctrl+X
sudo sysctl vm.swappiness=10
sudo sysctl vm.vfs_cache_pressure=50
cat /proc/sys/vm/swappiness
cat /proc/sys/vm/vfs_cache_pressure
poweroff
-------
#### Install Neo4J
wget -O - http://debian.neo4j.org/neotechnology.gpg.key| apt-key add -
echo 'deb http://debian.neo4j.org/repo stable/' > /etc/apt/sources.list.d/neo4j.list
aptitude update -y
aptitude install neo4j -y
------
#### Check neo4j
service neo4j-service status
ps -ef | grep neo4j
curl http://localhost:7474
nano /etc/neo4j/neo4j.conf
Uncomment the following line (remove the hash):
#dbms.connector.http.address=0.0.0.0:7474
#dbms.connector.bolt.address=0.0.0.0:7687
Ctrl+O and Ctrl+X
This will allow you to access the Neo4J ReST endpoints and subsequently the Browser UI from anywhere. We'll verify that momentarily, but your next steps will vary with what version of Neo4J server you are running.
Start Service
service neo4j restart
Change Password
apt-get install httpie
http -a neo4j:{pass} POST http://localhost:7474/user/neo4j/password password={newpass}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment