Linux环境下mysql5.7.13安装教程
程序员文章站
2024-02-15 09:20:52
本文实例为大家分享了linux mysql5.7.13安装教程,供大家参考,具体内容如下
1、准备
cmake-3.6.0.tar.gz
bison-3....
本文实例为大家分享了linux mysql5.7.13安装教程,供大家参考,具体内容如下
1、准备
cmake-3.6.0.tar.gz
bison-3.0.4.tar.gz
mysql-5.7.13.tar.gz (http://dev.mysql.com/get/downloads/mysql-5.7/mysql-5.7.13.tar.gz)
2、安装cmake 和 bison
首先可以查看下是否安装了 cmake
# rpm -qa |grep cmake # tar zxvf cmake-3.6.0.tar.gz # cd cmake-3.6.0 # ./bootstrap # make && make install # tar zxvf bison-3.0.4.tar.gz # cd bison-3.0.4 # ./configure # make && make install
3、安装mysql
[root@localhost src]# tar -zxvf mysql-5.7.13.tar.gz [root@localhost src]# cd mysql-5.7.13 [root@localhost mysql-5.7.13]# cmake -dcmake_install_prefix=/usr/local/mysql -dmysql_unix_addr=/usr/local/mysql/mysql.sock -ddefault_charset=gbk -ddefault_collation=gbk_chinese_ci -dwith_innobase_storage_engine=1 -dwith_archive_storage_engine=1 -dwith_blackhole_storage_engine=1 -dmysql_datadir=/data/mysqldb -dmysql_tcp_port=3306 -denable_downloads=1 ... cmake error at cmake/boost.cmake:81 (message): you can download it with -ddownload_boost=1 -dwith_boost=<directory> this cmake script will look for boost in <directory>. if it is not there, it will download and unpack it (in that directory) for you. if you are inside a firewall, you may need to use an http proxy: export http_proxy=http://example.com:80 call stack (most recent call first): cmake/boost.cmake:238 (could_not_find_boost) cmakelists.txt:451 (include) -- configuring incomplete, errors occurred!
注:重新运行配置,需要删除cmakecache.txt文件
解决:
(1)在预编译时添加相应的选项:cmake -ddownload_boost=1 -dwith_boost=/usr/local/boost
(2)或者下载一个boost包,放到/usr/local/boost目录下,然后在cmake后面加选项-dwith_boost=/usr/local/boost
[root@localhost mysql-5.7.13]# cmake -dcmake_install_prefix=/usr/local/mysql -dmysql_unix_addr=/usr/local/mysql/mysql.sock -ddefault_charset=gbk -ddefault_collation=gbk_chinese_ci -dwith_innobase_storage_engine=1 -dwith_archive_storage_engine=1 -dwith_blackhole_storage_engine=1 -dmysql_datadir=/data/mysqldb -dmysql_tcp_port=3306 -denable_downloads=1 -ddownload_boost=1 -dwith_boost=/usr/local/boost .... cmake error at cmake/readline.cmake:64 (message): curses library not found. please install appropriate package, remove cmakecache.txt and rerun cmake.on debian/ubuntu, package name is libncurses5-dev, on redhat and derivates it is ncurses-devel. call stack (most recent call first): cmake/readline.cmake:107 (find_curses) cmake/readline.cmake:181 (mysql_use_bundled_editline) cmakelists.txt:479 (mysql_check_editline) -- configuring incomplete, errors occurred! see also "/usr/local/src/mysql-5.7.13/cmakefiles/cmakeoutput.log". see also "/usr/local/src/mysql-5.7.13/cmakefiles/cmakeerror.log".
解决:
(1)安装ncurses-devel
yum -y install ncurses-devel
(2)删除cmakecache.txt
rm cmakecache.txt
(3)重新cmake
复制代码 代码如下:
[root@localhost mysql-5.7.13]# cmake -dcmake_install_prefix=/usr/local/mysql -dmysql_unix_addr=mysql.mysql -ddefault_charset=gbk -ddefault_collation=gbk_chinese_ci -dwith_innobase_storage_engine=1 -dwith_archive_storage_engine=1 -dwith_blackhole_storage_engine=1 -dmysql_datadir=/data/mysqldb -dmysql_tcp_port=3306 -denable_downloads=1 -ddownload_boost=1 -dwith_boost=/usr/local/boost
复制代码 代码如下:
[root@localhost mysql-5.7.13]# make[root@localhost mysql-5.7.13]# make install
精彩专题分享:mysql不同版本安装教程 mysql5.7各版本安装教程
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。
上一篇: 高效C#编码优化原则
推荐阅读
-
Linux环境下mysql5.7.13安装教程
-
mysql5.7.13 环境搭建教程(解压缩版)
-
Win10下Python环境搭建与配置教程
-
PHP在Linux下连接MSSQLServer的配置方法简述(二、FreeTDS库)_PHP教程
-
win7 php环境搭建教程:win7下php环境搭建步骤详解_PHP教程
-
如何在Windows中phpnow1.5.6搭建的环境下安装ffmpeg
-
linux下安装EXIF库 博客分类: LinuxEXIF exif
-
win7下MySql 5.7安装配置方法图文教程
-
小白教程! Linux服务器上JDK安装配置方法
-
Ubuntu下mysql安装和操作图文教程