准备安装环境

--网络设置

vi /etc/hostname
node1
nmcli connection modify enp0s3 ipv4.addresses 192.168.56.84/24 ipv4.gateway 192.168.56.1 ipv4.method manual connection.autoconnect yes

vi /etc/hosts
192.168.56.84  node1

--关闭防火墙
--禁止firewall开机启动
--确认防火墙为not running状态

systemctl stop firewalld.service
systemctl disable firewalld.service
firewall-cmd --state
not running

--关闭selinux

vi /etc/selinux/config
SELINUX=disabled

--关闭透明大页

vi /etc/rc.d/rc.local
--增加下列内容:
if test -f /sys/kernel/mm/transparent_hugepage/enabled; then
echo never > /sys/kernel/mm/transparent_hugepage/enabled
fi
if test -f /sys/kernel/mm/transparent_hugepage/defrag; then
echo never > /sys/kernel/mm/transparent_hugepage/defrag
fi

--执行以下命令:

chmod +x /etc/rc.d/rc.local
source /etc/rc.d/rc.local
cat /sys/kernel/mm/transparent_hugepage/enabled
cat /sys/kernel/mm/transparent_hugepage/defrag

always madvise [never] <<--- THP Disabled
always defer defer+madvise madvise [never]

--创建mysql 组及用户

groupadd mysql
useradd -g mysql mysql
echo "mysql" | passwd --stdin mysql

--重启服务器

reboot

你可能感兴趣的