虚谷数据库集群搭建手册

2019-08-07  本文已影响0人  哈哈哈范德萨

搭建yum源

分为两步,先搭建本地yum源,再搭建ftpyum源。

1.本地yum源

1:将iso文件复制到需要的目录下
2:mkdir /mnt/iso
3:mount  */*.iso  /mnt/iso
4:vi vi /etc/yum.repos.d/local.repo

内容如下:

[local]
name=local
baseurl=file:///mnt/iso
enabled=1
gpgcheck=0

然后执行命令,刷新yum源

yum clean all
yum search all
如果没有问题,则:安装vsftpd
yum install vim vsftpd -y
systemctl enable vsftpd
systemctl restart vsftpd
systemctl status vsftpd
安装后,默认ftp路径是/var/ftp/pub/
cp -r  /mnt/iso/* /var/ftp/pub

关闭防火墙和沙盒机制

systemctl disable firewalld
 vim /etc/selinux/config
改为disabled
需要重启生效
reboot
暂时session的:setenforce 0
getenforce

配之ftpyum源

mv local.repo ftp.repo
修改baseurl=ftp://$IP/pub
yum clean all
yum search all

安装相关包,修改时区

yum install gcc gdb iotop libaio net-snmp perf sysstat ntp ntpdate vim -y
java rpm包
rpm -ivh *.rpm
systemctl enable snmpd
systemctl restartt snmpd
timedatectl set-timezone Asia/Shanghai

还有ntp配置


NTP 配置

修改默认参数

vim /etc/sysctl.conf 
net.core.rmem_default = 2097152
net.core.wmem_default = 2097152
net.core.rmem_max = 8388608
net.core.wmem_max = 8388608
system -p
vim /etc/profile
ulimit -s 20480

修改网卡配置,不赘述

设置磁盘准备,自动挂载

mkfs.ext4 /dev/sdb
mkdir /mnt/sdb
mount /dev/sdb /mnt/sdb
blkid
vim /etc/fstab
UUID=09dd5e41-4577-4438-8467-620b8c8e39c2       /mnt/sdb        ext4    defaults        0 0

准备完毕
准备启动数据库
cluster.ini

#MAX_NODES=32    MASTER_GRPS=1    PROTOCOL='UDP'    MSG_PORT_NUM=1    MAX_SEND_WIN=254 
 MSG_HAVE_CRC=0    MERGE_SMALL_MSG=1    MSG_SIZE=64000    TIMEOUT=20000    RPC_WINDOW=16 
 EJE_WINDOW=16    MAX_SHAKE_TIME=1200    MY_NID=0002    CHECK_RACK=0

 NID=0001  RACK=0001  PORTS='192.168.2.204:8888'  ROLE='MSQW'  LPU=3  STORE_WEIGHT=3  STATE=DETECT;
 NID=0002  RACK=0001  PORTS='192.168.2.226:8888'  ROLE='MSQW'  LPU=3  STORE_WEIGHT=3  STATE=DETECT;

datafile.ini

/DATA/DATA1.DBF
/DATA/DATA2.DBF
/DATA1/DATA1.DBF
/DATA1/DATA2.DBF
/REDO1/REDO1.LOG

mount.ini


/XGLOG      ./XGLOG
/CATA      ./XHOME/CATA
/DATA      ./XHOME/DATA
/DATA1      /mnt/sdb/DATA1
/TEMP      ./XHOME/TEMP
/REDO      ./XHOME/REDO
/REDO1      /mnt/sdb/REDO1
/BACKUP      ./XHOME/BACKUP
/ARCH      ./XHOME/ARCH
/UNDO      ./XHOME/UNDO
/MODI      ./XHOME/XMODI
scp ./* root@$ ip:$dir
上一篇下一篇

猜你喜欢

热点阅读