VMware10.0.4下 CentOS 6.5 cmake安装 MySQL 5.5.32
一、准备工作
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
[root@localhost tools]# tar xf cmake-2.8.8.tar.gz
[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
---------------------------------------------
[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
[root@localhost cmake-2.8.8]# yum install ncurses-devel -y
[root@localhost cmake-2.8.8]# groupadd mysql
[root@localhost cmake-2.8.8]# useradd mysql -s /sbin/nologin -M -g mysql
[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
[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
[root@localhost mysql-5.5.32]# ln -s /usr/local/mysql-5.5.32/ /usr/local/mysql
[root@localhost mysql-5.5.32]# cp support-files/my-small.cnf /etc/my.cnf
[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
[root@localhost mysql-5.5.32]# cd /usr/local/mysql
[root@localhost mysql]# chown -R mysql.mysql ./
[root@localhost mysql]# chmod -R 1777 /tmp/
[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
Installing MySQL system tables...
OK
Filling help tables...
OK
[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的更多相关文章
- centos 8及以上安装mysql 8.0
本文适用于centos 8及以上安装mysql 8.0,整体耗时20分钟内,不需要FQ 1.环境先搞好 systemctl stop firewalld //关闭防火墙 systemctl disab ...
- cmake安装MySQL
发现一个网址整理的挺好,请各位参考: http://www.chenyudong.com/archives/building-mysql-5-6-from-source.html#i 也可以参考我的另 ...
- 记录CentOS 7.4 上安装MySQL&MariaDB&Redis&Mongodb
记录CentOS 7.4 上安装MySQL&MariaDB&Redis&Mongodb 前段时间我个人Google服务器意外不能用,并且我犯了一件很低级的错误,直接在gcp讲服 ...
- 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 ...
- CentOS源码编译安装MySQL 5.5.15
CentOS源码编译安装MySQL 5.5.15 文章目录 [隐藏] 安装编译工具 下载源码 安装cmake和bison 编译安装MySQL 一些相关设置 安装编译工具 yum install g ...
- cmake 安装 mysql
因为高版本mysql都用cmake安装,另外安装cluster版的mysql也必须通过cmake安装,所以学习cmake安装mysql很有必要. 今天我因为打算搭配一个mysql集群所以,在虚拟机上安 ...
- linux下cmake安装mysql 源码
1.假设已经有mysql-5.6.21.tar.gz以及cmake-2.8.4.tar.gz两个源文件 (1)先安装cmake(mysql5.5以后是通过cmake来编译的) [root@ rhel5 ...
- 【整理】LINUX下使用CMAKE安装MYSQL
原文地址:http://www.cppblog.com/issay789/archive/2013/01/05/196967.html 一.安装 m4 下载地址: http://files.w3pc. ...
- linux 下使用 cmake安装mysql
原文地址:http://www.cppblog.com/issay789/archive/2013/01/05/196967.html 一.安装 m4 下载地址: http://files.w3pc. ...
随机推荐
- XMPP——Smack[5]文件传输及离线消息的获取
三天时间,赶在最后一下午实现了文件的传输,本来需要实现离线文件的发送的,一直没想好怎么弄,找openfire的离线文件插件没找到,后来想出一种方法,起服务器时起了一个系统用户,一直在线,当用户发送离线 ...
- linux内核编译步骤
国内私募机构九鼎控股打造APP,来就送 20元现金领取地址:http://jdb.jiudingcapital.com/phone.html内部邀请码:C8E245J (不写邀请码,没有现金送)国内私 ...
- 从零开始学android开发-Json转换利器Gson之实例
Gson 是 Google 提供的用来在 Java 对象和 JSON 数据之间进行映射的 Java 类库.可以将一个 JSON 字符串转成一个 Java 对象,或者反过来. jar和源码下载地址: h ...
- 从零开始学android-一行两个按钮居中 布局
方法一: <RelativeLayout android:id="@+id/relativeTop" android:layout_width="fill_pare ...
- (DP6.1.2.1)UVA 147 Dollars(子集和问题)
/* * UVA_147.cpp * * Created on: 2013年10月12日 * Author: Administrator */ #include <iostream> #i ...
- Delphi获取目录下所有文件名
//获取一个文件夹下的所有文件 //不包括文件夹里面的文件 //ListBox1.Items:= searchfile('Z:\'); //注意,path后面要有'\'; function Sear ...
- android学习日记19--四大组件之Services(服务)
一个Android应用主要由四个基本组件组成,Android四大基本组件分别是Activity,Content Provider内容提供者,Service服务,BroadcastReceiver广播接 ...
- C#_Ajax分页MVCPager
UCJqOrderList @model PagedList<Order> <div id="dvOrders"> <table width=&quo ...
- 关于iOS自定义返回按钮右滑返回手势失效的解决:
在viewDidLoad方法里面添加下面这一句代码即可 self.navigationController.interactivePopGestureRecognizer.delegate=(id)s ...
- 深入理解计算机系统第二版习题解答CSAPP 2.12
对于下面的值,写出变量x的C语言表达式.代码应该对任何字长w≥8都能工作.我们给出当x=0x87654321以及w=32时表达式的结果,仅供参考. A.x的最低有效字节,其他位均为0.[0x00000 ...