MySQL5.6forREHL6.4编译安装-创新互联
MySQL安装方式有多种,可以使用rpm包二进制安装,也可以使用源码进行编译安装。很显然,编译安装的好处很多,就是能够对将要使用的MySQL数据库进行定制,
站在用户的角度思考问题,与客户深入沟通,找到福安网站设计与福安网站推广的解决方案,凭借多年的经验,让设计与互联网技术结合,创造个性化、用户体验好的作品,建站类型包括:网站设计制作、成都网站建设、企业官网、英文网站、手机端网站、网站推广、域名注册、网站空间、企业邮箱。业务覆盖福安地区。对于特定的操作系统、特定的应用、特定的MySQL功能要求很适合。因此,这里记录一次MySQL 5.6 for REHL 6.4编译安装过程。
1、操作系统信息检查并卸载操作系统自带的过低版本Mysql
[root@arbiter ~]# uname -a
Linux arbiter 2.6.32-358.el6.x86_64 #1 SMP Tue Jan 29 11:47:41 EST 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@arbiter ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.4 (Santiago)
[root@arbiter ~]#
[root@arbiter ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
#::1 localhost6.localdomain6 localhost6
192.168.144.111 arbiter
[root@arbiter ~]#
[root@arbiter cmake-2.8.10.2]# rpm -qa|grep mysql
mysql-libs-5.1.66-2.el6_3.x86_64
[root@arbiter cmake-2.8.10.2]# rpm -e --nodeps mysql-libs
[root@arbiter cmake-2.8.10.2]# rpm -qa|grep mysql
[root@arbiter cmake-2.8.10.2]#
2、检查MySQL编译安装必须的操作系统依赖包
rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' make \
gcc-c++ \
libstdc++-devel \
ncurses-devel
[root@arbiter ~]# rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' make \
> gcc-c++ \
> libstdc++-devel \
> ncurses-devel
make-3.81-20.el6 (x86_64)
package gcc-c++ is not installed
package libstdc++-devel is not installed
package ncurses-devel is not installed
[root@arbiter ~]#
3、安装MySQL编译安装必须的操作系统依赖包
--挂载系统镜像配置本地的yum源
[root@arbiter ~]# mount /dev/cdrom /mnt
mount: block device /dev/sr0 is write-protected, mounting read-only
[root@arbiter yum.repos.d]# cat local.repo
[local]
name = local
baseurl=file:///mnt/
enabled = 1
gpgcheck = 0
gpgkey =file://mnt/RPM-GPG-KEY-CentOS-6
[root@arbiter yum.repos.d]#
[root@arbiter yum.repos.d]# yum clean all
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Cleaning repos: InstallMedia base extras local updates
Cleaning up Everything
[root@arbiter yum.repos.d]#
--使用yum安装操作系统缺少的rpm包
yum -y install gcc-c++
ncurses-devel ncurses-devel
4、上传、解压并安装cmake
[root@arbiter ~]# ls
anaconda-ks.cfg cmake-2.8.10.2.tar Documents install.log Music pkg rpms test
Desktop Downloads install.log.syslog Pictures Public Templates Videos
[root@arbiter ~]# tar -xvf cmake-2.8.10.2.tar
--安装cmake
[root@arbiter cmake-2.8.10.2]# pwd/root/cmake-2.8.10.2
[root@arbiter cmake-2.8.10.2]# ./configure
本文题目:MySQL5.6forREHL6.4编译安装-创新互联
浏览路径:http://ybzwz.com/article/dpjhhi.html