中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁 > news >正文

wordpress做的好的網(wǎng)站友情鏈接的形式有哪些

wordpress做的好的網(wǎng)站,友情鏈接的形式有哪些,北京商場疫情防控最新政策,ps網(wǎng)頁制作素材1、關(guān)于PTK工具 MogDB數(shù)據(jù)庫是云和恩墨基于openGauss開源數(shù)據(jù)庫打造,安穩(wěn)易用的企業(yè)級關(guān)系型數(shù)據(jù)庫。 PTK是云和恩墨出品的一款工具,幫助用戶更便捷地部署管理MogDB數(shù)據(jù)庫。 1.1 使用場景 開發(fā)人員快速啟動多個本地 MogDB 環(huán)境用戶通過 PTK 快速安裝…

1、關(guān)于PTK工具

MogDB數(shù)據(jù)庫是云和恩墨基于openGauss開源數(shù)據(jù)庫打造,安穩(wěn)易用的企業(yè)級關(guān)系型數(shù)據(jù)庫。

PTK是云和恩墨出品的一款工具,幫助用戶更便捷地部署管理MogDB數(shù)據(jù)庫。

1.1 使用場景

  • 開發(fā)人員快速啟動多個本地 MogDB 環(huán)境
  • 用戶通過 PTK 快速安裝部署 MogDB
  • DBA 日常運維使用
  • 第三方運維平臺集成

1.2 推薦部署架構(gòu)

PTK 的定位是一個中心化多集群管理軟件,作為一個中控軟件的角色,通過 SSH 的方式遠(yuǎn)程管理多個數(shù)據(jù)庫集群,所以,我們推薦您將PTK部署在單獨的一臺控制服務(wù)器上,然后將數(shù)據(jù)庫部署到數(shù)據(jù)庫專屬的服務(wù)器上,如下圖。當(dāng)然,PTK也支持本地部署,您可以根據(jù)您的機器情況自行安排安裝位置。

(注:PTK依賴本地元數(shù)據(jù)來進行集群管理,不同操作系統(tǒng)用戶安裝的PTK相互獨立不可見)

                           +-----------+|    PTK    |+-----------+/---ssh-----/   |    \---ssh----\/               ssh               \/                 |                 \+-----------+      +-----------+      +-----------+|   MogDB   |      |   MogDB   |      |   MogDB   |+-----------+      +-----------+      +-----------+

1.3 PTK 支持部署 MogDB 的操作系統(tǒng)

最新列表請通過 ptk candidate os 查看

軟件下載地址:https://www.mogdb.io/downloads/ptk/all

PTK軟件使用說明書:https://docs.mogdb.io/zh/ptk/v2.0/overview

云和恩墨的軟件許可看得出,這家軟件還是比較寬松的,允許大家進行測試,這點十分的友好。

MogDB: Privacy下面是截取的一段說明:

云和恩墨授予您非排他性、不可轉(zhuǎn)讓的、不可再許可、不可分許可且可撤銷的有限許可,允許您在遵守本協(xié)議所述限制的前提下,**僅出于開發(fā)、測試、原型設(shè)計和演示您的應(yīng)用程序的目的,并且僅在您的應(yīng)用程序未用于任何數(shù)據(jù)處理、業(yè)務(wù)、商業(yè)或生產(chǎn)目的的情況下,且不得用于任何其他目的。**您可以允許您的承包商使用程序,前提是他們代表您行使本協(xié)議中授予的許可權(quán)利,并且您及您的承包商有責(zé)任在此類使用中遵守本協(xié)議。您將與您的承包商簽訂書面協(xié)議,嚴(yán)格限制他們使用程序的權(quán)利,并以其他方式保護云和恩墨及【MogDB】軟件的知識產(chǎn)權(quán),其程度不得低于本協(xié)議。您可以在合理必要的范圍內(nèi)復(fù)制程序,以行使本協(xié)議中授予的許可權(quán)利。若云和恩墨發(fā)現(xiàn)您允諾使用程序的承包商有不符合要求或使用限制的,云和恩墨可單方中斷承包商的使用權(quán)限。

目前最新的PTK版本是V1.7.0,在8月30號剛剛發(fā)布。
在這里插入圖片描述

2、安裝PTK

2.1 在線安裝

注:命令行安裝方式不支持 Windows 系統(tǒng)

在終端中,執(zhí)行以下指令即可自動完成安裝:

curl --proto '=https' --tlsv1.2 -sSf https://cdn-mogdb.enmotech.com/ptk/install.sh | sh

該指令會自動將 PTK 安裝在用戶的家目錄 $HOME/.ptk 目錄下,該目錄以后會作為 PTK 工具的工作目錄, 其產(chǎn)生的緩存文件、數(shù)據(jù)文件以及集群的配置信息,備份信息等文件均會存儲到該目錄下。 同時,安裝指令會自動將 $HOME/.ptk/bin 的路徑加入到對應(yīng) SHELL Profile 文件(安裝日志的末尾會顯示)的 PATH 環(huán)境變量中, 這樣在用戶登錄到服務(wù)器后就可以直接使用 ptk 指令了。

執(zhí)行安裝完成后,用戶重新打開終端即可激活 ptk 命令。

2.2 離線安裝

如果您的服務(wù)器無法直接訪問互聯(lián)網(wǎng)或者是需要在 Windows 系統(tǒng)上使用 PTK 工具,此時可以通過手動方式進行安裝。

請按照以下操作步驟進行安裝:

  1. 先從下面鏈接頁面下載對應(yīng)服務(wù)器架構(gòu)的安裝包:

    🔗 https://www.mogdb.io/downloads/ptk/all

  2. 將安裝包上傳到目標(biāo)服務(wù)器上解壓即可

    mkdir -p $HOME/.ptk/bin
    tar -xvf ptk_1.7.0_linux_x86_64.tar.gz -C $HOME/.ptk/bin
    echo "export PATH=$HOME/.ptk/bin:$PATH" >> $HOME/.bashrc
    source $HOME/.bashrc
    

