LoginSignup
9
10

More than 5 years have passed since last update.

neo4jインストール手順@ubuntu

Posted at

ubuntuDISTRIB_RELEASE=12.04でneo4jをインストールした時のメモ

$ sudo -s
# wget -O - http://debian.neo4j.org/neotechnology.gpg.key | apt-key add - 
# echo 'deb http://debian.neo4j.org/repo stable/' > /etc/apt/sources.list.d/neo4j.list
# apt-get update
# apt-get install neo4j
$ cd /var/lib/neo4j
$ ./bin/neo4j start

ここで次のようなwarningがでる。

WARNING! You are using an unsupported version of the JDK. Please use JDK 6.

OpneJDKではダメみたいなので、Sun-java6を入れて、切り替える。

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java6-installer
sudo apt-get install oracle-java7-installer
screnn (OK)(OK)

$ sudo update-alternatives --config java
There are 3 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-6-oracle/jre/bin/java          1063      auto mode
  1            /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java   1061      manual mode
  2            /usr/lib/jvm/java-6-oracle/jre/bin/java          1063      manual mode
  3            /usr/lib/jvm/java-7-oracle/jre/bin/java          1062      manual mode

再度起動するも、下記のwarningが出る。

WARNING: Max 1024 open files allowed, minimum of 40 000 recommended. See the Neo4j manual.

ファイルのシステムリソースが足らないようなので設定を変える。

$ sudo vi /etc/security/limits.conf
下記4行追加
---
neo4j        hard        nofile        100000
neo4j        soft        nofile        40000
root         hard        nofile        100000
root         soft        nofile        40000
---

$ sudo vi /etc/pam.d/su
下記1行追加
---
session    required   pam_limits.so
---

外部からadminツールを使うときは、下記のようにする。

sudo vi ./conf/neo4j-server.properties

下記をチェック外して、IPを書き換える。
org.neo4j.server.webserver.address=0.0.0.0

$ ./bin/neo4j start

とりあえずここまで。

参考

9
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
10