欢迎来到天天文库
浏览记录
ID:8822215
大小:68.50 KB
页数:6页
时间:2018-04-08
《使用cmake编译安装mysql5.5.21数据库》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、使用cmake编译安装mysql数据库首先准备cmake包cmake-2.8.10.2.tar.gz和mysql包mysql-5.5.21.tar.gz,可以分别从以下链接下载得到cmake包:http://www.cmake.org/cmake/resources/software.htmysql包:http://downloads.mysql.com/archives.php一、首先安装cmake组件[root@centosupload]#tar-zxvfcmake-2.8.10.2.tar.gz[root@c
2、entosupload]#cdcmake-2.8.10.2[root@centoscmake-2.8.10.2]#./configure运行./configure,如果此时报以下错误ErrorwhenbootstrappingCMake:CannotfindappropriateCcompileronthissystem.PleasespecifyoneusingenvironmentvariableCC.Seecmake_bootstrap.logforcompilersattempted.则是因为未安装开发工具
3、所致,此时可以直接配置yum库,安装Developmenttools[root@centos~]#yum-ygroupinstall'Developmenttools'再次运行./configure[root@centoscmake-2.8.10.2]#./configure[root@centoscmake-2.8.10.2]#make&&makeinstall[root@centoscmake-2.8.10.2]#whichcmake/usr/local/bin/cmake安装成功!二、安装mysql软件1、首
4、先检查系统中是否有默认的mysqlrpm-qa
5、grepmysql*如果有,则先将其卸载rpm-e命令卸载2以root身份创建mysql组,以及mysql用户[root@centos~]#groupaddmysql[root@centos~]#useradd-gmysqlmysql[root@centos~]#passwdmysql3安装mysql-5.5.21软件解压[root@centosmysql55]#tar-zxvfmysql-5.5.21.tar.gz配置安装[root@centosmysql55]#c
6、dmysql-5.5.21[root@centosmysql-5.5.21]#cmake.>-DCMAKE_INSTALL_PREFIX=/u01/mysql55>-DSYSCONFDIR=/u01/data>-DMYSQL_DATADIR=/u01/data>-DMYSQL_UNIX_ADDR=/u01/tmp/mysqld.sock>-DWITH_INNOBASE_STORAGE_ENGINE=1>-DWITH_PARTITION_STORAGE_ENGINE=1>-DWITH_ARCHIVE_S
7、TORAGE_ENGINE=1>-DWITH_BLACKHOLE_STORAGE_ENGINE=1>-DWITH_FEDERATED_STORAGE_ENGINE=1>-DWITH_PERFSCHEMA_STORAGE_ENGINE=1>-DENABLED_LOCAL_INFILE=1>-DMYSQL_TCP_PORT=33061>-DWITH_EXTRA_CHARSETS=all>-DWITH_DEBUG=0>-DENABLE_DEBUG_SYNC=0>-DWITH_SSL=bundled>-
8、DWITH_ZLIB=system>-DWITH_READLINE=1>-DZLIB_INCLUDE_DIR=/u01/mysql55>-DWITH_READLINE=1此时出现报错:CMakeErroratcmake/readline.cmake:83(MESSAGE):Curseslibrarynotfound.Pleaseinstallappropriatepackage,removeCMakeCache.txtandreruncmake.OnDebian/Ubuntu,packagenameislib
9、ncurses5-dev,onRedhatandderivatesitisncurses-devel.CallStack(mostrecentcallfirst):cmake/readline.cmake:118(FIND_CURSES)cmake/readline.cmake:214(MYSQL_USE_BUNDLED_READLINE)CMakeList
此文档下载收益归作者所有