3、使用PTK一鍵部署openGauss

3.1 安裝前準(zhǔn)備

整體安裝過程如下:

1、生成模板文件

2、檢查操作系統(tǒng)是否滿足要求并生成整改文件腳本

3、執(zhí)行安裝

另外說一句,執(zhí)行之前需要提前配置好主機名及hosts文件,只有這些!

這里示例使用的環(huán)境如下:

操作系統(tǒng):銀河麒麟V10

數(shù)據(jù)庫版本:openGauss 5.02 for openEuler 22.03

3.2 生成模板文件

使用ptk template 命令即可,以上是命令幫助

[root@ogserver ~]# ptk template -h
生成配置模板Usage:ptk template [flags]Available Commands:create      交互式創(chuàng)建配置文件mogha       生成 MogHA 配置scale-out   生成擴容配置Flags:-d, --base-dir string       指定數(shù)據(jù)庫要安裝的基目錄 (default "/opt/mogdb")-n, --cluster-name string   指定集群名稱, 默認(rèn)會隨機生成-g, --group string          指定系統(tǒng)用戶組 (default "omm")-l, --local                 生成安裝本地數(shù)據(jù)庫的配置文件-p, --port int              指定數(shù)據(jù)庫端口 (default 26000)-u, --user string           指定系統(tǒng)用戶名 (default "omm")Global Flags:--disable-color         禁用彩色日志--disable-debug-log     不生成調(diào)試日志文件--disable-progressbar   全局不顯示進度條-h, --help                  打印幫助信息--log-file string       指定運行日志文件路徑--log-format string     指定運行日志的輸出格式, 可選項: [text, json] (default "text")--log-level string      指定運行日志級別, 可選項: [debug, info, warning, error, panic] (default "info")--silence               不打印日志到標(biāo)準(zhǔn)輸出--skip-fix-ssh          無需通過交互修復(fù) ssh 連接Examples:
# 生成本地單實例配置模板
ptk template -l > config.yml# 生成多實例集群的配置模板
ptk template > config.yml# 自定義部分配置字段的值
ptk template -n <CLUSTER_NAME> -u <OS_USER> -g <OS_USERGROUP> -d <BASE_DIR> -p <DB_PORT> > config.ymlSupport from: v0.2Use "ptk template [command] --help" for more information about a command.

如果你是小白,推薦使用ptk template create 執(zhí)行交互式創(chuàng)建,下面是示例:

[root@ogserver ~]# ptk template create
? 請輸入集群名稱 (默認(rèn): swirles): dbserver
? 請輸入系統(tǒng)用戶名 (默認(rèn): omm): omm
? 請輸入用戶組名 (默認(rèn): omm): dbgroup
? 請輸入數(shù)據(jù)庫密碼 (8~15 個字符, 3 種類型): **********
? 再次輸入數(shù)據(jù)庫密碼: **********
? 請輸入數(shù)據(jù)庫端口 (范圍 1024~65535) (默認(rèn): 26000): 15400
? 請輸入數(shù)據(jù)庫基礎(chǔ)目錄 (需為空目錄) (默認(rèn): /opt/mogdb): /data/openGauss█
? 是否要安裝CM組件 (默認(rèn) n) [y/n]: y
? 是否要安裝CM組件 (默認(rèn) n) [y/n]: y
接下來, 我們來添加一些數(shù)據(jù)庫實例服務(wù)器
================db server 1================
? 請輸入服務(wù)器 IP (僅支持 IPv4): 192.168.100.10
? 請選擇數(shù)據(jù)庫角色: primary        //此處會提示你是primaty 還是standby,可以按光標(biāo)選擇
? 請輸入可用區(qū)的名稱 (默認(rèn): AZ1): 
? 請輸入可用區(qū) ("AZ1") 的優(yōu)先級 (默認(rèn): 1): 
================ end ================
? 您想添加另一個數(shù)據(jù)庫實例嗎 (默認(rèn) n) [y/n]: n
Generate /root/config.2024-09-03T15_51_58.yaml successfully

3.3 執(zhí)行安裝前檢查

執(zhí)行ptk checkos -f <模板文件> --detail就會顯示出檢查情況,并詳細(xì)列出哪有不符合Abnormal,哪里是告警Warning建議調(diào)整。

這里示例執(zhí)行輸出如下,隨后會自動生成 個修改腳本,只要執(zhí)行一下,就可以完成abnormal項的修改。

