Example
Prerequisite steps:
- Install Java at your machine
- Visit neo4j website and click the link "Download Community Edition" or visit directly the download link.
- Unzip the .tar downloaded file in your home directory
Start Neo4j from console (headless, without web server)
- Visit the sub-directory
/bin
of the extracted folder and execute in terminal
./neo4j console
- You can now execute neo4j queries in the terminal
Start Neo4j web server
- Visit the sub-directory /bin of the extracted folder and execute in terminal
./neo4j start
- Visit http://localhost:7474/
- Only the first time, you will have to sign in with the default account and change the default password. As of community version 3.0.3, the default username and password are neo4j and neo4j.
- You can now insert Neo4j queries in the console provided in your web browser and visually investigate the results of each query.
Start Neo4j web server
Each Neo4j server currently (in the community edition) can host a single Neo4j database, so in order to setup a new database:
- Visit sub-directory
/bin
and execute ./neo4j stop
to stop the server
- Visit the sub-directory
/conf
and edit the file neo4j.conf
, changing the value of the parameter dbms.active_database
to the name of the new database that you want to create.
- Visit again the sub-directory /bin and execute
./neo4j start
- The web server has started again with the new empty database. You can visit again http://localhost:7474/ to work with the new database.
- The created database is located in the sub-directory
/data/databases
, under a folder with the name specified in the parameter dbms.active_database
.
Delete one of the databases
-
Make sure the Neo4j server is not running; go to sub-directory /bin and execute ./neo4j status
. If the output message shows that the server is running, also execute ./neo4j stop
.
-
Then go to sub-directory /data/databases and delete the folder of the database you want to remove.