linux下编译安装mysql 博客分类: linux
程序员文章站
2024-03-24 13:33:28
...
准备工作:
1.虚拟机上运行的centos6.6操作系统
2.网络能连接外网
安装步骤:
1.检测系统是否安装mysql
[root@localhost mysql-5.6.12]# rpm -qa|grep mysql mysql-libs-5.1.73-3.el6_5.x86_64
或
[root@localhost mysql-5.6.12]# rpm -qa | grep -i libs | grep -i mysql mysql-libs-5.1.73-3.el6_5.x86_64
2.发现系统预安装的mysql-libs包,那么卸载它,扫清障碍
[root@localhost mysql-5.6.12]# rpm -e mysql-libs error: Failed dependencies: libmysqlclient.so.16()(64bit) is needed by (installed) postfix-2:2.6.6-6.el6_5.x86_64 libmysqlclient.so.16(libmysqlclient_16)(64bit) is needed by (installed) postfix-2:2.6.6-6.el6_5.x86_64 mysql-libs is needed by (installed) postfix-2:2.6.6-6.el6_5.x86_64
发生错误,提示需要postfix,所以有了
[root@localhost mysql-5.6.12]# rpm -e --nodeps mysql-libs-5.1.73-3.el6_5.x86_64 [root@localhost mysql-5.6.12]# rpm -qa | grep -i libs | grep -i mysql [root@localhost mysql-5.6.12]#
清除干净了。
3.先安装,编译需要的包、工具
yum -y install make gcc-c++ cmake bison-devel ncurses-devel
4.cmake
cmake \ -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \ -DMYSQL_DATADIR=/usr/local/mysql/data \ -DSYSCONFDIR=/etc \ -DWITH_MYISAM_STORAGE_ENGINE=1 \ -DWITH_INNOBASE_STORAGE_ENGINE=1 \ -DWITH_MEMORY_STORAGE_ENGINE=1 \ -DWITH_READLINE=1 \ -DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock \ -DMYSQL_TCP_PORT=3306 \ -DENABLED_LOCAL_INFILE=1 \ -DWITH_PARTITION_STORAGE_ENGINE=1 \ -DEXTRA_CHARSETS=all \ -DDEFAULT_CHARSET=utf8 \ -DDEFAULT_COLLATION=utf8_general_ci
cmake结果:
-- If you are inside a firewall, you may need to use an http proxy: export http_proxy=http://foo.bar.com:80 Warning: Bison executable not found in PATH -- Library mysqlserver depends on OSLIBS -lpthread;m;rt;crypt;dl -- Configuring done CMake Warning (dev) in sql/CMakeLists.txt: Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link interface. Run "cmake --help-policy CMP0022" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Target "mysqld" has an INTERFACE_LINK_LIBRARIES property which differs from its LINK_INTERFACE_LIBRARIES properties. INTERFACE_LINK_LIBRARIES: -lpthread;sql;binlog;rpl;master;slave;sql;mysys;mysys_ssl LINK_INTERFACE_LIBRARIES: rt This warning is for project developers. Use -Wno-dev to suppress it. -- Generating done CMake Warning: Manually-specified variables were not used by the project: WITH_MEMORY_STORAGE_ENGINE WITH_READLINE -- Build files have been written to: /usr/mingSoft/mysql-5.6.12 [root@localhost mysql-5.6.12]#
5.安装
make && make install
编译的参数可以参考http://dev.mysql.com/doc/refman/5.5/en/source-configuration-options.html
上一篇: Zepto.js之一步步看源码(一)
推荐阅读
-
linux下编译安装mysql 博客分类: linux
-
linux服务器下连接Oracle 博客分类: Oracle oracle
-
笔记本电脑Linux声音系统的安装 博客分类: Linux,linux资料 linuxwindowsDebian
-
suse linux +cognos 10+ db2 9.7 【64位】【安装布署记录】 博客分类: BI cognos liunx 布署
-
19个心得 明明白白说Linux下的负载均衡 博客分类: 网站架构 Linuxnginx应用服务器网络应用防火墙
-
解决weblogic在Linux下启动慢和创建域慢的方法 博客分类: weblogic weblogiclinux
-
rpm命令总结-rpm常用命令-rpm安装源后怎么删除-yum安装怎么降低版本 博客分类: linux_unix
-
httpsqs-1.7-Linux-安装教程和安装包 博客分类: linuxhttpsqs httpsqslinux
-
Linux下给 ATI 显卡降温 博客分类: Linux linux
-
Linux下给 ATI 显卡降温 博客分类: Linux linux