[root@ogserver ~]# ptk checkos -f /root/config.2024-09-03T15_51_58.yaml  --detail
INFO[2024-09-03T16:00:52.374] 預(yù)檢查依賴工具...                                   
INFO[2024-09-03T16:00:52.434] [192.168.100.10][omm] platform: kylin_V10_64bit 
INFO[2024-09-03T16:00:52.437] [192.168.100.111][omm] 交換內(nèi)存 4132860kB,總內(nèi)存 2952948kB 
ERRO[2024-09-03T16:00:52.453] [192.168.100.111][omm] net.core.rmem_default=212992, expect 262144 
ERRO[2024-09-03T16:00:52.460] [192.168.100.111][omm] kernel.sem=32000	1024000000	500	32000, expect 250 6400000 1000 25600 
WARN[2024-09-03T16:00:52.463] [192.168.100.111][omm] net.ipv4.tcp_max_syn_backlog=128, expect 65535 
WARN[2024-09-03T16:00:52.469] [192.168.100.111][omm] net.ipv4.tcp_syn_retries=6, expect 5 
WARN[2024-09-03T16:00:52.472] [192.168.100.111][omm] net.core.somaxconn=128, expect 65535 
ERRO[2024-09-03T16:00:52.475] [192.168.100.111][omm] net.core.wmem_default=212992, expect 262144 
ERRO[2024-09-03T16:00:52.485] [192.168.100.111][omm] net.core.wmem_max=212992, expect 1048576 
WARN[2024-09-03T16:00:52.491] [192.168.100.111][omm] net.ipv4.tcp_keepalive_intvl=75, expect 30 
WARN[2024-09-03T16:00:52.498] [192.168.100.111][omm] net.ipv4.tcp_wmem=4096	16384	4194304, expect 8192 250000 16777216 
WARN[2024-09-03T16:00:52.500] [192.168.100.111][omm] net.ipv4.tcp_keepalive_time=7200, expect 30 
WARN[2024-09-03T16:00:52.503] [192.168.100.111][omm] net.ipv4.tcp_retries1=3, expect 5 
WARN[2024-09-03T16:00:52.505] [192.168.100.111][omm] net.ipv4.tcp_retries2=15, expect 12 
WARN[2024-09-03T16:00:52.507] [192.168.100.111][omm] net.core.netdev_max_backlog=1000, expect 65535 
WARN[2024-09-03T16:00:52.513] [192.168.100.111][omm] vm.min_free_kbytes=67584, expect 147647 
ERRO[2024-09-03T16:00:52.517] [192.168.100.111][omm] net.core.rmem_max=212992, expect 1048576 
WARN[2024-09-03T16:00:52.521] [192.168.100.111][omm] net.ipv4.tcp_tw_reuse=2, expect 1 
WARN[2024-09-03T16:00:52.523] [192.168.100.111][omm] net.ipv4.tcp_rmem=4096	131072	6291456, expect 8192 250000 16777216 
INFO[2024-09-03T16:00:52.530] [192.168.100.111][omm] 檢查 kernel.core_pattern 
INFO[2024-09-03T16:00:52.534] [192.168.100.111][omm] 檢查 RemoveIPC 的值       
INFO[2024-09-03T16:00:52.541] [192.168.100.111][omm] 檢查 KillUserProcesses 的值 
ERRO[2024-09-03T16:00:52.554] [192.168.100.111][omm] selinux mode in /etc/selinux/config is 'enforcing' 
INFO[2024-09-03T16:00:55.427] [192.168.100.111][omm] 內(nèi)核版本: 4.19.90-52.22.v2207.ky10.x86_64 
WARN[2024-09-03T16:00:55.449] [192.168.100.111][omm] device(/dev/sda) readahead value=8192, expect 16384. 
INFO[2024-09-03T16:00:55.458] [192.168.100.111][omm] 檢查端口 15400            
INFO[2024-09-03T16:00:55.467] [192.168.100.111][omm] 端口 15400 空閑           
INFO[2024-09-03T16:00:55.474] [192.168.100.111][omm] 時區(qū): +0800             
WARN[2024-09-03T16:00:55.485] [192.168.100.111][omm] device(sda) 'IO Request'=254, expect 256 
ERRO[2024-09-03T16:00:55.501] [192.168.100.111][omm] firewall status='enabled', expect 'disabled'. 
INFO[2024-09-03T16:00:55.501] 完成所有檢查項                                      
INFO[2024-09-03T16:00:55.501] 將修復(fù) OS 腳本寫入 root_fix_os.0903.160055.sh 成功    
INFO[2024-09-03T16:00:55.501] 用時: 4s                                       
# Check ResultsItem                |  Level   |                                   Message                                    
------------------------------------+----------+------------------------------------------------------------------------------A1.Check_OS_Version               | OK       |                                                                              A2.Check_Kernel_Version           | OK       |                                                                              A3.Check_Unicode                  | OK       |                                                                              A4.Check_TimeZone                 | OK       |                                                                              A5.Check_Swap_Memory_Configure    | Warning  | [192.168.100.111]:                                                           |          | swap memory (4132860 KB) is lager than total memory (2952948 KB)             A6.Check_SysCtl_Parameter         | Abnormal | [192.168.100.111]:                                                           |          | Abnormal: net.core.rmem_default=212992, expect 262144                        |          | Abnormal: kernel.sem=32000	1024000000	500	32000, expect 250 6400000 1000 25600  |          | Warning: net.ipv4.tcp_max_syn_backlog=128, expect 65535                      |          | Warning: net.ipv4.tcp_syn_retries=6, expect 5                                |          | Warning: net.core.somaxconn=128, expect 65535                                |          | Abnormal: net.core.wmem_default=212992, expect 262144                        |          | Abnormal: net.core.wmem_max=212992, expect 1048576                           |          | Warning: net.ipv4.tcp_keepalive_intvl=75, expect 30                          |          | Warning: net.ipv4.tcp_wmem=4096	16384	4194304, expect 8192 250000 16777216     |          | Warning: net.ipv4.tcp_keepalive_time=7200, expect 30                         |          | Warning: net.ipv4.tcp_retries1=3, expect 5                                   |          | Warning: net.ipv4.tcp_retries2=15, expect 12                                 |          | Warning: net.core.netdev_max_backlog=1000, expect 65535                      |          | Warning: vm.min_free_kbytes=67584, expect 147647                             |          | Abnormal: net.core.rmem_max=212992, expect 1048576                           |          | Warning: net.ipv4.tcp_tw_reuse=2, expect 1                                   |          | Warning: net.ipv4.tcp_rmem=4096	131072	6291456, expect 8192 250000 16777216    A7.Check_FileSystem_Configure     | OK       |                                                                              A8.Check_Disk_Configure           | OK       |                                                                              A9.Check_BlockDev_Configure       | Warning  | [192.168.100.111]:                                                           |          | device(/dev/sda) readahead value=8192, expect 16384.                         A9.Check_Logical_Block            | OK       |                                                                              A10.Check_Asynchronous_IO_Request | OK       |                                                                              A10.Check_IO_Configure            | OK       |                                                                              A10.Check_NR_Request              | Warning  | [192.168.100.111]:                                                           |          | device(sda) 'IO Request'=254, expect 256                                     A11.Check_Network_Configure       | OK       |                                                                              A12.Check_Time_Consistency        | OK       |                                                                              A13.Check_Firewall_Status         | Abnormal | [192.168.100.111]:                                                           |          | firewall status='enabled', expect 'disabled'.                                A14.Check_THP_Status              | OK       |                                                                              A15.Check_Dependent_Package       | Warning  | [192.168.100.111]:                                                           |          | Warning: not found package: flex                                             |          | Warning: not found package: bison                                            |          | Warning: not found package: ncurses-devel                                    A16.Check_CPU_Instruction_Set     | OK       |                                                                              A17.Check_Port                    | OK       |                                                                              A18.Check_Selinux                 | Abnormal | [192.168.100.111]:                                                           |          | selinux mode in /etc/selinux/config is 'enforcing'                           A19.Check_User_Ulimit             | OK       |                                                                              A20.Check_Directory               | OK       |                                                                              
Total count 23, abnormal count 3, warning count 4
Failed to check os, can’t perform installation unless fix all the abnormal items.
You can use 'ptk checkos -i ITEM --detail' to get detail message
Please check root_fix_os.0903.160055.sh for commands to resolve.

