MySQL之——CentOS 7.6 下MySQL8.0.16编译安装(升级gcc+升级cmake+编译安装MySQL 8.x)

1.最小化安装系统

2.安装基础包

yum -y install ntpdate gcc gcc-c++ ncurses ncurses-devel cmake readline-devel zlib.x86_64 zlib-devel.x86_64 bison libcurl-* net-tool* tree nmap sysstat lrzsz dos2unix telnet.x86_64 nethogs iftop iotop unzip ftp.x86_
64 xfs* expect vim wget psmisc openssh-client* libaio libaio1 libnuma openssl-devel bzip2

3.基础环境配置

systemctl stop firewalld
systemctl disabled firewalld
systemctl stop postfix
systemctl disable postfix
sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config && cat /etc/selinux/config >> ${tmplog_dir}/base.log 2>&1
setenforce 0
getenforce
useradd -M -s /sbin/nologin mysql
mkdir -pv /data/{conf,dumpdir,backupsets,scripts,mysql3306/{data,tmp,logs}}

4.内核参数修改

echo "vm.swappiness=10">>/etc/sysctl.con

你可能感兴趣的:(MySQL)