環境準備:
系統版本:CentOS Linux release 7.9.2009 (Core)
硬體配置:4C4G200G
安裝包準備:KingbaseES_V008R006C008B0020_Lin64_install.iso
https://www.kingbase.com.cn/xzzx/index.htm
license準備:license_企業版.zip
https://www.kingbase.com.cn/xzzx/index.htm
計劃:
資料庫版本:KingbaseES_V008R006C008M020B0025_Lin64_install(mysql定製版)
資料庫使用者名稱:system
資料庫使用者名稱密碼:xxxxxxxxx
資料庫埠:54321
資料庫硬體要求
https://help.kingbase.com.cn/v8/install-updata/install-linux/index.html
部署
核心引數調整
(/etc/sysctl.conf):【/sbin/sysctl -p && /sbin/sysctl -a】
fs.aio-max-nr= 1048576
fs.file-max= 6815744
kernel.shmall= 2097152
kernel.shmmax= 4294967295
kernel.shmmni= 4096
kernel.sem= 250 32000 100 128
net.ipv4.ip_local_port_range= 9000 65500
net.core.rmem_default= 262144
net.core.rmem_max= 4194304
net.core.wmem_default= 262144
net.core.wmem_max= 1048576
系統資源調整
(/etc/security/limits.conf)
* soft nofile 65536
# 注意:設定nofile的hard limit不能大於/proc/sys/fs/nr_open,否則登出後將無法正常登陸
* hard nofile 65536
* soft nproc 65536
* hard nproc 65536
* soft core unlimited
* hard core unlimited
RemoveIPC引數調整
(/etc/systemd/logind.conf)
RemoveIPC=no
--
systemctl daemon-reload
systemctl restart systemd-logind.service
使用者及資料目錄配置
useradd -m kingbase
passwd kingbase
Yhkj2024.
安裝目錄
mkdir /app/Kingbase/ES/V8 -p
chmod o+rwx /app/Kingbase/ES/V8
資料目錄
mkdir /app/Kingbase/ES/V8/data
掛載安裝包
mkdir /home/kingbaseiso
mount KingbaseES_V008R006C008M020B0025_Lin64_install.iso /home/kingbaseiso/
安裝KingbaseES(以命令列安裝為例)
su - kingbase
echo $LANG
export LANG=zh_CN.UTF-8
cd /home/kingbaseiso
sh setup.sh -i console
註冊成系統服務
關閉服務
su – kingbase
cd /app/kingbase/ES/V8/Server/bin
#關閉kingbase
./sys_ctl stop -m fast -w -D /app/kingbase/ES/V8/data
ps:不做成系統服務,啟動的方式
su - kingbase
cd /app/kingbase/ES/V8/Server/bin
sys_ctl -w start -D ${Data檔案目錄} -l "${Data檔案目錄}/sys_log/startup.log"
啟動服務
su
systemctl start kingbased
systemctl status kingbased
進入資料庫驗證
[kingbase@mail bin]$ pwd
/app/kingbase/ES/V8/Server/bin
[kingbase@mail bin]$ ./kingbase -V
KINGBASE (KingbaseES) V008R006C008M020B0025
[kingbase@mail bin]$ ./ksql -p 54321 -U system test
Password for user system:
Type "help" for help.
test=#
test=# select version();
version
--------------------------------------------------------------------------------------------------------------------------
KingbaseES V008R006C008M020B0025 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28), 64-bit
(1 row)