一、准备工作

1.1、创建 zhuzz/tools目录

[root@localhost ~]# mkdir -p /home/zhuzz/tools
[root@localhost ~]# cd /home/zhuzz/tools

1.2、将cmake-2.8.8.tar.gz|mysql-5.5.32.tar 上传至 zhuzz/tools目录

[root@localhost tools]# rz -y
1.3、解压cmake安装包
[root@localhost tools]# tar xf cmake-2.8.8.tar.gz
 
1.4、安装cmake安装包
[root@localhost tools]# cd cmake-2.8.8
[root@localhost cmake-2.8.8]# ./configure
##### 报错 #####
---------------------------------------------
CMake 2.8.8, Copyright 2000-2011 Kitware, Inc.
---------------------------------------------
Error when bootstrapping CMake:
Cannot find appropriate C compiler on this system.
Please specify one using environment variable CC.
See cmake_bootstrap.log for compilers attempted. ---------------------------------------------
Log of errors: /home/zhuzz/tools/cmake-2.8.8/Bootstrap.cmk/cmake_bootstrap.log
---------------------------------------------
##### 解决方法 下载安装gcc-c++ #####
[root@localhost cmake-2.8.8]# yum install gcc-c++
[root@localhost cmake-2.8.8]# gmake
[root@localhost cmake-2.8.8]# gmake install
1.5、安装依赖包 ncurses-devel
[root@localhost cmake-2.8.8]# yum install ncurses-devel -y
 
 
二、安装
2.1、创建用户和组
[root@localhost cmake-2.8.8]# groupadd mysql
[root@localhost cmake-2.8.8]# useradd mysql -s /sbin/nologin -M -g mysql
2.2、解压 mysql-5.5.32.tar.gz 并 进入此目录
[root@localhost cmake-2.8.8]# cd ..
[root@localhost tools]# tar xf mysql-5.5.32.tar.gz
[root@localhost tools]# cd mysql-5.5.32
2.3、解压编译MySQL安装包
[root@localhost tools]# cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql-5.5.32 \
-DMYSQL_DATADIR=/usr/local/mysql-5.5.32/data \
-DMYSQL_UNIX_ADDR=/usr/local/mysql-5.5.32/tmp/mysql.sock \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DEXTRA_CHARSETS=gbk,gb2312,utf8,ascii \
-DWITH_MYISAM_STORAGE_ENGINE=1 \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_FEDERATED_STORAGE_ENGINE=1 \
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
-DWITH_READLINE=1 \
-DENABLED_LOCAL_INFILE=1 \
-DWITH_DEBUG=0 \
[root@localhost mysql-5.5.32]# make && make install
2.4、创建软链接
[root@localhost mysql-5.5.32]# ln -s /usr/local/mysql-5.5.32/  /usr/local/mysql
2.5、配置文件
[root@localhost mysql-5.5.32]# cp support-files/my-small.cnf /etc/my.cnf
 
2.6、配置环境变量
[root@localhost mysql-5.5.32]# echo 'export PATH=/usr/local/mysql/bin:$PATH' >> /etc/profile
[root@localhost mysql-5.5.32]# tail -l /etc/profile
[root@localhost mysql-5.5.32]# source /etc/profile
[root@localhost mysql-5.5.32]# echo $PATH
/usr/local/mysql/bin:/usr/lib/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
2.7、授权
[root@localhost mysql-5.5.32]# cd /usr/local/mysql
[root@localhost mysql]# chown -R mysql.mysql ./
[root@localhost mysql]# chmod -R 1777 /tmp/
三、初始化、启动
3.1、进入安装目录的mysql/scripts目录并初始化
[root@localhost mysql]# cd /usr/local/mysql/scripts/
[root@localhost scripts]# ./mysql_install_db --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/ --user=mysql
##### 看见一下则初始化OK #####
Installing MySQL system tables...
OK
Filling help tables...
OK
3.2配置文件
[root@localhost scripts]# cd /home/zhuzz/tools/mysql-5.5.32
[root@localhost mysql-5.5.32]# cp support-files/mysql.server /etc/init.d/mysqld

3.3、给mysql启动目录授权

[root@localhost mysql-5.5.32]# chmod +x /etc/init.d/mysqld

3.4、启动MySQL

[root@localhost mysql-5.5.32]# /etc/init.d/mysqld start
[root@localhost mysql-5.5.32]# mysql
mysql> quit

3.5、修改密码bin验证是否安装成功

[root@localhost mysql-5.5.32]# /usr/local/mysql//bin/mysqladmin -u root password 'root'
[root@localhost mysql-5.5.32]# chkconfig mysqld on
[root@localhost mysql-5.5.32]# chkconfig --list mysqld
mysqld 0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用 6:关闭

四、备注:

4.1、添加额外的管理员

mysql>delete from mysql.user;

mysql>grant all privileges on *.* to system@'localhost' identified by 'system' with grant option;

4.2、初始化成功显示如下

