Wednesday, February 24, 2016

Neo4j and Python on Ubuntu


Isolate your development environment with Vagrant and Ubuntu.

Initialize a vagrant machine by copying this Vagrantfile into a directory:
Vagrant.configure("2") do |config|
  config.vm.provision "shell", inline: "echo Initiate Provisioning ..." = "ubuntu/trusty64" "public_network", bridge: [ 'en0: Wi-Fi (AirPort)', 'en1: Thunderbolt 1', 'en2: Thunderbolt 2', 'bridge0' ]
  config.vm.synced_folder("scripts", "/home/vagrant/scripts")

  config.vm.provider "virtualbox" do |v|
    v.gui = false
    v.memory = "4096"
    v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
    v.customize ["modifyvm", :id, "--natdnsproxy1", "on"]

  config.vm.define "neo" do |neo|
    neo.vm.hostname = "neo" "private_network", ip: "" :forwarded_port, guest: 7474, host: 7474


On the terminal, navigate to the directory with the Vagrantfile and type:
vagrant up && vagrant ssh

You may need to change the profiles in the section "public_network" to reference network adapters on your machine. You may also wish to change the IP address specified in this section "private_network".


Java must be installed first

Neo4j Installation

$ sudo apt-get update -y

$ sudo su
$ wget -O - | apt-key add -
$ echo 'deb stable/' > /etc/apt/sources.list.d/neo4j.list
$ exit

$ sudo apt-get update -y
$ sudo apt-get install -y neo4j
The digital ocean blog referenced below gives detail about each command.  Note that I was sudo su for the purpose of the first two commands.

Once the commands have been executed, Neo4J should be running.

Verify installation success with the following command:
vagrant@neo:~$ service neo4j status
 * neo4j is running

Also via the web browser at: