rawjeev's techposts

  • Random
  • Archive
  • RSS
  • Ask me anything

Installing & running orientdb on Ubuntu Server

I just downloaded and installed OrientDB version 1.0rc4 on my Ubuntu server.
It is straight forward to get it up and running but with a few caveats for the Ubuntu user who wants to have Orientdb running at system startup.

If you haven’t heard of OrientDB before, please checkout the orient-db website.

And here are the first few mundane, no-brainers.

Download OrientDB:

You can go to the download page to get the latest release.
This is how I got my bundle:

# wget http://orient.googlecode.com/files/orientdb-1.0rc4.zip

Extract the archive:

Decide where you want OrientDB to be installed and extract the zip file to that folder

#sudo unzip orientdb-1.0rc4.zip -d /opt/orientdb-1.0rc4

Give execute permissions to shell scripts
Now go to the bin folder under the installation directory and make the shell scripts executable.

#sudo chmod 755 /opt/orientdb-1.0rc4/bin/*.sh

Running at system start-up:

Luckily for us, the installation bundle comes with an init script ready to use.
Open the orientdb.sh file under the bin folder and give the appropriate values for the variables.
I changed them as follows:

ORIENTDB_DIR=”/opt/orientdb-1.0rc4”
ORIENTDB_USER=”ubuntu”

After this you can copy the script to /etc/init.d/ and add it to the run levels to get orientdb to start when the system starts and shutdown when the system is shutdown.

However the caveat is, this script will work perfectly well if you have a root user with a password unlike my ubuntu server.

So to get it working fine on a Ubuntu server I chose to use the sudo command in place of su in the orientdb.sh script.

change the line:

su -c “cd "$ORIENTDB_DIR/bin"; /usr/bin/nohup ./server.sh 1>../log/orientdb.log 2>../log/orientdb.err &” - $ORIENTDB_USER

to:

sudo -u $ORIENTDB_USER sh -c “cd "$ORIENTDB_DIR/bin"; /usr/bin/nohup ./server.sh 1>../log/orientdb.log 2>../log/orientdb.err &”

and the line

su -c “cd "$ORIENTDB_DIR/bin"; /usr/bin/nohup ./shutdown.sh 1»../log/orientdb.log 2»../log/orientdb.err &” - $ORIENTDB_USER

to:

sudo -u $ORIENTDB_USER sh -c “cd "$ORIENTDB_DIR/bin"; /usr/bin/nohup ./shutdown.sh 1»../log/orientdb.log 2»../log/orientdb.err &”

Finally:

If you have copied the orientdb.sh to /etc/init.d folder then cd to the folder and execute the following:

#sudo update-rc.d orientdb defaults

    • #nosql
    • #orientdb
  • 6 months ago
  • 10
  • Comments
  • Permalink
  • Share
    Tweet

10 Notes/ Hide

  1. emileeyou89 liked this
  2. nosql-io reblogged this from techpost
  3. techpost posted this

Recent comments

Blog comments powered by Disqus
← Previous • Next →

About

Avatar For posts that are techy / matters a little grey that I din't want to be drowning in randomness.

Home Page     Rawjeev's Randoms

Me, Elsewhere

  • @rawjeev on Twitter
  • Facebook Profile
  • raw2ube on Youtube
  • rawjeev on Flickr
  • rawjeev on Delicious
  • Linkedin Profile
  • rawjeev on github

Twitter

loading tweets…

  • RSS
  • Random
  • Archive
  • Ask me anything
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr