-
Notifications
You must be signed in to change notification settings - Fork 2
Installation Guide
Pashalis Grivas edited this page Jan 3, 2021
·
16 revisions
Step-by-step instructions for creating and filling a Neo4j graph database with random users and posts and running NeoBook (the social network app) local on your machine or on a server!
- Run
git clone (url of the repository)into a directory in order to download the project. - Download and install Neo4j Desktop or Server
- Download and Load an already filled database ("NeoBook Database" instance: 200,000 Users, 800,470 Nodes & 3,082,665 Relationships) OR:
- Create a database
- Change the
url,usernameandpasswordvalues in 'connect_to_db.py' file to match your server credentials. - Start your neo4j database. (if you already haven't)
- Filling Database with Dummy Data
-
Option 1 - [In 'Fill Database (200,000 Users)' directory]:
- Install python dependencies (Install Python 3 if you haven't)
-
pip install neo4j(Neo4j Driver for Python) -
pip install names(Name generator library) (Run as administrator if needed)
-
- Run the 'insert_users.py' with: (Creates 200k users with random information)
-
python insert_users.pycommand
-
- Run 'insert_relationships.py' with: (Creates 'follow' relations between users using 'Data/Slashdot0902.txt' relationship data.
-
python insert_relationships.pycommand
-
- Run the 'insert_posts.py' with: (Creates posts with random content for each user)
-
python insert_posts.pycommand - give the minimum and maximum number of users' posts
-
- Install python dependencies (Install Python 3 if you haven't)
-
Option 2 - [In 'Fill Database (50 Users) - Test Mode' directory]:
- Install python dependencies (Install Python 3 if you haven't)
-
pip install neo4j(Neo4j Driver for Python) -
pip install names(Name generator library) (Run as administrator if needed)
-
- Run the 'insert_users.py' with: (Creates 50 users with random information)
-
python insert_users.pycommand
-
- Run 'insert_relationships.py' with: (Creates 'follow' relations between the 50 users using 'Data/Slashdot0902.txt' relationship data.
-
python insert_relationships.pycommand
-
- Run the 'insert_posts.py' with: (Creates posts with random content for each user)
-
python insert_posts.pycommand - give the minimum and maximum number of users' posts
-
- Install python dependencies (Install Python 3 if you haven't)
-
Option 1 - [In 'Fill Database (200,000 Users)' directory]:
- Copy the 'app' folder (or only the contents of the folder) to 'htdocs' directory (if you're using XAMPP) or 'var/www' directory (if you're using Apache HTTP Server on Linux)
- Open the website with your browser using the following address:
- http://127.0.0.1/app (or http://127.0.0.1/ if you removed app folder)
- Create a new user or sign-in as an existing one with his
idas 'Username' and 'Password'
- Python scripts at step '6.' should be executed only once.
- In some cases additional PHP dependencies may be needed:
- Install 'Composer Dependency Manager for PHP' (on Windows)
- In 'app' directory (or 'htdocs' directory) run:
-
composer require neoxygen/neoclientcommand (Adds a Neo4j Driver for PHP)
-