CentOS 6.4 cmake安装mysql-5.5.X
2014-04-29 16:30
477 查看
linux 环境:CentOS release 6.4 (Final)2.6.32-358.el6.x86_64cmake 版本:cmake-2.8.3mysql版本:mysql-5.5.32注:以下操作的安装包默认都下载到了/application/tools下安装cmake
[root@mysql support-files]# /application/mysql/bin/mysqlWelcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 1Server version: 5.5.32-log Source distribution Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> #cmake -LH错误:-- Running cmake version 2.8.3-- MySQL 5.5.32-- Packaging as: mysql-5.5.32-Linux-x86_64-- Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH) CMake Error at cmake/readlineNaNake:83 (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/readlineNaNake:127 (FIND_CURSES) cmake/readlineNaNake:217 (MYSQL_USE_BUNDLED_LIBEDIT) CMakeLists.txt:269 (MYSQL_CHECK_READLINE) -- Configuring incomplete, errors occurred! 解决方法:yum -y install ncurses-devel安装完ncurses-devel 包后在mysql解压包下操作:make cleanrm -f CMakeCache.txtcmake . -LH
tar zxf cmake-2.8.3.tar.gz cd cmake-2.8.3 ./configure make && make install cd ..安装mysql####创建数据目录(mysql5.5默认已经没有data目录了)####mkdir /application/mysql-5.5.32/data -p####创建mysql用户和组####groupadd mysqluseradd -g mysql mysql -s /sbin/nologin -M####编译安装####
tar zxf mysql-5.5.32.tar.gz cd mysql-5.5.32 cmake . \ -DCMAKE_BUILD_TYPE:STRING=Release \ -DCMAKE_INSTALL_PREFIX:PATH=/application/mysql-5.5.32 \ -DCOMMUNITY_BUILD:BOOL=ON \ -DENABLED_PROFILING:BOOL=ON \ -DENABLE_DEBUG_SYNC:BOOL=OFF \ -DINSTALL_LAYOUT:STRING=STANDALONE \ -DMYSQL_DATADIR:PATH=/application/mysql-5.5.32/data \ -DMYSQL_MAINTAINER_MODE:BOOL=OFF \ -DWITH_EMBEDDED_SERVER:BOOL=ON \ -DWITH_EXTRA_CHARSETS:STRING=all \ -DWITH_SSL:STRING=bundled \ -DWITH_UNIT_TESTS:BOOL=OFF \ -DWITH_ZLIB:STRING=bundled \ -LH make make install#注:cmake参数参考地址:http://www.blogjava.net/kelly859/archive/2012/09/04/387005.html####创建软链接,更改属主####ln -s /application/mysql-5.5.32/ /application/mysqlchown -R mysql /application/mysql ####mysql初始化####/application/mysql/scripts/mysql_install_db --basedir=/application/mysql --datadir=/application/mysql/data --user=mysql####拷贝mysql配置文件####cp /application/tools/mysql-5.5.32/support-files/my-medium.cnf /etc/my.cnf####拷贝启动脚本,并更改其700权限####cp /application/tools/mysql-5.5.32/support-files/mysql.server /etc/init.d/mysqldchmod 700 /etc/init.d/mysqld ####启动mysql####/etc/init.d/mysqld start####检查mysql是否启动####[root@mysql support-files]# lsof -i :3306COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAMEmysqld 27792 mysql 11u IPv4 88514 0t0 TCP *:mysql (LISTEN)[root@mysql support-files]# netstat -lnput |grep mysqltcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 27792/mysqld ####登录mysql####
[root@mysql support-files]# /application/mysql/bin/mysqlWelcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 1Server version: 5.5.32-log Source distribution Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> #cmake -LH错误:-- Running cmake version 2.8.3-- MySQL 5.5.32-- Packaging as: mysql-5.5.32-Linux-x86_64-- Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH) CMake Error at cmake/readlineNaNake:83 (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/readlineNaNake:127 (FIND_CURSES) cmake/readlineNaNake:217 (MYSQL_USE_BUNDLED_LIBEDIT) CMakeLists.txt:269 (MYSQL_CHECK_READLINE) -- Configuring incomplete, errors occurred! 解决方法:yum -y install ncurses-devel安装完ncurses-devel 包后在mysql解压包下操作:make cleanrm -f CMakeCache.txtcmake . -LH
相关文章推荐
- Centos6.4 用rpm方式安装MySql5.6
- CentOS 6.4安装配置LAMP服务器(Apache+PHP5+MySQL)
- 在CentOS6.4上,安装MySQL5.6.14
- 安装在CloudStack时CentOS6.4中安装MySQL通过mysql_secure_installation方式修改密码
- Centos6.4 YUM安装Mysql【整理】
- LNMP 最新版本+YUM方式安装指南(CentOS5.5 + Nginx 1.0.x + MySQL 5.5.x + PHP 5.3.x)
- Linux(Centos 6.4) 下Mysql 安装
- CentOS 6.4 优化编译安装MySQL-5.6
- Linux下MySQL、Apache、PHP源码安装全程实录(CentOS 6.4)
- CentOS 6.4安装Apache+MySQL+PHP的图文教程
- CentOS 6.4  安装mysql 5.5 rpm 的libaio问题的解决
- CentOS6.4安装Apache+MySQL+PHP图文教程
- CentOS 6.4 安装配置LNMP服务器(Nginx+PHP+MySQL) 及搭建Wordpress
- Centos-6.4 安装mysql-5.5.14
- CentOS 6.4安装配置LNMP服务器(Nginx+PHP+MySQL)
- linux下(CentOS6.4)mysql安装
- centos6.4安装mysql5.6.11启动错误
- CentOS 6.4安装配置LAMP服务器(Apache+PHP5+MySQL)
- 为什么在centos6.4上用yum装完mysql,没有找到sql-bench,是不是默认不安装,怎么安装
- CentOS 6.4 yum安装配置LAMP服务器(Apache+PHP5+MySQL)