Last active
April 3, 2016 07:26
-
-
Save fonylew/f0f582f8a17b1f5fc8e0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# edit sources.list | |
sudo vi /etc/apt/sources.list | |
# remove last two lines | |
# add these two line to .bashr | |
sudo echo "export LC_ALL=en_US.utf8" >>~/.bashrc | |
sudo echo "export LANGUAGE=en_US.utf8" >>~/.bashrc | |
sudo apt-get install screen vim openjdk-7-jdk openjdk-7-jre | |
sudo chmod 777 /var/run/docker.sock | |
# set default java version to 1.7.0 | |
sudo update-alternatives --config java | |
# set ulimit | |
sudo vim /etc/security/limit.conf | |
# add fony soft nofile 40000 | |
# fony hard nofile 40000 | |
sudo vim /etc/pam.d/su | |
# uncomment session required pam_limits.so | |
# restart after this step | |
# initialize required directory | |
cd /opt | |
sudo mkdir data-copy | |
# copy *.csv and *.cypher script here | |
# set up docker | |
docker pull sequenceiq/hadoop-docker:2.4.1 | |
docker pull kbastani/docker-neo4j:2.2.1 | |
docker pull kbastani/neo4j-graph-analytics:latest | |
# Create HDFS | |
docker run -i -t --name hdfs sequenceiq/hadoop-docker:2.4.1 /etc/bootstrap.sh -bash | |
# Create Mazerunner Apache Spark Service | |
docker run -i -t --name mazerunner --link hdfs:hdfs kbastani/neo4j-graph-analytics:latest | |
# Create Neo4j database with links to HDFS and Mazerunner | |
docker run -it -p 7474:7474 -v /opt/data-copy:/opt/data-copy --name graphdb --link mazerunner:mazerunner --link hdfs:hdfs kbastani/docker-neo4j:2.2.1 /bin/bash | |
# without mazerunner | |
docker run -it -p 7474:7474 -v /opt/data-copy:/opt/data-copy --name graphdb kbastani/docker-neo4j:2.2.1 /bin/bash | |
# RStudio | |
docker run -d --name rstudio -p 8787:8787 rocker/rstudio | |
# Apache HTTPD with PHP | |
docker run -d -it -p 80:80 --name php -v "$PWD":/var/www/html php | |
# download and untar neo4j | |
# rename it to "neo4j" | |
# import data to neo4j | |
cd ~/neo4j | |
bin/neo4j-shell -path data/graph.db -file /opt/data-copy/index.cypher | |
bin/neo4j-shell -path data/graph.db -file /opt/data-copy/import.cypher | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment