Gauss DB 100 OLTP 基于centos 7.3单机安装

Gauss DB 100 OLTP 基于centos 7.3单机安装

: 基本信息
GaussDB 100 OLTP x86_64 基于 RedHat 7.3 安装(Host IP:192.168.79.137)
GaussDB_100_1.0.1-DATABASE-CENTOS-64bit.tar.gz
服务器内存2G 空间50G
  • 关闭Slinux
[root@gaussdb-wyl ~]# vim /etc/selinux/config 
SELINUX=disabled
[root@gaussdb-wyl ~]# setenforce 0
[root@gaussdb-wyl ~]# getenforce 
Permissive
[root@gaussdb-wyl ~]# 
  • 关闭防火墙
[root@gaussdb-wyl ~]# systemctl stop firewalld.service 
[root@gaussdb-wyl ~]# systemctl disable firewalld.service
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
  • 创建安装用户和用户组
groupadd dbgrp
useradd -g dbgrp -d /home/omm -m -s /bin/bash omm
passwd omm

说明:设置omm用户密码
  • 上传GaussDB 100安装包,并解压
[root@gaussdb-wyl soft]# pwd
/soft
[root@gaussdb-wyl soft]# ls -ltr
total 7872
-rw-r--r--. 1 root root 8059340 Dec 26 21:33 GaussDB_100_1.0.1-DATABASE-CENTOS-64bit.tar.gz
[root@gaussdb-wyl soft]# tar zxvf GaussDB_100_1.0.1-DATABASE-CENTOS-64bit.tar.gz 
GaussDB_100_1.0.1-DATABASE-CENTOS-64bit/
GaussDB_100_1.0.1-DATABASE-CENTOS-64bit/GaussDB_100_1.0.1-RUN-CENTOS-64bit.tar.gz
GaussDB_100_1.0.1-DATABASE-CENTOS-64bit/sshexkey.py
GaussDB_100_1.0.1-DATABASE-CENTOS-64bit/install.py
GaussDB_100_1.0.1-DATABASE-CENTOS-64bit/upgrade.py
GaussDB_100_1.0.1-DATABASE-CENTOS-64bit/funclib.py
GaussDB_100_1.0.1-DATABASE-CENTOS-64bit/GaussDB_100_1.0.1-RUN-CENTOS-64bit.sha256
  • 进入安装目录查看
[root@gaussdb-wyl soft]# cd GaussDB_100_1.0.1-DATABASE-CENTOS-64bit/
[root@gaussdb-wyl GaussDB_100_1.0.1-DATABASE-CENTOS-64bit]# ll
total 8188
-rwx------. 1 root root   25342 Oct 17 21:12 funclib.py
-rw-r--r--. 1 root root      65 Oct 17 21:12 GaussDB_100_1.0.1-RUN-CENTOS-64bit.sha256
-rw-r--r--. 1 root root 8057102 Oct 17 21:12 GaussDB_100_1.0.1-RUN-CENTOS-64bit.tar.gz
-rwx------. 1 root root   83188 Oct 17 21:12 install.py
-rwx------. 1 root root    7697 Oct 17 21:12 sshexkey.py
-rwx------. 1 root root  193192 Oct 17 21:12 upgrade.py
  • 进入安装包解压目录,执行install.py脚本进行安装,看到如下表示成功!
[root@gaussdb-wyl GaussDB_100_1.0.1-DATABASE-CENTOS-64bit]# python install.py -U omm:dbgrp -R /gdb/gaussdb/app -D /gdb/gaussdb/data -C LSNR_ADDR=127.0.0.1,192.168.79.137 -C LSNR_PORT=1888 -C DATA_BUFFER_SIZE=200M -C SHARED_POOL_SIZE=100M -C TEMP_BUFFER_SIZE=100M
Checking runner.
Checking parameters.
End check parameters.
Checking user.
End check user.
Checking old install.
End check old install.
Checking kernel parameters.

Checking directory.
Checking integrality of run file...
Decompressing run file.
Setting user env.
Checking data dir and config file
Initialize db instance.
Creating database.
Creating database succeed.
Changing file permission due to security audit.
Install successfully, for more detail information see /home/omm/zengineinstall.log.

Gauss DB 100 OLTP 基于centos 7.3单机安装_第1张图片
Gauss DB 100 OLTP 基于centos 7.3单机安装_第2张图片Gauss DB 100 OLTP 基于centos 7.3单机安装_第3张图片

  • 配置zengine.ini文件