這里我們執(zhí)行一下腳本,修正不符合的參數(shù)。

[root@ogserver ~]# sh root_fix_os.0903.160055.sh 
++ ip addr
++ grep -v 'inet6\|127.0.0.1\|grep'
++ awk '{print $2}'
++ awk -F / '{print $1}'
++ grep inet
+ local_ips='192.168.100.111
192.168.233.134
192.168.122.1'
+ for ip in ${local_ips}
+ [[ 192.168.100.111 == \1\9\2\.\1\6\8\.\1\0\0\.\1\1\1 ]]
+ sed -i /net.core.rmem_default/d /etc/sysctl.conf
+ echo net.core.rmem_default = 262144
+ sed -i /kernel.sem/d /etc/sysctl.conf
+ echo kernel.sem = 250 6400000 1000 25600
+ sed -i /net.core.wmem_default/d /etc/sysctl.conf
+ echo net.core.wmem_default = 262144
+ sed -i /net.core.wmem_max/d /etc/sysctl.conf
+ echo net.core.wmem_max = 1048576
+ sed -i /net.core.rmem_max/d /etc/sysctl.conf
+ echo net.core.rmem_max = 1048576
+ sysctl -p
kernel.sysrq = 0
net.ipv4.ip_forward = 0
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.send_redirects = 0
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.all.secure_redirects = 0
net.ipv4.conf.default.secure_redirects = 0
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.icmp_ignore_bogus_error_responses = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.tcp_syncookies = 1
net.core.rmem_default = 262144
kernel.sem = 250 6400000 1000 25600
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.core.rmem_max = 1048576
+ sudo sed -i s/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config
+ systemctl disable firewalld
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
+ systemctl stop firewalld
+ for ip in ${local_ips}
+ [[ 192.168.233.134 == \1\9\2\.\1\6\8\.\1\0\0\.\1\1\1 ]]
+ for ip in ${local_ips}
+ [[ 192.168.122.1 == \1\9\2\.\1\6\8\.\1\0\0\.\1\1\1 ]]

改完可以再檢查一遍,幾乎都修復(fù)完了,我就省略一下只顯示結(jié)果

Total count 23, abnormal count 0, warning count 5

關(guān)于warning的選項也可根據(jù)提示手動修改。這里就不演示了。

3.4 安裝openGauss數(shù)據(jù)庫

執(zhí)行命令,一鍵安裝