Installing MySQL system tables...
OK
Filling help tables...
OK To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands: /usr/local/mysql//bin/mysqladmin -u root password 'new-password'
/usr/local/mysql//bin/mysqladmin -u root -h localhost.localdomain password 'new-password' Alternatively you can run:
/usr/local/mysql//bin/mysql_secure_installation which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers. See the manual for more instructions. You can start the MySQL daemon with:
cd /usr/local/mysql/ ; /usr/local/mysql//bin/mysqld_safe & You can test the MySQL daemon with mysql-test-run.pl
cd /usr/local/mysql//mysql-test ; perl mysql-test-run.pl Please report any problems with the /usr/local/mysql//scripts/mysqlbug script!

VMware10.0.4下 CentOS 6.5 cmake安装 MySQL 5.5.32的更多相关文章

  1. centos 8及以上安装mysql 8.0

    本文适用于centos 8及以上安装mysql 8.0,整体耗时20分钟内,不需要FQ 1.环境先搞好 systemctl stop firewalld //关闭防火墙 systemctl disab ...

  2. cmake安装MySQL

    发现一个网址整理的挺好,请各位参考: http://www.chenyudong.com/archives/building-mysql-5-6-from-source.html#i 也可以参考我的另 ...

  3. 记录CentOS 7.4 上安装MySQL&MariaDB&Redis&Mongodb

    记录CentOS 7.4 上安装MySQL&MariaDB&Redis&Mongodb 前段时间我个人Google服务器意外不能用,并且我犯了一件很低级的错误,直接在gcp讲服 ...

  4. CentOS 6.9上安装Mysql 5.7.18 安装

    CentOS 6.9上安装Mysql 5.7.18 安装 下载地址:https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.18-linux-g ...

  5. CentOS源码编译安装MySQL 5.5.15

    CentOS源码编译安装MySQL 5.5.15   文章目录 [隐藏] 安装编译工具 下载源码 安装cmake和bison 编译安装MySQL 一些相关设置 安装编译工具 yum install g ...

  6. cmake 安装 mysql

    因为高版本mysql都用cmake安装,另外安装cluster版的mysql也必须通过cmake安装,所以学习cmake安装mysql很有必要. 今天我因为打算搭配一个mysql集群所以,在虚拟机上安 ...

  7. linux下cmake安装mysql 源码

    1.假设已经有mysql-5.6.21.tar.gz以及cmake-2.8.4.tar.gz两个源文件 (1)先安装cmake(mysql5.5以后是通过cmake来编译的) [root@ rhel5 ...

  8. 【整理】LINUX下使用CMAKE安装MYSQL

    原文地址:http://www.cppblog.com/issay789/archive/2013/01/05/196967.html 一.安装 m4 下载地址: http://files.w3pc. ...

  9. linux 下使用 cmake安装mysql

    原文地址:http://www.cppblog.com/issay789/archive/2013/01/05/196967.html 一.安装 m4 下载地址: http://files.w3pc. ...

随机推荐

  1. yarn的基本组成和工作流程

    yarn是负责资源管理的,协调各个应用程序的资源使用情况 一.基本组成 yarn主要由以下几个部分组成 1.resourcemanager 主要负责资源的调度和应用程序的管理 (1)调度器 调度器是将 ...

  2. win7(64bit)python相关环境模块搭建

    包括Python,eclipse,jdk,pydev,pip,setuptools,beautifulsoup,pyyaml,nltk,mysqldb的下载安装配置. **************** ...

  3. 第一章 JavaScript概述

    JavaScript诞生于1995年.它当时的目的是为了验证表单输入的验证.因为在JavaScript 问世之前,表单的验证都是通过服务器端验证.而当时都是电话拨号上网的年代,服务器验证数据是一件非常 ...

  4. C# 之 SqlConnection 类

    一.常用属性 [1]ConnectionString  获取或设置用于打开 SQL Server 数据库的字符串. (重写 DbConnection.ConnectionString.) [2]Con ...

  5. ExtJs 继承 和 插件 示例

    Ext.ns('Ext.ux'); function btn(){ alert(this.id); }; var panel_plugs = {//定义插件 init : function(panel ...

  6. Android之UI--重绘EditText以及实现Button的渐变色

    在本文中实现的是比较普遍的一个对EditText的重绘以及对于按钮或窗口添加渐变色. 因为EditText是继承于TextView的,所以可以实现对EditText的重绘,在重绘的时候只需要继承Edi ...

  7. famous javascript library.

    https://famo.us/ THE ULTIMATE WEB PLATFORM FOR DEVELOPERS AND DESIGNERS

  8. Oracle批量加注释,并生成html

    excel连接列名生成oracle注释 notes: A2为列名,B2为注释 ="comment on column ColAgreementHeader."&A2& ...

  9. Js 替代

    替代全部:.replace(/#/g,"/") 替代第一个:.replace("#","/")    var regS = new RegE ...

  10. Android 自学之拖动条SeekBar

    拖动条(SeekBar)和进度条非常相似,只是进度条采用颜色填充来表明进度完成的程度,而拖动条则通过滑块的位置来标识数值----而且拖动条允许用户拖动滑动块来改变值,因此拖动条通常用于对系统的某种数值 ...