Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install RadonDB

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly shows you "how to install RadonDB", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to install RadonDB" this article.

I. installation

download

Git clone https://github.com/radondb/radon

Compilation and installation

First of all, the premise is to have a go environment, how to install it, then google it yourself.

Cd radon make build

When the compilation is complete, the executable file radon is generated under the bin folder

II. Configuration file

{"proxy": {/ / metadata storage location "meta-dir": "meta/radon-meta", / / external service port "endpoint": ": 13308", / / distributed transaction two-phase commit "twopc-enable": false, / / maximum number of connections "max-connections": 1024, / / limit the maximum result set size "max-result-size": 1073741824 / / maximum number of associated lines "max-join-rows": 32768, / / ddl timeout "ddl-timeout": 36000000, / / query timeout "query-timeout": 300000, / / api and multiple member communication ports "peer-address": ": 8080", / / slow query time "long-query-time": 5 / / streaming memory size "stream-buffer-size": 33554432, / / timeout connection processing "kill-idle-transaction": 60, "autocommit-false-is-txn": false}, / / audit related "audit": {"mode": "N", "audit-dir": "meta/radon-audit", "max-size": 268435456, "expire-hours": 1} / / the global sub-library sizes "router": {"slots-readonly": 4096, "blocks-readonly": 32}, / / log level "log": {"level": "INFO"}, "monitor": {"monitor-address": "0.0.0.0 blocks-readonly 13380"} are defined here. / / XA transaction related "scatter": {"xa-check-interval": 10, "xa-check-dir": ". / xacheck", "XaCheckRetrys": 10}}

3. Start Radon

. / radon-c radon.json > radon.log 2 > & 1 &

After startup, an error will be reported as follows:

2020-03-02 15:00:28.210378 privilege.go:96: [ERROR] plugin.privilege.update.privilege.error:backends.is.NULL

This doesn't matter, because we still add back-end data nodes. If Radon detects that there are no data nodes, it will report an error.

Add data nodes

Curl-I-H 'Content-Type: application/json'-X POST-d'{"name": "backend1", "address": "127.0.0.1 application/json' 3306", "user": "xucl", "password": "xuclxucl123", "max-connections": 1024} 'http://127.0.0.1:8080/v1/radon/backend

After the addition is complete, the output is as follows

HTTP/1.1 200 OK Date: Mon, 02 Mar 2020 07:02:32 GMT Content-Length: 0

Indicates that the addition was successful.

Log in to radon

Mysql-h227.0.0.1-uxucl-pxuclxucl123-P13308

View the database

Xucl@mysqldb 15:03: [(none)] > show databases; +-+ | Database | +-+ | information_schema | | mysql | | performance_schema | | sys | +-+ 4 rows in set (sec)

Create data

Xucl@mysqldb 15:07: [(none)] > create database zst; Query OK, 1 row affected (0.01sec)

VI. Directory structure

In the meta-dir location defined in our previous configuration file, some radon-related metadata files are saved in this location

[root@izbp13wpxafsmeraypddyvz radon-meta] # cat backend.json | jq. {"backends": [{"name": "backend1", "address": "127.0.0.1 address", "user": "xucl", "password": "xuclxucl123", "database": "", "charset": "utf8", "max-connections": 1024, "role": 0}]}

Backend.json saves the information of back-end nodes.

Cat version.json | jq. {"version": 1583132882620481800}

Version.json saves version information

In addition, metadata related to database tables is stored in the meta folder

[root@izbp13wpxafsmeraypddyvz radon-meta] # ls backend.json version.json zst

The zst library we just created is stored in a folder, and subsequent tables created under zst will also be stored in the zst folder.

These are all the contents of the article "how to install RadonDB". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report