GridDB DEB Install Guide
Table of Contents
1 Installating and Setting Up GridDB with DEB
This section shows how to install GridDB on a single machine.
1.1 Confirming the Environment
Confirm that OS is Ubuntu 18.04.1 LTS
$ lsb_release -id Distributor ID: Ubuntu Description: Ubuntu 18.04.1 LTS
Make sure that Java is installed.
$ java -version openjdk version "10.0.2" 2018-07-17 OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4) OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4, mixed mode)
1.2 Confirming Packages
The following package is used to install a GridDB node, Java client, and commands.
Package name | File name | Content |
---|---|---|
griddb_nosql | griddb_nosql-X.X.X_amd64.deb | Contains GridDB's node module, Java client, commands, etc. |
*: X.X.X is the GridDB version
First, make sure that you have all the necessary DEB packages. Confirm the following files:
$ ls griddb_nosql-X.X.X_amd64.deb
1.3 Installing DEB package
Switch to the root user and install the necessary DEB packages by the "dpkg" command, as shown below.
$ su // create user and group for running GridDB's node module and operational commands. # dpkg -i griddb_nosql-X.X.X_amd64.deb (Reading database ... 209716 files and directories currently installed.) Preparing to unpack .../griddb-nosql_X.X.X_amd64.deb ... Unpacking griddb-nosql (X.X.X) over (X.X.X) ... Setting up griddb-nosql (X.X.X) ...
After installing GridDB's node module, the following user and group are created. Use the user and group for running a node module and operational commands.
Group | User | Home directory |
---|---|---|
gridstore | gsadm | /var/lib/gridstore |
[NOTE]
- The password of the user "gsadm" has not been set. Please set the password by using OS command.
For the user "gsadm," two environment variables are defined as below.
Environment variable | Value | Meaning |
---|---|---|
GS_HOME | /var/lib/gridstore | gsadm/GridDB home directory |
GS_LOG | /var/lib/gridstore/log | Event log file output directory |
[Note]
- These environment variables are referenced by the operational commands. If you execute those commands as other than this user, you need to define the environment variables as above.
1.4 Confirmation After Installation
Confirm the directory structure of the installed GridDB node. If installation completed normally, the following directories and files are created as well as necessary modules and commands.
/var/lib/gridstore/ # GridDB home directory backup/ # Backup directory(unused) conf/ # Directory storing definition files gs_cluster.json # Cluster definition file gs_node.json # Node definition file password # User definition file data/ # Directory storing database files log/ # Directory storing event log files
Below is shown how to use commands for confirmation.
First, confirm whether the following files exist.
$ ls /usr/griddb-X.X.X/* /usr/griddb-X.X.X/RPM-README.md /usr/griddb-X.X.X/3rd_party: 3rd_party.md apr json-simple picojson slf4j activemq-cpp-library BSD_License.txt MessagePack purewell yield Apache_License-2.0.txt ebb MIT_License.txt sha2 /usr/griddb-X.X.X/bin: gridstore-X.X.X.jar gs_joincluster gs_startnode log.py gridstore-conf-X.X.X.jar gs_leavecluster gs_stat util.py gs_adduser gs_passwd gs_stopcluster gs_deluser gsserver gs_stopnode /usr/griddb-X.X.X/conf: gs_cluster.json gs_node.json password /usr/griddb-X.X.X/docs: manual sample
Similarly, confirm whether the following files and directories exist.
$ ls /var/lib/gridstore/* /var/lib/gridstore/backup: /var/lib/gridstore/conf: gs_cluster.json gs_node.json password /var/lib/gridstore/data: /var/lib/gridstore/log:
Confirm the directory structure of the installed GridDB client libraries. If installation completed normally, the following files are created.
$ ls -l /usr/share/java/*gridstore* lrwxrwxrwx 1 gsadm gridstore 46 Apr 11 20:43 /usr/share/java/gridstore-conf.jar -> /usr/griddb-X.X.X/bin/gridstore-conf-X.X.X.jar lrwxrwxrwx 1 gsadm gridstore 41 Apr 11 20:43 /usr/share/java/gridstore.jar -> /usr/griddb-X.X.X/bin/gridstore-X.X.X.jar
If you start a GridDB node and then access and run the node from a client, the following files are created in the directories to store database files and event log files.
[Database file]
/var/lib/gridstore/ # GridDB home directory data/ # Directory storing database files gs_log_n_m.log # File recording transaction logs (n, m: positive number) gs_cp_n_p.dat # Checkpoint file recording data regularly (n, p: positive number)
[Event log file]
/var/lib/gridstore/ # GridDB home directory log/ # Directory storing event logs gridstore-%Y%m%d-n.log # Event log file
You can change the directories to store files by editing the relevant parameters in the node definition file.
1.5 Setting up an administrator user (Mandatory)
An administrator user is used for authentication purposes in nodes and clusters. Administrator user information is stored in the User definition file. The default file is as shown below.
- $GS_HOME/conf/password
The following default users exist just after installation.
User | Password |
---|---|
admin | No settings |
Administrator user information including the above-mentioned default users can be changed using the user administration command in the operating commands.
Command | Function |
---|---|
gs_adduser | Add an administrator user |
gs_deluser | Delete an administrator user |
gs_passwd | Change the password of an administrator user |
Change the password as shown below when using a default user. The password is encrypted during registration.
[Note]
- Default user password has not been set. Be sure to change the password as the server will not start if the administrator user password is not set.
$ gs_passwd admin Password:(Input password) Retype password:(Input password again)
When adding a new administrator user except a default user, the user name has to start with gs#.
One or more ASCII alphanumeric characters and the underscore sign “_” can be used after gs#.
An example on adding a new administrator user is shown below.
$ gs_adduser gs#newuser Password:(Input password) Retype password:(Input password again)
[Note]
- A change in the administrator user information using a user administration command becomes valid when a node is restarted.
- User information is used for client authentication, so the common user information must be registered in all nodes. Make sure that the common user information is referred to by all nodes, by copying the user definition file.
1.6 Editing Definition Files
There are two kinds of definition files for GridDB:
- Cluster definition file
- Node definition file
The cluster definition file is a file which defines the setting values commonly used in the entire cluster. The node definition file is a file which defines different setting values for each node.
Templates for these definition files are installed as shown below. You can create definition files for GridDB by copying and editing these templates.
/usr/griddb-X.X.X/ # Installation directory conf/ # Directory storing definition files gs_cluster.json # Template for cluster definition file gs_node.json # Template for node definition file
Save an edited file with the predetermined name in the predetermined directory shown below.
/var/lib/gridstore/ # GridDB home directory conf/ # Directory storing definition files gs_cluster.json # (Edited) Cluster definition file gs_node.json # (Edited) Node definition file
For details on definition files, refer to "2.3 Configure environment-dependent parameters." of "Quick Start Guide" (GridDB_QuickStartGuide.html)
1.7 Setting Up Libraries
If you use a Java-based client, add the client library path to CLASSPATH.
$ export CLASSPATH=${CLASSPATH}:/usr/share/java/gridstore.jar
1.8 Setting Up a Client
There is no definition file for setting up a client. Specify the connection point and user/password in the client program.
For details on the NoSQL specifications, refer to "GridDB API Reference" (GridDB_API_Reference.html)
1.9 Uninstalling GridDB
If GridDB is no longer necessary, uninstall all the packages. Follow the uninstallation procedure shown below:
$ su # dpkg -P griddb_nosql
2 Trademark
- GridDB is a trademark of Toshiba Digital Solutions Corporation.
- Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- Other product names are trademarks or registered trademarks of the respective owners.
Copyright (C) 2019 TOSHIBA Digital Solutions Corporation