How to configure OrientDB in Ubuntu
To configure OrientDB in Ubuntu
In this article we will learn the steps to be followed to configure OrientDB in Ubuntu.
If the orientdb server is running stop it by pressing CTRL+C before configuring.
To configure OrientDB we are going to modify two configuration file /opt/orientdb/bin/orientdb.sh and /opt/orientdb/config/orientdb-server-config.xml
To add user for OrientDB
Let us add a user for OrientDB by running the following command.
root@linuxhelp:~# useradd -r orientdb -s /bin/false
Set the user and group ownership for the OrientDB installation directory as orientdb
root@linuxhelp:~# chown -R orientdb:orientdb /opt/orientdb
Now let’ s modify the orientdb.sh script file. Use any editor to view the file
root@linuxhelp:~# nano /opt/orientdb/bin/orientdb.sh
Set the Orientdb home directory path and user name by editing the parameter “ ORIENTDB_DIR” and “ ORIENTDB_USER”
ORIENTDB_DIR=" /opt/orientdb" ORIENTDB_USER=" orientdb"
In the start function of the script file, Comment out one line and add one more line to it.
# su $ORIENTDB_USER -c " cd " $ORIENTDB_DIR/bin" /usr/bin/nohup ./server.sh 1> ../log/orientdb.log 2> ../log/orientdb.err & " (--comment this line--) sudo -u $ORIENTDB_USER sh -c " cd " $ORIENTDB_DIR/bin" /usr/bin/nohup ./server.sh 1> ../log/orientdb.log 2> ../log/orientdb.err & " (--add this line--)
In the same way, locate to the stop function and do as follows.
#su $ORIENTDB_USER -c " cd " $ORIENTDB_DIR/bin" /usr/bin/nohup ./shutdown.sh 1> > ../log/orientdb.log 2> > ../log/orientdb.err & " (--comment this line--) sudo -u $ORIENTDB_USER sh -c " cd " $ORIENTDB_DIR/bin" /usr/bin/nohup ./shutdown.sh 1> > ../log/orientdb.log 2> > ../log/orientdb.err & " (--add this line--)
Now you can save and close the file.
Now use the below command to verify the configuration file.
nano /opt/orientdb/config/orientdb-server-config.xml
< users> < user resources=" *" password=" linuxhelp" name=" root" /> < user resources=" connect,server.listDatabases,server.dblist" password=" guest" name=" guest" /> < /users>
Run the following command to change the permissions for the orientDB configuration file as shown below.
root@linuxhelp:~# chmod 640 /opt/orientdb/config/orientdb-server-config.xml
Once the configuration is done, copy the script file “ console.sh” and “ orientdb.sh” into the /usr/bin directory.
root@linuxhelp:~# cp /opt/orientdb/bin/console.sh /usr/bin/orientdb
root@linuxhelp:~# cp /opt/orientdb/bin/orientdb.sh /etc/init.d/orientdb
Move to the /etc/init.d/ directory and update the rc.d directory using the below command.
root@linuxhelp:~# cd /etc/init.d/
root@linuxhelp:/etc/init.d# update-rc.d orientdb defaults
insserv: warning: script ' orientdb' missing LSB tags and overrides
Now start the orientDB service
root@linuxhelp:/etc/init.d# service orientdb start root@linuxhelp:/etc/init.d# service orientdb status ? orientdb.service - SYSV: OrientDb init script Loaded: loaded (/etc/init.d/orientdb) Active: active (running) since Thu 2016-09-29 14:53:48 IST 19s ago Docs: man:systemd-sysv-generator(8) Process: 5210 ExecStart=/etc/init.d/orientdb start (code=exited, status=0/SUCCESS) CGroup: /system.slice/orientdb.service ??5219 java -server -Xmx512m -Djna.nosys=true -XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true -Dfile.encoding=UTF8 -Drhino.opt.level=9 -Dprofiler.enab... Sep 29 14:53:48 linuxhelp systemd[1]: Starting SYSV: OrientDb init script... Sep 29 14:53:48 linuxhelp orientdb[5210]: Starting OrientDB server daemon... Sep 29 14:53:48 linuxhelp systemd[1]: Started SYSV: OrientDb init script.
Open the browser and navigate to URL http://< IP_address> :2480
Login to OrientDB with the login credentials.
To add new user, click “ Security” tab and choose “ Add User”
Enter the username, password, status and roles for the user.
Comments ( 0 )
No comments available