How do you download Neo4j using the shell?

by Iain Elder

The Neo4j Server Installation documentation has minimal advice:

Download the latest release from http://neo4j.org/download
select the appropriate version for your platform

The website offers this download link for the current stable version of Neo4j on Linux: http://download.neo4j.org/artifact?edition=community&version=1.9.1&distribution=tarball

This works fine in a web browser but not in my shell.

I used wget to fetch the package using that link:

root@turing:/home/iain# wget http://download.neo4j.org/artifact?edition=community&version=1.9.1&distribution=tarball
[1] 14951
[2] 14952
root@turing:/home/iain# --2013-07-04 17:07:12-- http://download.neo4j.org/artifact?edition=community
Resolving download.neo4j.org... 198.101.198.70
Connecting to download.neo4j.org|198.101.198.70|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2013-07-04 17:07:13 ERROR 404: Not Found.
^C
[1]- Exit 8 wget http://download.neo4j.org/artifact?edition=community
[2]+ Done version=1.9.1

After reporting a 404 error, wget hangs until I kill it with CTRL + C.

A website called Geil Things has a Neo4j wiki article that contains the real download link.

The link is hidden in a shell script. The important line looks like this:

wget http://dist.neo4j.org/neo4j-community-${NEWVERSION}-unix.tar.gz

If you replace ${NEWVERSION} with 1.9.1 you get the link the current stable version of Neo4j.

The complete wget command looks like this:

wget http://dist.neo4j.org/neo4j-community-1.9.1-unix.tar.gz

If you run the command in the shell you should see output like this:

root@turing:/home/iain# wget http://dist.neo4j.org/neo4j-community-1.9.1-unix.tar.gz
--2013-07-04 17:21:52-- http://dist.neo4j.org/neo4j-community-1.9.1-unix.tar.gz
Resolving dist.neo4j.org... 178.236.4.60
Connecting to dist.neo4j.org|178.236.4.60|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 37512748 (36M) [application/x-tar]
Saving to: “neo4j-community-1.9.1-unix.tar.gz”
100%[======================================>] 37,512,748 30.5M/s in 1.2s
2013-07-04 17:21:53 (30.5 MB/s) - “neo4j-community-1.9.1-unix.tar.gz” saved [37512748/37512748]

Now you’ve downloaded the archive. You can continue to follow the installation instructions in the documentation.

About these ads