Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install apoc for neo4j?

According to https://neo4j-contrib.github.io/neo4j-apoc-procedures/, one only needs to download the binary jar from http://github.com/neo4j-contrib/neo4j-apoc-procedures/releases/3.1.0.3 to place into the folder "Neo4j CE 3.1.1\plugins".

I did so. However, I was unable to call "call apoc.help("apoc")" from the http://localhost:7474/browser/.

like image 294
Aqqqq Avatar asked Mar 11 '17 20:03

Aqqqq


People also ask

How do I install APOC on Neo4j Docker?

APOC Full can be installed with Neo4j Desktop, after creating your database, by going to the Manage screen, and then the Plugins tab. Click Install in the APOC box and wait until you see the "Installed" message.

How do I add Plugins to Neo4j?

For each DBMS, active or not, you have the option to install a plugin library. This can be accessed by selecting a DBMS and then the Plugins -tab in the pane on the right. Plugins are not available for remote databases on Neo4j Desktop, as they work only for local databases.

What is APOC in Neo4j?

APOC is an add-on library for Neo4j that provides hundreds of procedures and functions adding a lot of useful functionality. The library covers a lot of things, that's why we provide a searchable Overview of all APOC functions and procedures.


2 Answers

I'm using Red Hat Linux specifically Oracle-7 and here is how I got it working

  1. Download the apoc-<version>.jar into the /var/lib/neo4j/plugins directory
  2. chown neo4j:neo4j apoc-<version>.jar
  3. chmod 755 apoc-<version>.jar
  4. Open the neo4j.conf at /etc/neo4j/neo4j.conf and replace the line #dbms.security.procedures.whitelist=apoc.coll.*,apoc.load.* with dbms.security.procedures.whitelist=apoc.coll.*,apoc.load.*,apoc.* and save it.
  5. Restart the Neo4j service by issuing the command systemctl restart neo4j

Note: Make sure that you have the right version of apoc jar downloaded. I'm using the neo4j version 3.5.5 and the apoc jar version I'm using is apoc-3.5.0.3-all.jar. Alos make sure that you have the dbms.directories.plugins=/var/lib/neo4j/plugins uncommented in the /etc/neo4j/neo4j.conf

like image 99
neaGaze Avatar answered Sep 28 '22 02:09

neaGaze


according to documentation: there are 2 types of APOC

  1. APOC Core
  2. APOC Full

first one included in the installation folder($NEO4J_HOME/labs) and for the second one u need to download it("Make sure that the first two version numbers match between Neo4j and APOC").

if u want to go with APOC Core just copy $NEO4J_HOME/labs/apoc-...jar file to the $NEO4J_HOME/plugins

and for APOC Full download the package then put it into $NEO4J_HOME/plugins directory. finally restart.

linux command for APOC Core assuming neo4j installed in /var/lib/neo4j:

sudo cp /var/lib/neo4j/labs/apoc-4.3.0.3-core.jar /var/lib/neo4j/plugins/
sudo chown neo4j:neo4j /var/lib/neo4j/plugins/apoc-4.3.0.3-core.jar
sudo systemctl restart neo4j
like image 28
amin arghavani Avatar answered Sep 28 '22 01:09

amin arghavani