@zhangyy
2021-06-01T10:49:28.000000Z
字数 2577
阅读 319
tidb
cat /etc/hostsecho "192.168.1.80 node01.flyfish.cn">> /etc/hostsecho "192.168.1.81 node02.flyfish.cn">> /etc/hostsecho "192.168.1.82 node03.flyfish.cn">> /etc/hostsecho "192.168.1.83 node04.flyfish.cn">> /etc/hostsecho "192.168.1.84 node05.flyfish.cn">> /etc/hostsecho "192.168.1.85 node06.flyfish.cn">> /etc/hostsecho "192.168.1.86 node07.flyfish.cn">> /etc/hostsecho "192.168.1.87 node08.flyfish.cn">> /etc/hostsecho "192.168.1.88 node09.flyfish.cn">> /etc/hostsecho "192.168.1.89 node10.flyfish.cn">> /etc/hostsecho "192.168.1.90 node11.flyfish.cn">> /etc/hostsecho "192.168.1.91 node12.flyfish.cn">> /etc/hostsecho "192.168.1.92 node13.flyfish.cn">> /etc/hostsecho "192.168.1.93 node14.flyfish.cn">> /etc/hostsecho "export LANG=en_US.UTF8" >> ~/.bash_profilecat ~/.bash_profileyum install lvm2 -ypvcreate /dev/sdbvgcreate tidbvg /dev/sdblvcreate -n tidblv -L 200000M tidbvgmkfs.ext4 /dev/tidbvg/tidblvvi /etc/fstab/dev/sda1 / ext4 defaults 0 0/dev/sda2 swap swap defaults 0 0/dev/tidbvg/tidblv /tidb ext4 defaults,nodelalloc,noatime 0 0mkdir /tidbmount /tidbmkdir /tidb/softgroupadd -g 60001 tidbuseradd -u 61001 -g tidb tidbchown -R tidb:tidb /tidbchmod -R 775 /tidbecho "tidb" | passwd --stdin tidbsystemctl set-default multi-user.targetcat >> /etc/security/limits.conf << EOFroot soft nofile 1048576root hard nofile 1048576tidb soft nproc 1048576tidb hard nproc 1048576tidb soft nofile 1048576tidb hard nofile 1048576tidb soft stack 10240tidb hard stack 32768tidb hard memlock unlimitedtidb soft memlock unlimitedEOFcat >> /etc/sysctl.conf << EOFfs.aio-max-nr = 1048576fs.file-max = 6815744net.ipv4.ip_local_port_range = 1024 65535net.ipv4.tcp_mem = 786432 2097152 3145728net.ipv4.tcp_rmem = 4096 4096 16777216net.ipv4.tcp_wmem = 4096 4096 16777216vm.swappiness=1vm.min_free_kbytes=204800000vm.overcommit_memory=0EOFsysctl -pln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtimehwclockecho "SELINUX=disabled" > /etc/selinux/configecho "#SELINUXTYPE=targeted " >> /etc/selinux/configcat /etc/selinux/configsetenforce 0systemctl stop firewalld.servicesystemctl disable firewalld.serviceumount /mntmount /dev/cdrom /mntcd /etc/yum.repos.dmkdir bkmv *.repo bk/echo "[EL7-1]" > /etc/yum.repos.d/itpux.repoecho "name =Linux-7" >> /etc/yum.repos.d/itpux.repoecho "baseurl=file:///mnt" >> /etc/yum.repos.d/itpux.repoecho "gpgcheck=0" >> /etc/yum.repos.d/itpux.repoecho "enabled=1" >> /etc/yum.repos.d/itpux.repoyum install -y ntpecho "server 127.127.1.0 iburst" >> /etc/ntp.confsystemctl restart ntpdsystemctl enable ntpdntpq -pntpstatroot:echo "server 192.168.1.80">> /etc/ntp.confecho "restrict 192.168.1.80 nomodify notrap noquery" >> /etc/ntp.confntpdate -u 192.168.1.80hwclock -wsystemctl restart ntpdsystemctl enable ntpdntpq -p