[root@gaussdb-wyl cfg]# cat zengine.ini
LOG_BUFFER_SIZE = 64M
DBWR_PROCESSES = 8
LOG_BUFFER_COUNT = 8
SESSIONS = 1500
INSTANCE_NAME = zenith
LSNR_ADDR = 127.0.0.1,192.168.79.137
LSNR_PORT = 1888
ENABLE_SYSDBA_LOGIN = TRUE
SHARED_POOL_SIZE = 100M
TEMP_BUFFER_SIZE = 100M
DATA_BUFFER_SIZE = 200M
CONTROL_FILES = (/gdb/gaussdb/data/data/cntl1, /gdb/gaussdb/data/data/cntl2, /gdb/gaussdb/data/data/cntl3)
  • OMM用户环境变量
    在安装完成后,会自动在OMM用户配置文件.bashrc下添加4个变量
[root@gaussdb-wyl cfg]# su - omm
Last login: Sat Dec 28 00:10:35 CST 2019 on pts/0
[omm@gaussdb-wyl ~]$ cat .bashrc 
# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
	. /etc/bashrc
fi

# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=

# User specific aliases and functions
export GSDB_HOME="/gdb/gaussdb/app"
export PATH="/gdb/gaussdb/app/bin":$PATH
export LD_LIBRARY_PATH="/gdb/gaussdb/app/lib":"/gdb/gaussdb/app/add-ons":$LD_LIBRARY_PATH
export GSDB_DATA="/gdb/gaussdb/data"
  • 启动数据库(Zengine instance has already started)表示实例已经启动
[omm@gaussdb-wyl bin]$ pwd
/gdb/gaussdb/app/bin
[omm@gaussdb-wyl bin]$ ls -ltr
total 9368
-r-x------. 1 omm dbgrp   30101 Dec 28 00:01 uninstall.py
-r-x------. 1 omm dbgrp   79727 Dec 28 00:01 sql_process.py
-r-x------. 1 omm dbgrp    6227 Dec 28 00:01 shutdowndb.sh
-r-x------. 1 omm dbgrp    4430 Dec 28 00:01 Common.py
-r-x------. 1 omm dbgrp 6422976 Dec 28 00:01 zengine
-r-x------. 1 omm dbgrp   32056 Dec 28 00:01 zencrypt
-r-x------. 1 omm dbgrp   43710 Dec 28 00:01 zctl.py
-r-x------. 1 omm dbgrp   13145 Dec 28 00:01 GaussLog.py
-r-x------. 1 omm dbgrp 2918392 Dec 28 00:01 zsql
-r--------. 1 omm dbgrp    4243 Dec 28 00:14 Common.pyc
-r--------. 1 omm dbgrp   10748 Dec 28 00:14 GaussLog.pyc
[omm@gaussdb-wyl bin]$ python zctl.py -t start
Zengine instance has already started.
  • 登录数据库
[omm@gaussdb-wyl bin]$ zsql sys/Changeme_123@127.0.0.1:1888
connected.
SQL> 
[omm@gaussdb-wyl bin]$ zsql / as sysdba
connected.
SQL> 
安装后默认密码为"Changeme_123"
  • 修改数据库SYS密码
ALTER USER SYS IDENTIFIED BY wangyl_2019;
  • 查询数据库基本信息
SQL> select dbid,name,status,open_status from dv_database;

DBID         NAME                             STATUS               OPEN_STATUS         
------------ -------------------------------- -------------------- --------------------
794189526    GAUSS                            OPEN                 READ WRITE          

1 rows fetched.

SQL> select status from v$instance;

STATUS              
--------------------
OPEN                

1 rows fetched.
  • 安装错误总结
==============================
GS-00001 : Failed to allocate 4592381952 bytes for sga
<>解决方法请参考博客(https://glogin.blog.csdn.net/article/details/103742721)


===============================
Error: Run package GaussDB_100_1.0.0-RUN-REDHAT-64bit.tar.gz is inconsistent with os system centos.Please refer to install log "/home/omm/zengineinstall.log" for more detailed information.
<>解决方法请参考博客(https://glogin.blog.csdn.net/article/details/103742869)

你可能感兴趣的:(Gauss,DB)