tdsql(pg版本)安装文档

发布时间 2023-12-31 17:10:51作者: chy_cug

tdsql(pg版本)安装文档

一、安装的前置条件:
1、需要在开通oss机器的80和8080端口;
2、准备NAS,大小为2T.

二、安装前检查:
1、部署DN节点的服务器数据盘必须是SSD,不能用HDD:
通过cat /sys/block/sda/queue/rotational进行查看,返回值0即为SSD;返回1即为HDD。
lsblk -d -o name,rota
2、如果使用虚拟机部署OSS,则这几台虚拟机不能在同一台物理机上
查询机器是虚拟机,还是物理机:systemd-detect-virt
3、RAID配置要选择write-back(回写模式),而不是write-though(透写模式)
4、网卡配置:
lspci | grep -i ethernet
ifconfig ethtool enp4s0(enp4s0是网卡名)
5、RAID卡: ---由系统组设置
lspci| grep -i raid more /proc/scsi/scsi
6、磁盘:
smartctl -a /dev/sd* 或者 lsscsi
df -h
7、内存:
cat /proc/meminfo
lshw -short -C memory
dmidecode -t memory
free -g
内存频率:dmidecode | grep -A30 CPU | grep -i speed
8、CPU:
lscpu
hostnamectl
9、操作系统版本和CPU架构:
nkvers
uname -r
hostnamectl
uname -m
10、磁盘性能:
time dd if=/dev/zero of=test bs=8k count=51200 oflag=dsync
11、CPU是否为性能模式:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ---应该等于performance
cpupower frequency-info | grep performance
cpupower frequency-set -g performance ---设置性能模式
12、服务器的操作系统不能最小化安装,使用 Server 选项安装
13、主机名(hostname)要改好,不要使用缺省的localhost if [[ ! $HOSTNAME =~ localhost ]]; then echo yes; else echo no; fi
修改方法:
1)修改/etc/profile里面的HOSTNAME环境变量为xxxx
2)hostnamectl set-hostname xxxx
验证:hostname && echo $HOSTNAME
14、glibc版本:glibc-2.17 及以上:
rpm -qa|egrep 'glibc-[0-9]'|cut -d '-' -f 2 | head -1
getconf GNU_LIBC_VERSION
15、内核:Linux version 3.10.0 及以上
uname -r
16、系统盘文件系统:ext4
df -h
cat /etc/fstab
17、服务器的操作系统不能在部署TBase之前加固
18、服务器建议双网卡: ---由网络组配置
bonding ifconfig
19、数据盘:SSD推荐使用RAID10,如果追求更大的容量,且能够容忍一定程度的写入性能降低,也可以使用RAID5,挂载/data1目录
20、fio性能测试:
1)磁盘划分:1、/目录;2、/data目录;3、/data1目录; ---磁盘划分由系统组实施
2)cd /data1
fio --filename=/data1/fiotest.db --direct=1 --rw=randrw --rwmixwrite=70 --ioengine=libaio --bs=16k --size=5G --numjobs=10 --runtime=60 --group_reporting --name=mytest --iodepth=16
3)cd /data
fio --filename=/data/fiotest.db --direct=1 --rw=randrw --rwmixwrite=70 --ioengine=libaio --bs=16k --size=5G --numjobs=10 --runtime=60 --group_reporting --name=mytest --iodepth=16
4)cd /
fio --filename=/fiotest.db --direct=1 --rw=randrw --rwmixwrite=70 --ioengine=libaio --bs=16k --size=5G --numjobs=10 --runtime=60 --group_reporting --name=mytest --iodepth=16

三、安装过程(参考“TBase部署手册-V2.15.18.6.x”文档):
1、服务器环境准备
参考“2、服务器环境准备”章节的内容
2、以第一台机器作为主控机,上传到/data 目录下
解压
tar -zxf Centos7.tar.gz
3、cd /data/Centos7/tbase_mirror/pgxzm 看是否有对应的tbase_oss和tbase_pgxz文件
4、配置安装选项
vi /data/Centos7/tbase_mgr/conf/role.info
5、运行安装程序:
cd /data/Centos7/tbase_mgr/
./tbase_mgr_root.sh install
在执行过程中报如下错误:
1、“Failed to exec:ssh -p 10022 -o ConnectTimeout=10 -o ..."yum remove -y tbase_oss && yum -y install tbase_oss"...”
解决方法为:
不能使用root用户安装,需要:停止oss server进程,用tbase用户拉起oss_server进程
2、操作系统最小化安装,缺少中文语言包
解决方法:
安装yum install -y glibc-langpack-zh
判定方法:locale -a|grep zh_CN