码迷,mamicode.com
首页 > 数据库 > 详细

contos7安装mysql-5.7.28源代码

时间:2020-04-21 14:54:59      阅读:113      评论:0      收藏:0      [点我收藏+]

标签:set   没有   rom   dir   init   自己   bootstra   href   bin   

contos7安装mysql-5.7.28源代码

首先查看支持的版本:https://www.mysql.com/support/supportedplatforms/database.html

 

(mysql-5.7.28.tar.gz)
(mysql-boost-5.7.28.tar.gz)
第一种没有boost,需要自己安装。 mysql5.7之后boost-1.19是必须的。

二.安装之前的准备

2.1.卸载自带的mysql

rpm -qa | grep mysql
有的话卸载
rpm -e --nodepes ...

检测系统是否自带mariadb
rpm -qa | grep mariadb

2.2.cmake

which is used as the build framework on all platforms. CMake can be downloaded from http://www.cmake.org.

2.3.安装boost

tar zxvf boost_1_59_0.tar.gz
cd boost_1_59_0
./bootstrap.sh --prefix=/usr/local/boost
./b2 install
打开/etc/profile,添加以下内容:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/boost/lib
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/boost/lib
export C_INCLUDE_PATH=$C_INCLUDE_PATH:/usr/local/boost/include
export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/usr/local/boost/include

source /etc/profile

 

# Preconfiguration setup
shell> groupadd mysql
shell> useradd -r -g mysql -s /bin/false mysql
# Beginning of source-build specific instructions
shell> tar zxvf mysql-VERSION.tar.gz
shell> cd mysql-VERSION
shell> mkdir bld
shell> cd bld
shell> cmake ..
shell> make
shell> make install
# End of source-build specific instructions
# Postinstallation setup
shell> cd /usr/local/mysql
shell> mkdir mysql-files
shell> chown mysql:mysql mysql-files
shell> chmod 750 mysql-files
shell> bin/mysqld --initialize --user=mysql
shell> bin/mysql_ssl_rsa_setup
shell> bin/mysqld_safe --user=mysql &
# Next command is optional
shell> cp support-files/mysql.server /etc/init.d/mysql.server

 chkconfig --add mysql

 

mysqladmin variables

mysqladmin -h host_name variables

contos7安装mysql-5.7.28源代码

标签:set   没有   rom   dir   init   自己   bootstra   href   bin   

原文地址:https://www.cnblogs.com/liang-ning/p/12743458.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!