热度 1||
tar二进制安装包部署
下载:https://gitee.com/GreatSQL/GreatSQL/releases/tag/GreatSQL-8.0.32-26
基于mysql安装部署文档部署既可
1.下载依赖:
yum install -y pkg-config perl libaio-devel numactl-devel numactl-libs net-tools openssl openssl-devel jemalloc jemalloc-devel perl-Data-Dumper perl-Digest-MD5 python2 perl-JSON perl-Test-Simple
yum源配置: 此处配置的时华为云的yum源
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.huaweicloud.com/repository/conf/CentOS-7-anon.repo
yum clean all清除原有 yum 缓存
执行yum makecache(刷新缓存)或者yum repolist all(查看所有配置可以使用的文件,会自动刷新缓存)。
2.关闭防火墙和selinux
#关闭防火墙
systemctl disable --now firewalld
systemctl status firewalld
#关闭selinux
setenforce 0
vim /etc/selinux/config
SELINUX=disabled
3.上传并解压压缩包
mkdir -pv /apps/softwares/
cd /apps/softwares/
tar xf GreatSQL-8.0.32-26-Linux-glibc2.17-x86_64.tar.xz -C /apps/
mv GreatSQL-8.0.32-26-Linux-glibc2.17-x86_64 GreatSQL-8.0.32-26
4.编辑配置文件my.cnf
[mysql@mysql01 greatsql]$ cat mysql3306.cnf
[mysql]
port=3306
socket=/apps/greatsql/mysql_3306.sock
[mysqld]
port=3306
user=mysql
datadir=/apps/greatsql/data
basedir=/apps/GreatSQL-8.0.32-26
socket=/apps/greatsql/mysql_3306.sock
log-error=/apps/greatsql/logs/mysqld.log
pid-file=/apps/greatsql/data/mysqld.pid
lower_case_table_names=1
5.创建相关目录和用户
useradd mysql
mkdir -p /apps/greatesql/{data,logs}
chown -R mysql.mysql /apps/greatsql/
6.安装启动:
初始化:
/apps/GreatSQL-8.0.32-26/bin/mysqld --defaults-file=/apps/greatsql/mysql3306.cnf --basedir=/apps/GreatSQL-8.0.32-26/ --datadir=/apps/greatsql/data/ --initialize-insecure --lower_case_table_names=1
启动:
/apps/GreatSQL-8.0.32-26/bin/mysqld_safe --defaults-file=/apps/greatsql/mysql3306.cnf &
连接:
/apps/GreatSQL-8.0.32-26/bin/mysql -uroot -p -S /apps/greatsql/mysql_3306.sock
7.启动后由于root密码为空密码,需要更改
alter user root@'localhost' identified by 'greatsql';
flush privileges;
DB架构师:曾凡坤: 请问下下载多少MB ? 是带-G3调试信息的呢? 还是-O3优化后的?
另外你这个如何设置SYSTEMD 呢?
老崔: 二进制包200M,基于linux的,没有设置systemd
详细的看https://gitee.com/GreatSQL/GreatSQL/releases/tag/GreatSQL-8.0.32-26
合作电话:010-64087828
社区邮箱:greatsql@greatdb.com