[root@ogserver ~]#  ptk install -f /root/config.2024-09-03T15_51_58.yaml -p /root/kylinv10sp3_openGauss-5.0.2-openEuler-64bit-all_x86.tar.gz 
INFO[2024-09-03T16:15:04.983] PTK 版本: 1.7.0 release                        
INFO[2024-09-03T16:15:04.983] 從 /root/config.2024-09-03T15_51_58.yaml 加載配置 
如果您選擇繼續(xù)安裝軟件,
就代表您接受該軟件的許可協(xié)議。[Y]: 接受并繼續(xù)[C]: 顯示許可協(xié)議內(nèi)容[N]: 中止安裝并退出? 請輸入 (默認(rèn): Y): y
集群名:"dbserver"
+--------------+-----------------+--------------+-------+---------+----------------------+----------+
| az(priority) |       ip        | user(group)  | port  |  role   |       data dir       | upstream |
+--------------+-----------------+--------------+-------+---------+----------------------+----------+
| AZ1(1)       | 192.168.100.111 | omm(dbgroup) | 15400 | primary | /data/openGauss/data | -        |
+--------------+-----------------+--------------+-------+---------+----------------------+----------+
? 集群配置是否正確 (默認(rèn) n) [y/n]: y
INFO[2024-09-03T16:15:15.644] 檢查主機名 ...                                    
INFO[2024-09-03T16:15:15.647] 主機名檢查成功                                      
INFO[2024-09-03T16:15:15.647] 檢查操作系統(tǒng) ...                                   
INFO[2024-09-03T16:15:15.647] 預(yù)檢查依賴工具...                                   
INFO[2024-09-03T16:15:15.672] [192.168.100.111][omm] platform: kylin_V10_64bit 
INFO[2024-09-03T16:15:15.674] [192.168.100.111][omm] 內(nèi)核版本: 4.19.90-52.22.v2207.ky10.x86_64 
INFO[2024-09-03T16:15:15.678] [192.168.100.111][omm] 時區(qū): +0800             
WARN[2024-09-03T16:15:15.685] [192.168.100.111][omm] device(/dev/sda) readahead value=8192, expect 16384. 
INFO[2024-09-03T16:15:15.693] [192.168.100.111][omm] 交換內(nèi)存 4132860kB,總內(nèi)存 2952948kB 
WARN[2024-09-03T16:15:15.696] [192.168.100.111][omm] net.ipv4.tcp_max_syn_backlog=128, expect 65535 
WARN[2024-09-03T16:15:15.706] [192.168.100.111][omm] net.ipv4.tcp_retries2=15, expect 12 
WARN[2024-09-03T16:15:15.719] [192.168.100.111][omm] net.ipv4.tcp_keepalive_intvl=75, expect 30 
WARN[2024-09-03T16:15:15.721] [192.168.100.111][omm] net.ipv4.tcp_rmem=4096	131072	6291456, expect 8192 250000 16777216 
WARN[2024-09-03T16:15:15.723] [192.168.100.111][omm] net.core.netdev_max_backlog=1000, expect 65535 
WARN[2024-09-03T16:15:15.784] [192.168.100.111][omm] vm.min_free_kbytes=67584, expect 147647 
WARN[2024-09-03T16:15:15.920] [192.168.100.111][omm] net.ipv4.tcp_keepalive_time=7200, expect 30 
WARN[2024-09-03T16:15:15.994] [192.168.100.111][omm] net.ipv4.tcp_retries1=3, expect 5 
WARN[2024-09-03T16:15:15.998] [192.168.100.111][omm] net.ipv4.tcp_wmem=4096	16384	4194304, expect 8192 250000 16777216 
WARN[2024-09-03T16:15:16.005] [192.168.100.111][omm] net.ipv4.tcp_syn_retries=6, expect 5 
WARN[2024-09-03T16:15:16.011] [192.168.100.111][omm] net.ipv4.tcp_tw_reuse=2, expect 1 
WARN[2024-09-03T16:15:16.018] [192.168.100.111][omm] net.core.somaxconn=128, expect 65535 
INFO[2024-09-03T16:15:16.020] [192.168.100.111][omm] 檢查 kernel.core_pattern 
INFO[2024-09-03T16:15:16.024] [192.168.100.111][omm] 檢查 RemoveIPC 的值       
INFO[2024-09-03T16:15:16.032] [192.168.100.111][omm] 檢查 KillUserProcesses 的值 
INFO[2024-09-03T16:15:18.426] [192.168.100.111][omm] 檢查端口 15400            
INFO[2024-09-03T16:15:18.439] [192.168.100.111][omm] 端口 15400 空閑           
WARN[2024-09-03T16:15:18.471] [192.168.100.111][omm] device(sda) 'IO Request'=254, expect 256 
INFO[2024-09-03T16:15:18.509] 完成所有檢查項                                      
INFO[2024-09-03T16:15:18.509] 用時: 3s                                       
INFO[2024-09-03T16:15:18.509] 操作系統(tǒng)檢查成功                                     
INFO[2024-09-03T16:15:18.509] 檢查系統(tǒng)發(fā)行版 ...                                  
INFO[2024-09-03T16:15:18.509] 發(fā)行版檢查成功                                      
INFO[2024-09-03T16:15:18.509] 檢查用戶 ...                                     
INFO[2024-09-03T16:15:18.518] 檢查用戶成功                                       
INFO[2024-09-03T16:15:18.518] 檢查端口 ...                                     
INFO[2024-09-03T16:15:18.518] checking port 15400 on host 192.168.100.111 (db listen port) ... 
INFO[2024-09-03T16:15:18.526] checking port 15401 on host 192.168.100.111 (db HA port) ... 
INFO[2024-09-03T16:15:18.532] 端口檢查成功                                       
INFO[2024-09-03T16:15:18.535] [192.168.100.111][omm] 創(chuàng)建操作系統(tǒng)用戶omm, 組dbgroup 
INFO[2024-09-03T16:15:18.560] [192.168.100.111][omm] set ulimit configs    
INFO[2024-09-03T16:15:18.563] 準(zhǔn)備安裝包 ...                                    
INFO[2024-09-03T16:15:18.563] 安裝包已經(jīng)就緒                                      
INFO[2024-09-03T16:15:18.563] parse installation package ...               
INFO[2024-09-03T16:16:12.448] 數(shù)據(jù)庫產(chǎn)品: openGauss, 版本: 5.0.2, number: 92.861, commit_id: 48a25b11 
INFO[2024-09-03T16:16:12.800] 將 openGauss-5.0.2-openEuler-64bit.tar.bz2 提取到目錄/tmp/ptk_tmp_2235563565 
INFO[2024-09-03T16:16:31.188] execute command: gaussdb --version           
INFO[2024-09-03T16:16:31.241] parse installation package success           
INFO[2024-09-03T16:16:31.241] 開始完善配置 ...                                   
INFO[2024-09-03T16:16:31.241] 完善配置成功                                       
INFO[2024-09-03T16:16:31.241] save the topology to metadata                
INFO[2024-09-03T16:16:31.242] 開始分發(fā)安裝包...                                   
INFO[2024-09-03T16:16:31.420] 安裝包分發(fā)成功                                      
INFO[2024-09-03T16:16:31.420] 開始安裝邏輯節(jié)點 ...                                 
INFO[2024-09-03T16:16:31.421] 部署數(shù)據(jù)庫到 omm@192.168.100.111                   
INFO[2024-09-03T16:16:31.422] [192.168.100.111][omm] 創(chuàng)建用戶omm的目錄:/data/openGauss 
INFO[2024-09-03T16:16:31.835] [192.168.100.111][omm] 清除用戶 omm 的 IPC 資源     
INFO[2024-09-03T16:16:31.911] [192.168.100.111][omm] 創(chuàng)建用戶omm的目錄:/data/openGauss/tool,/data/openGauss/tool/ptk_tool/bin 
INFO[2024-09-03T16:16:33.218] [192.168.100.111][omm] 將 kylinv10sp3_openGauss-5.0.2-openEuler-64bit-all_x86.tar.gz 提取到目錄/data/openGauss/tool 
INFO[2024-09-03T16:16:34.078] [192.168.100.111][omm] 將 openGauss-5.0.2-openEuler-64bit-om.tar.gz 提取到目錄/data/openGauss/tool 
INFO[2024-09-03T16:16:34.864] [192.168.100.111][omm] 嘗試修復(fù)psutil Python庫    
INFO[2024-09-03T16:16:35.444] [192.168.100.111][omm] 寫入文件 /data/openGauss/tool/script/py_pstree.py 
INFO[2024-09-03T16:16:35.588] [192.168.100.111][omm] 寫入文件 /data/openGauss/tool/ptk_tool/bin/README.md 
INFO[2024-09-03T16:16:35.838] [192.168.100.111][omm] 寫入文件 /data/openGauss/tool/ptk_tool/bin/pscp 
INFO[2024-09-03T16:16:36.123] [192.168.100.111][omm] 寫入文件 /data/openGauss/tool/ptk_tool/bin/pssh 
INFO[2024-09-03T16:16:36.262] [192.168.100.111][omm] 寫入文件 /data/openGauss/tool/ptk_tool/bin/task_pool.py 
INFO[2024-09-03T16:16:36.682] [192.168.100.111][omm] 創(chuàng)建用戶omm的目錄:/data/openGauss/app 
INFO[2024-09-03T16:16:36.914] [192.168.100.111][omm] 將 openGauss-5.0.2-openEuler-64bit.tar.bz2 提取到目錄/data/openGauss/app 
INFO[2024-09-03T16:16:57.317] [192.168.100.111][omm] 將 /data/openGauss/app 的權(quán)限更改為 700 
INFO[2024-09-03T16:16:57.442] [192.168.100.111][omm] 創(chuàng)建用戶omm的目錄:/data/openGauss/app/share/postgresql 
INFO[2024-09-03T16:16:57.793] [192.168.100.111][omm] 將 /data/openGauss/tool/script/gspylib/etc/sql/pmk_schema.sql 復(fù)制到 /data/openGauss/app/share/postgresql 
INFO[2024-09-03T16:16:57.866] [192.168.100.111][omm] 將 /data/openGauss/tool/script/gspylib/etc/sql/pmk_schema_single_inst.sql 復(fù)制到 /data/openGauss/app/share/postgresql 
INFO[2024-09-03T16:16:57.920] [192.168.100.111][omm] 寫入文件 /data/openGauss/app/bin/transfer.py 
INFO[2024-09-03T16:16:58.077] [192.168.100.111][omm] 設(shè)置用戶omm的配置文件          
INFO[2024-09-03T16:16:58.530] [192.168.100.111][omm] 驗證并嘗試修復(fù) gs_initdb 的 ld 庫 
INFO[2024-09-03T16:16:58.582] [192.168.100.111][omm] 驗證并嘗試修復(fù) gaussdb 的 ld 庫 
INFO[2024-09-03T16:16:58.654] [192.168.100.111][omm] 創(chuàng)建用戶omm的目錄:/data/openGauss/log/gs_profile,/data/openGauss/log/pg_log,/data/openGauss/log/pg_audit,/data/openGauss/log/bin,/data/openGauss/log/pg_log/dn_6001,/data/openGauss/log/pg_audit/dn_6001 
INFO[2024-09-03T16:17:01.316] [192.168.100.111][omm] 創(chuàng)建用戶omm的目錄:/data/openGauss/tmp 
INFO[2024-09-03T16:17:01.519] [192.168.100.111][omm] 將版本保存為 upgrade_version 
INFO[2024-09-03T16:17:01.868] [192.168.100.111][omm] 創(chuàng)建文件 cluster_manual_start 
INFO[2024-09-03T16:17:01.956] [192.168.100.111][omm] 生成 cluster_static_config 文件 
INFO[2024-09-03T16:17:02.045] [192.168.100.111][omm] 創(chuàng)建用戶omm的目錄:/data/openGauss/data 
INFO[2024-09-03T16:17:02.302] [192.168.100.111][omm] 寫入文件 /data/openGauss/tool/.ptk_deployer 
INFO[2024-09-03T16:17:02.691] 生成認(rèn)證文件                                       
INFO[2024-09-03T16:17:03.917] 下載認(rèn)證文件                                       
INFO[2024-09-03T16:17:04.867] 認(rèn)證文件安裝成功                                     
INFO[2024-09-03T16:17:04.867] 在 omm@192.168.100.111 上初始化數(shù)據(jù)庫                
INFO[2024-09-03T16:17:04.867] [192.168.100.111][omm] 數(shù)據(jù)庫正在初始化, 請稍等一會兒      
INFO[2024-09-03T16:17:16.636] [192.168.100.111][omm] 配置 postgresql.conf 文件 
INFO[2024-09-03T16:17:16.739] [192.168.100.111][omm] 配置 pg_hba.conf 文件     
INFO[2024-09-03T16:17:16.808] [192.168.100.111][omm] 將 SSL 文件復(fù)制到數(shù)據(jù)目錄       
INFO[2024-09-03T16:17:16.893] 邏輯節(jié)點安裝成功                                     
INFO[2024-09-03T16:17:16.900] 生成 PTKC ...                                  
INFO[2024-09-03T16:17:17.054] 開始構(gòu)建 SSH 互信 ...                              
INFO[2024-09-03T16:17:18.154] SSH 互信構(gòu)建成功                                   
INFO[2024-09-03T16:17:18.154] 啟動數(shù)據(jù)庫 ...                                    
INFO[2024-09-03T16:17:18.154] [192.168.100.111][omm] 使用 gs_ctl 啟動數(shù)據(jù)庫中 ...  
INFO[2024-09-03T16:17:18.154] [192.168.100.111][omm] 數(shù)據(jù)庫正在啟動,請稍等一會兒        
INFO[2024-09-03T16:17:19.245] [192.168.100.111][omm] 數(shù)據(jù)庫啟動成功               
INFO[2024-09-03T16:17:19.245] 數(shù)據(jù)庫啟動成功                                      
INFO[2024-09-03T16:17:19.245] 正在清理臨時目錄 ...                                 
INFO[2024-09-03T16:17:19.271] 臨時目錄清理成功                                     
INFO[2024-09-03T16:17:19.271] 用時: 2m9s                                     cluste_name |      host       | user | port  |    status     | message  
--------------+-----------------+------+-------+---------------+----------dbserver    | 192.168.100.111 | omm  | 15400 | start_success | success 

