red hat enterprise linux 5.4 下安装mysql5.6.10

本文涉及的产品
云数据库 RDS MySQL Serverless,0.5-2RCU 50GB
云数据库 RDS MySQL Serverless,价值2615元额度,1个月
简介:


完成上一次留下的话题,今天谈谈在red hat enterprise 5.4 下安装mysql 5.6.10

 

1:下载mysql

下载地址为:http://www.mysql.com/downloads/mysql/5.6.html#downloads

选择“Source Code”->”Generic Linux (Architecture Independent), Compressed TAR Archive”

 

当然还需要一个工具cmake(因为这个mysql的安装没法使用make来安装,而且安装说明自带的安装方法也是错误的),下载地址我附上了http://www.cmake.org/cmake/resources/software.html

mysqlcmake的源码文件解压到/usr/local/src文件夹下

tar -zxvf mysql-5.6.10.tar.gz -C /usr/local/src/

tar –zxvf cmake-2.8.10.2.tar.gz –C /usr/local/src

切换到cmake目录下

cd /usr/local/src/cmake-2.8.10.2/

按照安装说明分别执行:

./ bootstrap

make

make install

之后使用which cmake查询cmake是否安装成功

之后就进行mysql的安装了,先切换到mysql的源码解压目录

cd /usr/local/src/mysql-5.6.10/

然后执行cmake .

在执行make && make install

执行过程相当的长啊。。。。。。。。

先添加mysql用户吧

 groupadd mysql
 useradd -r -g mysql mysql

mysql会自动安装到/usr/local/mysql目录下,然后我们将用户和用户组修改一下

chown -R mysql.mysql /usr/local/mysql

切换到脚本目录下

cd /usr/local/mysql/scripts

执行后续脚本

./mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data

之后要将相应的配置文件(放在/usr/local/mysql/support-filescp/etc目录下

cd /usr/local/mysql/support-files

cp mysql.server /etc/rc.d/init.d/mysql 为了能使用service命令控制

cp my-default.cnf /etc/my.cnf

之后修改mysql的开机启动级别

chkconfig --add mysql

chkconfig --level 35 mysql on

启动mysql

service mysql start

使用mysql

/usr/local/mysql/bin/mysql

查看状态

 

 

到此为止就完成安装了,希望你能成功啊亲




本文转自 chenming421  51CTO博客,原文链接:http://blog.51cto.com/wnqcmq/1161014

相关实践学习
基于CentOS快速搭建LAMP环境
本教程介绍如何搭建LAMP环境,其中LAMP分别代表Linux、Apache、MySQL和PHP。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
相关文章
|
16小时前
|
存储 Linux
Redhat Enterprise Linux磁带机简单操作
Redhat Enterprise Linux磁带机简单操作
|
2天前
|
关系型数据库 MySQL Linux
在Linux系统上实现高效安装与部署环境的全方位指南
在Linux系统上实现高效安装与部署环境的全方位指南
|
2天前
|
NoSQL Linux Redis
Redis的介绍,以及Redis的安装(本机windows版,虚拟机Linux版)和Redis常用命令的介绍
Redis的介绍,以及Redis的安装(本机windows版,虚拟机Linux版)和Redis常用命令的介绍
14 0
|
2天前
|
Ubuntu 安全 Linux
linux系统详细安装过程,都在这里了
linux系统详细安装过程,都在这里了
10 0
|
2天前
|
JSON Linux 数据格式
在宝塔Linux中安装Docker
在宝塔Linux中安装Docker
|
2天前
|
运维 监控 安全
2023年最详细的:本地Linux服务器安装宝塔面板,并内网穿透实现公网远程登录
2023年最详细的:本地Linux服务器安装宝塔面板,并内网穿透实现公网远程登录
|
3天前
|
安全 Linux Python
Volatility3内存取证工具安装及入门在Linux下的安装教程
Volatility3内存取证工具安装及入门在Linux下的安装教程
Volatility3内存取证工具安装及入门在Linux下的安装教程
|
2月前
|
安全 Linux 网络安全
如何在 VM 虚拟机中安装 Red Hat Enterprise Linux 9.3 操作系统保姆级教程(附链接)
如何在 VM 虚拟机中安装 Red Hat Enterprise Linux 9.3 操作系统保姆级教程(附链接)
|
7月前
|
网络协议 关系型数据库 MySQL
Red Hat enterprise linux 5 -mysql安装步骤
Red Hat enterprise linux 5 -mysql安装步骤
|
Linux
Why does my Red Hat Enterprise Linux (RHEL) system swap despite of having free RAM?
Why does my Red Hat Enterprise Linux (RHEL) system swap despite of having free RAM? Swapping in a linux system happens under two conditions. 1) Anonymous mapped memory. 2) Oversized workload abusing memory overcommit. In our problem, only point 1 is valid. So, we will discuss that here.
68 0