2.2 Installation

Setup

This chapter explains the installation of a node onto a single machine. See the chapter on operations for the cluster configuration.

// The lsb_release command prints certain LSB (Linux Standard Base) and Distribution information.
$ lsb_release -id
Distributor ID: CentOS
Description: CentOS release 6.3 (Final)

  • Installing a Node

    The following 3 RPM packages are needed when installing a GridDB node. Place these packages anywhere on the machine.

    Package name File name Description
    griddb-server griddb-server-X.X.X-linux.x86_64.rpm The start and other commands for the GridDB node module and server are included.
    griddb-client griddb-client-X.X.X-linux.x86_64.rpm One set of operating commands except start node is included.
    griddb-docs griddb-docs-X.X.X-linux.x86_64.rpm GridDB manual and program samples are included.

    *X.X.X is the GridDB version

    Install using the rpm command as a root user.

    $ su
    # rpm -Uvh griddb-server-X.X.X-linux.x86_64.rpm
    Under preparation...           ########################################### [100%]
    User gsadm and group gridstore have been registered.
    GridStore uses new user and group.
       1:griddb-server                 ########################################### [100%]
    # rpm -Uvh griddb-client-X.X.X-linux.x86_64.rpm
    Under preparation...           ########################################### [100%]
    User and group has already been registered correctly.
    GridStore uses existing user and group.
       1:griddb-client                  ########################################### [100%]
    # rpm -Uvh griddb-docs-X.X.X-linux.x86_64.rpm
    Under preparation...           ########################################### [100%]
       1:griddb-docs                   ########################################### [100%]
    

    When you install the package, the following group and user are created in the OS. This OS user is set as the operator of GridDB.

    Group User Home directory
    gridstore gsadm /var/lib/gridstore

    The following environment variables are defined in this gsadm user.

    Environment variables Value Meaning
    GS_HOME /var/lib/gridstore gsadm/GridDB home directory
    GS_LOG /var/lib/gridstore/log Event log file output directory

    [Points to note]

    • These environment variables are used in the operating commands described later.
    • The password of the gsadm user has not been set. With the root user privilege, please set the password appropriately.
      • Some of the functions of the operation tools may be necessary.

    In addition, when the GridDB node module is installed, services that are executed automatically upon startup of the OS will be registered.

    Service Name Run Level
    gridstore 3, 4, 5

    The service registration data can be checked with the following command.

    # /sbin/chkconfig --list | grep gridstore
    gridstore 0:off 1:off 2:off 3:on 4:on 5:on 6:off
    

    The GridDB node will be started automatically by this service during OS startup.

    [Points to note]

    • Services will not start automatically immediately after installation.

    To stop auto startup of a service, use the command below.

    # /sbin/chkconfig gridstore off
    

    See the chapter on services in 'GridDB Operational Management Guide' (GridDB_OperationGuide.html) for details of the services.

  • Post-Installation Checks

    Check the directory configuration of the installed GridDB node.

    First, check that the GridDB home directory, and related directory and files have been created.

    GridDB home directory

    /var/lib/gridstore/                      # GridDB home directory
                       admin/                # integrated operational management GUI home directory
                       backup/               # backup directory
                       conf/                 # definition file directory
                            gs_cluster.json  # cluster definition file
                            gs_node.json     # node definition file
                            password         # user definition file
                       data/                 # database file directory
                       log/                  # log directory
    

    Confirm the following command.

    $ ls /var/lib/gridstore/
    admin backup conf data log
    

    Next, check that the installation directory has been created.

    Installation directory

    /usr/gridstore-X.X.X/              # installation directory
                         Fixlist.pdf   # revision record
                         Readme.txt    # release instructions
                         bin/          # operation command, module directory
                         conf/         # definition file sample directory
                         docs/         # document directory
                         etc/
                         lib/          # library directory
                         license/      # license directory
                         prop/         # configuration file directory
                         web/          # integrated operational management GUI file directory
    

    Confirm with the following command.

    $ ls /usr/gridstore-X.X.X/
    Fixlist.pdf Readme.txt bin conf etc lib license prop web
    

    All documents have been compressed into a single ZIP file. Decompress and refer to the documents where appropriate as shown below.

    $ cd /usr/gridstore-X.X.X/docs
    $ unzip griddb-documents-X.X.X.zip
    

    In addition, the following symbolic links are created as shown below in a few directories under the installation directory for greater convenience.

    $ ls /usr/gridstore/
    conf lib prop web
    

    Lastly, confirm the version of the server module installed with the following command.

    $ gsserver --version
    GridDB version X.X.X build XXXXX
    

    [Points to note]

    The following files are created when GridDB is operated according to the following procedure.

    [Database file]

    /var/lib/gridstore/                     # GridDB home directory
                       data/                # database file directory
                            gs_log_n_m.log  # log file to record the transaction logs (n, m are numbers)
                            gs_cp_n_p.dat   # checkpoint file to record data regularly (n, p are numbers)
    

    [Log file]

    /var/lib/gridstore/                            # GridDB home directory
                       log/                        # log directory
                           gridstore-%Y%m%d-n.log  # event log file
                           gs_XXXX.log             # operation tool log file
    

    The directory where these files are created can be changed by the parameter settings in the node definition file.

    *gs_XXXX is an operation tool name. (Example: gs_startnode.log)

  • Setting Up an Administrator User

    Administrator privilege is used for authentication related matter within the nodes and clusters. Creation date of administrator user is saved in the user definition file. The default file is as shown below.

    • /var/lib/gridstore/conf/password

    The default user below exists immediately after installation.

    User Password Example of proper use
    admin admin For authentication of operation administrator user, operation commands
    system manager For authentication of application user, client execution

    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 administrator user

    Change the password as shown below when using a default user. The password is encrypted during registration.

    $ gs_passwd admin
    Password: (enter password)
    Retype password: (re-enter password)
    

    [Points to note]

    • A GridDB administrator user is different from the OS user gsadm created during installation.
    • A change in the administrator user information using a user administration command becomes valid when a node is restarted.
    • In order to use it for authentication purposes in the client, the same user data needs to be registered in all the nodes. Copy the user definition file and make sure the same user data can be referred to in all the nodes.
    • Execute the operating command as a gsadm user.

    [Memo]