只用時2m9s安裝完畢。

4、使用PTK管理數(shù)據(jù)庫

這里簡單演示一下簡單的管理命令

4.1 啟停集群

主要是通過ptk cluster命令來管理集群

[root@ogserver ~]# ptk cluster -h
管理集群Usage:ptk cluster [flags]Available Commands:start                     啟動數(shù)據(jù)庫實例或集群stop                      停止數(shù)據(jù)庫實例或集群restart                   重啟數(shù)據(jù)庫實例或集群status                    顯示集群或?qū)嵗臓顟B(tài)信息build                     重建數(shù)據(jù)庫數(shù)據(jù)switchover                主備切換,升級備庫為主庫,降主庫為備庫failover                  提升一個備庫為主庫inspect                   返回關(guān)于集群的內(nèi)部信息install-plugin            安裝 MogDB 插件list-plugins              列出集群中的插件install-mogha             為 MogDB 安裝 MogHAuninstall-mogha           卸載 MogHAscale-in                  對一個MogDB集群進行縮容scale-out                 對一個MogDB集群進行擴容show-hba                  打印數(shù)據(jù)庫 pg_hba.conf 內(nèi)容set-hba                   設(shè)置并重新加載數(shù)據(jù)庫的 pg_hba.confshow-guc                  打印數(shù)據(jù)庫參數(shù)set-guc                   設(shè)置并重新加載數(shù)據(jù)庫參數(shù)show-config               打印集群拓?fù)渑渲梦募odify-comment            修改指定集群的備注shell                     執(zhí)行 shell 命令或腳本refresh                   更新集群配置promote                   將一個數(shù)據(jù)庫實例從備庫提升為主庫, 或從級聯(lián)備庫提升為備庫demote                    將數(shù)據(jù)庫角色從 Primary 降級為 Standby,或從 Standby 降級為 Cascade Standbyupgrade                   升級集群的數(shù)據(jù)庫版本upgrade-commit            確認(rèn)提交升級操作(!提交后不能回滾)upgrade-rollback          回滾升級操作is-in-upgrade             查看集群是否處于升級過程中install-kerberos-server   安裝 kerberos 服務(wù)器uninstall-kerberos-server 卸載 kerberos 服務(wù)add-kerberos-auth         添加 kerberos 認(rèn)證del-kerberos-auth         刪除 kerberos 認(rèn)證load-cm-vip               管理 CM 的虛擬IP (僅 Mogdb v5.0.4+ 支持)gen-cert-files            生成ssl證書文件install-cm                安裝 CM 組件uninstall-cm              卸載 CM 組件takeover                  添加一個新的實例到PTK的元數(shù)據(jù)throwout                  從PTK的元數(shù)據(jù)中移除實例rename                    重命名集群install-mogila            安裝mogila示例數(shù)據(jù)install-compat-tools      安裝compat-toolsuninstall-compat-tools    Uninstall compat-toolscreatedb                  創(chuàng)建DatabaseFlags:-n, --name string   集群名稱Global Flags:--disable-color         禁用彩色日志--disable-debug-log     不生成調(diào)試日志文件--disable-progressbar   全局不顯示進度條-h, --help                  打印幫助信息--log-file string       指定運行日志文件路徑--log-format string     指定運行日志的輸出格式, 可選項: [text, json] (default "text")--log-level string      指定運行日志級別, 可選項: [debug, info, warning, error, panic] (default "info")--silence               不打印日志到標(biāo)準(zhǔn)輸出--skip-fix-ssh          無需通過交互修復(fù) ssh 連接Support from: v0.1Use "ptk cluster [command] --help" for more information about a command.

