南大通用数据库-Gbase-8a单机版安装-01

GBASE简介

天津南大通用数据技术股份有限公司(简称:GBASE)成立于2004年,注册资金1.6亿元,公司自成立以来始终坚持自主创新,产品的核心技术及底层代码自主可控,构建了覆盖数据管理全生命周期,包括分析型、事务型、分布式事务型、云原生数据仓库等全技术栈的数据产品体系及服务解决方案。

目前,GBASE已经成为国内少有的专注于数据库产品研发,并且在金融、电信行业得到规模化应用的独立数据库服务商。自主研发的GBase系列数据库产品及服务范围覆盖全国32个省级行政区域。为金融、电信、政务、能源、交通、国防军工等百余个行业上万家用户提供产品和服务,建立节点超过30000个,管理数据总量超过300PB。并远销美国、巴西、墨西哥等三十余个国家及地区。

 一、虚拟机环境

名称
cpu Intel? Core? i7-7700HQ CPU @ 2.80GHz
操作系统 Red Hat Enterprise Linux Server release 7.9 (Maipo)
Gbase-8a版本 8.6.2.43-R7-free.110605

二、安装步骤

1、创建操作系统gbase用户
[root@node0 opt]# groupadd gbase -g 2006

[root@node0 opt]# useradd gbase -g 2006 -u 2006

[root@node0 opt]# echo "gbase"|passwd --stdin gbase
2、创建目录并解压
[root@node0 opt]# mkdir /opt/Gbase-8a

[root@node0 opt]# tar -xvf /opt/pkg/GBase8a-NoLicense-Free-8.6.2_build43-R7-redhat7.3-x86_64.tar.bz2 -C /opt/Gbase-8a/
3、修改目录用户组
[root@node0 opt]# chown -R gbase:gbase /opt/Gbase-8a/
4、安装gbase数据库
[root@node0 GBaseInstall]# su - gbase

[gbase@node0 ~]$ cd /opt/Gbase-8a/GBaseInstall/

[gbase@node0 GBaseInstall]$ ./Install_lin.sh 

*********************************************************************************
Thank you for choosing GBase product!

Please read carefully the following licencing agreement before installing any product:

Disclaimer of Product Trial License:
1. Any user who tries out (including self-downloaded trial or trial version provided by General Data Technology Co., Ltd) General Data Technology
 Co., Ltd Software Products should read this statement carefully. Users may choose not to try Nanda General Software Products. The user's tries out General Data Technology Co., Ltd Software Products will be deemed to be an endorsement of the full content of this statement.2. Universal software products of General Data Technology Co., Ltd have complete autonomous knowledge rights and do not infringe on the relevant 
rights and interests of any other unit or individual. Universal software products of General Data Technology Co., Ltd are protected by law. Any transfer, reproduction, dissemination or use in unauthorized projects are strictly prohibited without the written permission of Universal of Nanda. Otherwise, the infringer will bear full responsibility.3. Except for the terms of service specified by General Data Technology Co., Ltd, General Data Technology Co., Ltd is not liable or liable for an
y accident, negligence, contract destruction, defamation, copyright or intellectual property infringement caused by the trial use of General Data Technology Co., Ltd software products and any losses (including virus infection due to downloading).4. The relevant information of General Data Technology Co., Ltd Software Products is the original information released. If there are any changes,
 no further notice will be given. Software may run differently from the final version, and features and functions in pre-release software may not appear in the final version. The risk of trying out the software should be borne by you.5. Users assume their own risks for the trial of General Data Technology Co., Ltd Software Products. General Data Technology Co., Ltd does not gu
arantee any form of guarantee, does not guarantee that the trial products meet the user's requirements, does not guarantee that the trial service is uninterrupted, and does not guarantee the safety of the trial products. Due to any technical reasons such as network status, communication lines and so on, users can not normally try out General Data Technology Co., Ltd Products, or the impact or loss on third parties in the process of trial, General Data Technology Co., Ltd does not bear any legal liability.6. General Data Technology Co., Ltd respects and protects the personal privacy rights of all users who try out General Data Technology Co., Ltd P
roducts. Without the personal permission of users or mandatory provisions of relevant laws, General Data Technology Co., Ltd will not voluntarily disclose other third parties.7. Any unit or individual who considers that General Data Technology Co., Ltd Software products may be suspected of infringing on its legitimate 
rights and interests should promptly give written feedback to General Data Technology Co., Ltd or its service website, and provide identity certificates, ownership certificates and detailed tort proof. After receiving the verification of the above-mentioned legal documents, General Data Technology Co., Ltd l will make corresponding treatment as soon as possible.8. General Data Technology Co., Ltd Corporation has the final right to interpret General Data Technology Co., Ltd Products and this statement.
*********************************************************************************
Do you accept the above licence agreement (Yes/No, default=No) ?
yes

