共计 930 个字符,预计需要花费 3 分钟才能阅读完成。
– 网络设置
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
正文完