PTK可以代替gs_om命令來啟停集群,示例如下

[root@ogserver ~]# ptk cluster -n dbserver  status
[   Cluster State   ]
cluster_name                   : dbserver
cluster_state                  : Normal
database_version               : openGauss 5.0.2 (build 48a25b11)[  Datanode State   ]cluster_name |  id  |       ip        | port  | user | nodename | db_role | state  |  uptime  | upstream  
---------------+------+-----------------+-------+------+----------+---------+--------+----------+-----------dbserver     | 6001 | 192.168.100.111 | 15400 | omm  | dn_6001  | primary | Normal | 00:02:29 | -         
[root@ogserver ~]# ptk cluster -n dbserver  stop 
INFO[2024-09-03T16:19:52.916] 操作: stop                                     
INFO[2024-09-03T16:19:52.916] ========================================     
INFO[2024-09-03T16:19:53.643] 數(shù)據(jù)庫[192.168.100.111:15400]停止中 ...            
INFO[2024-09-03T16:19:54.807] 數(shù)據(jù)庫[192.168.100.111:15400]停止成功               
INFO[2024-09-03T16:19:54.807] ========================================     
INFO[2024-09-03T16:19:54.807] 停止成功                                         
[root@ogserver ~]# ptk cluster -n dbserver  start
INFO[2024-09-03T16:20:02.251] checking cluster state before start          
INFO[2024-09-03T16:20:02.699] 操作: start                                    
INFO[2024-09-03T16:20:02.699] ========================================     
INFO[2024-09-03T16:20:02.699] 數(shù)據(jù)庫[192.168.100.111:15400]啟動中 ...            
INFO[2024-09-03T16:20:03.993] 數(shù)據(jù)庫[192.168.100.111:15400]啟動成功               
INFO[2024-09-03T16:20:04.245] ========================================     
INFO[2024-09-03T16:20:04.245] 集群啟動成功 

