linux 64位centos下源码安装mysql服务教程

1.下载mysql源码包

打开地址https://dev.mysql.com/downloads/mysql/,选择下载MySQL Community Server源码包

分别选择Source Code和Generic Linux (Architecture Independent)选项,最后选择Compressed TAR Archive得到下载地址https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.21.tar.gz

linux 64位centos下源码安装mysql服务教程

2.下载boost_1_66_0源码(https://dev.mysql.com/doc/refman/5.7/en/installing-source-distribution.html)

shell>mkdir /www/boost/

shell>wget "https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.gz"

shell>tar zxvf boost_1_66_0.tar.gz

2.linux下源码安装

shell> groupadd mysql
shell> useradd -r -g mysql -s /bin/false mysql
shell> useradd -r -g mysql -s /bin/false mysql
shell> tar zxvf mysql-5.7.21.tar.gz
shell> cd  mysql-5.7.21
shell> mkdir bld
shell> cd bld shell> cmake  --WITH_BOOST /www/soft/boost/boost_1_66_0 ..

shell> make

linux 64位centos下源码安装mysql服务教程

编译很慢,取决于服务器的性能,4个cpu,编译1个小时左右
shell> make install

linux 64位centos下源码安装mysql服务教程

shell> cd /usr/local/mysql
shell> mkdir mysql-files
shell> chown mysql:mysql mysql-files
shell> chmod 750 mysql-files
shell> bin/mysqld--no-defaults--initialize --user=mysql --basedir=/usr/local/mysql --datadir=/www/mysql/data
shell> bin/mysql_ssl_rsa_setup              
shell> bin/mysqld_safe --defaults-file=my.cnf &

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值