DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Related

  • AWS WAF Classic vs WAFV2: Features and Migration Considerations
  • Understanding the Power of AWS Organizations: Streamlining Cloud Management
  • Unlocking Advanced AWS Cost Optimization With Trusted Advisor
  • Monitoring and Logging in Cloud Architecture With Python

Trending

  • Driving DevOps With Smart, Scalable Testing
  • Navigating the LLM Landscape: A Comparative Analysis of Leading Large Language Models
  • Building AI-Driven Intelligent Applications: A Hands-On Development Guide for Integrating GenAI Into Your Applications
  • Concourse CI/CD Pipeline: Webhook Triggers
  1. DZone
  2. Data Engineering
  3. Databases
  4. How to deploy a neo4j instance in Amazon EC2 in 10 minutes

How to deploy a neo4j instance in Amazon EC2 in 10 minutes

By 
Nicolas Garnil user avatar
Nicolas Garnil
·
Dec. 27, 11 · Interview
Likes (1)
Comment
Save
Tweet
Share
27.0K Views

Join the DZone community and get the full member experience.

Join For Free

Neo4j is a high-performance, NOSQL graph database with all the features of a mature and robust database. In this post I will explain how to deploy a neo4j instance in Amazon EC2 web service.

For this tutorial to take you no more than 10 minutes you should be able to execute properly some bash commands like mv, tar, ssh and scp (secure copy). I also assume that you have an account in Amazon Web Services and you are familiar to the process of launching instances. If not, I strongly recommend you to follow this starting guide and complete it till you manage to connect to your instance with ssh.

Start downloading the latest stable version of neo4j. Which you can find here. The “Community Edition” fits well for development purposes. Do not forget to select the Unix version of the server. This will download a tar.gz file which you will copy to your EC2 instance later.

While you download the neo4j server open the AWS Management Console and launch a Basic 32-bit Amazon Linux AMI. If you want to launch an Ubuntu AMI please notice that it doesn’t ship with Java, which is required for running neo4j.

If you are not familiar with key pairs, pem files or security groups I insist you to follow the EC2 starting guide I mentioned above. You can either create a new security group or use the default, but you will need to configure a new security rule for the neo4j server port.

After launching the instance, create a TCP rule on port 7474 with source 0.0.0.0/0. Here you are opening port 7474 for anyone. If you are planning to use the neo4j REST API and remotely call it from another server, for example a Rails application hosted in Heroku, for security reasons, you may want to change the source field to the address of your Heroku server.

Do not forget to open port 22 (SSH), this is typically the first rule normal people create after launching an instance.

You are almost done! You should now install neo4j in your instance. Open a terminal in your localhost and navigate to the path where you downloaded neo4j. Copy the file to your Amazon instance by using the scp command:

scp -i your_pem_file.pem neo4j-community-1.6.M01-unix.tar.gz ec2-user@YOUR_PUBLIC_INSTANCE_DNS:/home/ec2-user

Please notice that you will need to change the path to your pem file, typically placed in ~/.ssh, the filename of the neo4j server you just downloaded and the plublic DNS of your instance.

Now connect to your instance with SSH:

ssh -i your_pem_file.pem ec2-user@YOUR_PUBLIC_INSTANCE_DNS

Untar the neo4j server:

tar xvfz neo4j-community-1.6.M01-unix.tar.gz.tar.gz

Move it to /usr/local and rename the folder to neo4j:

sudo mv neo4j-community-1.6.M01 /usr/local/neo4j

Almost done!!! You should now open neo4j-server.properties under the conf directory and add the following line:

org.neo4j.server.webserver.address=0.0.0.0

This lines allows anyone to connect remotely to your neo4j database server.

Now run the start script. From the neo4j server folder.

sudo ./bin/neo4j start

Finally, open a browser and access the webadmin interface of your neo4j database by typing http://YOUR_PUBLIC_INSTANCE_DNS:7474. You should see the Neo4j Monitoring and Management Tool, pretty cool!

If not, ask me :)

You can now try using the REST API and the curl bash command to insert nodes and relationships.

I hope this post helped you, good luck! Follow me on Twitter @negarnil

 

Source: http://www.cloudtmp.com/java/how-to-deploy-a-neo4j-instance-in-amazon-ec2-in-10-minutes/

AWS Neo4j Amazon Web Services

Opinions expressed by DZone contributors are their own.

Related

  • AWS WAF Classic vs WAFV2: Features and Migration Considerations
  • Understanding the Power of AWS Organizations: Streamlining Cloud Management
  • Unlocking Advanced AWS Cost Optimization With Trusted Advisor
  • Monitoring and Logging in Cloud Architecture With Python

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: