If you are on the lookout for a capable database designed specifically for the Internet of Things (IoT), GridDB might just be the answer you seek! This blog will guide you through the process of getting started with GridDB, whether you prefer to use the source code, RPM, or DEB packages.
Overview of GridDB
GridDB is a database that beautifully marries both NoSQL and SQL interfaces, making it extremely versatile. You can check out the GridDB Features Reference to explore its extensive functionalities. This repository contains everything from the server to the Java client, alongside the JDBC Driver repository.
Quick Start: Using Source Code
To use the source code for GridDB, simply follow the steps below. Please ensure you have the right environment set up as we confirmed operations with the following Linux distributions:
- CentOS 7.9 (gcc 4.8.5)
- RockyLinux 9.3 (gcc 11)
- Ubuntu 22.04 (gcc 11)
**Note:** You must have Python3 and TCL installed. You can install TCL using:
yum install tcl.x86_64
Build a Server and Client (Java)
To get started, follow these commands:
./bootstrap.sh
./configure
make
If you are using Maven for building the Java client, execute:
cd java_client
./make_source_for_mvn.sh
mvn clean
mvn install
Start a Server
To start the server, run the following commands:
export GS_HOME=$PWD
export GS_LOG=$PWD/log
export PATH=$PATH:$GS_HOME/bin
bings_passwd admin
# input your_password
vi conf/gs_cluster.json
# clusterName:your_clustername
#-- input your_clustername
bings_startnode
bings_joincluster -c your_clustername -u admin your_password
Execute a Sample Program
Here’s how to execute a sample program:
export CLASSPATH=$CLASSPATH:$GS_HOME/bin/gridstore.jar
mkdir gsSample
cp $GS_HOME/docs/sampleprogram/Sample1.java gsSample/.
javac gsSample/Sample1.java
java gsSample/Sample1 239.0.0.1 31999 your_clustername admin your_password
-- Person: name=name02 status=false count=2 lob=[65, 66, 67, 68, 69, 70, 71, 72, 73, 74]
Stop a Server
Stopping the server can be done with the following commands:
bings_stopcluster -u admin your_password
bings_stopnode -u admin your_password
Quick Start: Using GridDB Service and CLI
Similar to the source code method, you can also use GridDB Service and CLI for quick startup. Make sure to execute commands as the gsadm user after installing GridDB RPM or DEB packages. Follow similar steps as mentioned in the source code section but ensure you do not set environment variables like GS_HOME and GS_LOG.
Installation Quick Guide
To install using RPM or DEB on the supported Linux distributions:
- For CentOS/RockyLinux:
sudo rpm -ivh griddb-X.X.X-linux.x86_64.rpm
sudo dpkg -i griddb_X.X.X_amd64.deb
Again, replace X.X.X with the GridDB version you are installing.
Additional Resources and Troubleshooting
For further insights on functionalities, refer to:
– Features Reference
– Quick Start Guide
– Java API Reference
If you encounter issues while setting up GridDB, checking the configuration files and ensuring all dependencies are met could help. Ensure that the correct permissions are provided when executing commands. Additionally, make sure to periodically check the GitHub Issues page for common challenges and solutions reported by other users.
For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.
Conclusion
At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.