*********************************************************************************
                     Welcome to install GBase products
*********************************************************************************
Please input the GBase software installation directory (Default:/home/gbase/GBase):


Installing all software packages ...

Software packages installation done.

*********************************************************************************
                  Welcome to create GBase database instance
*********************************************************************************
Please input the new database instance name (default: gbase8a):


Please input the port number for the new database instance (default:5258):

GBase is creating the New 'gbase8a' instance ...

hostkey: 8872b892ef10d9e1ed5cdbfca85298b2
The host key file is genarate at GBASE_BASE/config/gbase_host.cnf.


Congratulations.  Your GBase installation is successful.

Please execute $source ~/.bashrc manually on the first run.

Please refer to the product's manuals and readme.txt to start using GBase product.
5、配置环境变量
[gbase@node0 GBaseInstall]$ vim /home/gbase/.bashrc

添加如下内容:

export GBASE_BASH=/home/gbase/GBase
export GBASE_HOME=/home/gbase/GBase/server
export GBASE_SID=gbase8a
export PATH=$GBASH_HOME/bin:$PATH

使环境变量在当前会话立即生效

[gbase@node0 GBaseInstall]$ source /home/gbase/.bashrc
6、启动gbase数据库
[root@node0 GBaseInstall]# su - gbase

[gbase@node0 GBaseInstall]$ gbase.server --help
Usage: /home/gbase/GBase/server/bin/gbase.server  {start|stop|restart}  [ GBase server options ]

[gbase@node0 GBaseInstall]$ gbase.server start
Starting GBase. SUCCESS!
7、登录数据库

默认数据库root用户密码为空,我们回车即可,保险起见我们自己配置一下root的密码。

[gbase@node0 GBaseInstall]$ gbase -uroot -p
Enter password: 

GBase client Free Edition 8.6.2.43-R7-free.110605. Copyright (c) 2004-2022, GBase.  All Rights Reserved.

gbase> alter user root identified by 'qwer1234';
Query OK, 0 rows affected (Elapsed: 00:00:00.00)

gbase>
8、创建数据库及用户
gbase> create database czg;
Query OK, 1 row affected (Elapsed: 00:00:00.00)

gbase> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| performance_schema |
| czg                |
| gbase              |
| gclusterdb         |
| gctmpdb            |
+--------------------+
6 rows in set (Elapsed: 00:00:00.00)

gbase> use czg;
Query OK, 0 rows affected (Elapsed: 00:00:00.00)

gbase> create user czg identified by 'qwer1234';
Query OK, 0 rows affected (Elapsed: 00:00:00.00)

gbase> grant all on *.* to 'czg'@'%';
Query OK, 0 rows affected (Elapsed: 00:00:00.00)

gbase> select * from gbase.user where user = 'czg'G ;
*************************** 1. row ***************************
                   Host: %                                                           
                   User: czg             
               Password: *D75CC763C5551A420D28A227AC294FADE26A2FF2
            Select_priv: Y
            Insert_priv: Y
            Update_priv: Y
            Delete_priv: Y
            Create_priv: Y
              Drop_priv: Y
            Reload_priv: Y
          Shutdown_priv: Y
           Process_priv: Y
              File_priv: Y
             Grant_priv: N
        References_priv: Y
             Index_priv: Y
             Alter_priv: Y
           Show_db_priv: Y
             Super_priv: Y
  Create_tmp_table_priv: Y
       Lock_tables_priv: Y
           Execute_priv: Y
        Repl_slave_priv: Y
            Unmask_priv: Y
       Create_view_priv: Y
         Show_view_priv: Y
    Create_routine_priv: Y
     Alter_routine_priv: Y
       Create_user_priv: Y
             Event_priv: Y
           Trigger_priv: Y
               ssl_type: 
             ssl_cipher: 
            x509_issuer: 
           x509_subject: 
          max_questions: 0
            max_updates: 0
        max_connections: 0
   max_user_connections: 0
               max_cpus: 0
           max_memories: 0
          max_tmp_space: 0
         resource_group: 0
          task_priority: 2
user_limit_storage_size:                
      user_storage_size: 0
                    UID: 4
1 row in set (Elapsed: 00:00:00.00)

gbase> select version();
+-------------------------+
| version()               |
+-------------------------+
| 8.6.2.43-R7-free.110605 |
+-------------------------+
1 row in set (Elapsed: 00:00:00.00)