4.2 卸載集群

卸載前需要先停止停群,然后執(zhí)行ptk uninstall -n <集群名>

[root@ogserver ~]# ptk uninstall -n dbserver
INFO[2024-09-03T16:23:05.516] PTK 版本: 1.7.0 release                        
集群名:"dbserver"
+--------------+-----------------+--------------+-------+---------+----------------------+----------+
| az(priority) |       ip        | user(group)  | port  |  role   |       data dir       | upstream |
+--------------+-----------------+--------------+-------+---------+----------------------+----------+
| AZ1(1)       | 192.168.100.111 | omm(dbgroup) | 15400 | primary | /data/openGauss/data | -        |
+--------------+-----------------+--------------+-------+---------+----------------------+----------+
? 您確實要卸載該集群嗎? 請仔細(xì)確認(rèn) (默認(rèn) n) [y/n]: y
? 是否要刪除數(shù)據(jù)庫數(shù)據(jù) (默認(rèn) n) [y/n]: y
? 是否要刪除操作系統(tǒng)用戶 (默認(rèn) n) [y/n]: y
INFO[2024-09-03T16:23:08.856] [192.168.100.111][omm] 檢查數(shù)據(jù)庫目錄屬主             
INFO[2024-09-03T16:23:09.217] [192.168.100.111][omm] 檢查數(shù)據(jù)進程狀態(tài)              
INFO[2024-09-03T16:23:09.376] [192.168.100.111][omm] 刪除文件: /data/openGauss/app,/data/openGauss/tool,/data/openGauss/tmp,/data/openGauss/data,/data/openGauss/log 
INFO[2024-09-03T16:23:09.739] [192.168.100.111][omm] 終止用戶 "omm" 現(xiàn)有的進程: [krb5kdc] 
INFO[2024-09-03T16:23:10.142] [192.168.100.111][omm] 從cron.allow中移除用戶"omm" 
INFO[2024-09-03T16:23:10.148] [192.168.100.111][omm] 移除用戶"omm"的ulimits設(shè)置   
INFO[2024-09-03T16:23:10.176] [192.168.100.111][omm] 如果 "/data/openGauss" 為空,則刪除 
INFO[2024-09-03T16:23:10.189] [192.168.100.111][omm] 終止用戶 "omm" 的所有進程      
INFO[2024-09-03T16:23:10.222] [192.168.100.111][omm] 刪除用戶"omm"             
INFO[2024-09-03T16:23:10.255] 卸載成功                                         

5 總結(jié)

要做一個好的數(shù)據(jù)庫,好用的工具是必不可少的,這點MogDB確實優(yōu)秀,PTK命令工具十分簡潔方便,簡單上手。

看了一下MogDB官網(wǎng)還有好幾實用的工具,都可以用來進行測試。這次先測到這里,回頭再詳細(xì)使用。

http://www.risenshineclean.com/news/49877.html

相關(guān)文章:

  • 深圳網(wǎng)站建設(shè)公司 交通如何推廣app更高效
  • 珠海網(wǎng)站優(yōu)化百度導(dǎo)航2023年最新版
  • 怎樣查看wordpress用的什么主題網(wǎng)站seo工具
  • 安徽六安郵政編碼seo快速排名軟件app
  • 關(guān)鍵詞的分類和優(yōu)化seo關(guān)鍵詞首頁排名代發(fā)
  • 企業(yè)宣傳片文案大全北京網(wǎng)站優(yōu)化排名
  • 得物app公司域名seo查詢
  • 做網(wǎng)站baidunongmin南寧seo優(yōu)化公司
  • 做網(wǎng)站怎么插音樂循環(huán)西安網(wǎng)站制作價格
  • 互聯(lián)網(wǎng)站備案登記表石家莊網(wǎng)站建設(shè)排名
  • 專業(yè)杭州網(wǎng)站建設(shè)今日頭條新聞最新事件
  • 網(wǎng)站的排版好看點擊進入官方網(wǎng)站
  • 濰坊網(wǎng)站定制 優(yōu)幫云谷歌搜索引擎入口2023
  • 浙江昆侖建設(shè)集團網(wǎng)站seo技術(shù)培訓(xùn)沈陽
  • 域名年費價格表新野seo公司
  • 代碼大全可復(fù)制武漢seo價格
  • 江蘇藝居建設(shè)有限公司網(wǎng)站如何做市場營銷推廣
  • 商城網(wǎng)站建設(shè)適合于哪類企業(yè)營業(yè)推廣促銷
  • 信息技術(shù)課做網(wǎng)站最近三天的新聞大事小學(xué)生
  • 用dw如何做網(wǎng)站首頁黑鋒網(wǎng)seo
  • 2024年1月流感情況百度網(wǎng)站怎么優(yōu)化排名
  • 長春網(wǎng)站seo報價廣告接單平臺app
  • 網(wǎng)站開發(fā)需要哪些知識南京seo按天計費
  • 南寧網(wǎng)站建設(shè)培訓(xùn)班seoheuni
  • 包頭網(wǎng)站建設(shè)百度網(wǎng)頁版瀏覽器
  • 網(wǎng)站引量方法關(guān)鍵詞排名關(guān)鍵詞優(yōu)化
  • 網(wǎng)站建設(shè)g廣告主資源哪里找
  • 吉林省長春市長春網(wǎng)站建設(shè)哪家好百度快照查詢
  • 手機萬能瀏覽器汕頭seo不錯
  • 深圳網(wǎng)站建設(shè)(信科網(wǎng)絡(luò))周口網(wǎng)站seo