mysql 5.5.32 源码 cmake 编译 安装
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql 5.5.32 源码 cmake 编译 安装相关的知识,希望对你有一定的参考价值。
- cmake工具安装
yum install cmake -y
依赖包 yum install ncurses-devel -y - 开始安装mysql
创建用户和组
groupadd mysql
useradd mysql -s /sbin/nologin -M -g mysql -
tar zxf mysql-5.5.32.tar.gz
cd mysql-5.5.32
cmake . -DCMAKE_INSTALL_PREFIX=/application/mysql-5.5.32 \
-DMYSQL_DATADIR=/application/mysql-5.5.32/data \
-DMYSQL_UNIX_ADDR=/application/mysql-5.5.32/tmp/mysql.sock \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DEXTRA_CHARSETS=gbk,gb2312,utf8,ascii \
-DENABLED_LOCAL_INFILE=ON \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_FEDERATED_STORAGE_ENGINE=1 \
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \
-DWITHOUT_PARTITION_STORAGE_ENGINE=1 \
-DWITH_FAST_MUTEXES=1 \
-DWITH_ZLIB=bundled \
-DENABLED_LOCAL_INFILE=1 \
-DWITH_READLINE=1 \
-DWITH_EMBEDDED_SERVER=1 \
-DWITH_DEBUG=0 - make && make install
- ln -s /application/mysql-5.5.32/ /application/mysql
- echo ‘export PATH=/application/mysql/bin:$PATH‘ >> /etc/profile
- source /etc/profile
- cp /application/mysql/support-files/my-small.cnf /etc/my.cnf
- chown -R mysql.mysql /application/mysql/data/
- chown -R 1777 /tmp/
- cd /application/mysql/scripts/
- chmod +x mysql_install_db
- ./mysql_install_db --basedir=/application/mysql/ --datadir=/application/mysql/data/ --user=mysql
- cp support-files/mysql.server /etc/init.d/mysqld
- chmod +x /etc/init.d/mysqld
- netstat -lntup|grep 3306
- mysql
以上是关于mysql 5.5.32 源码 cmake 编译 安装的主要内容,如果未能解决你的问题,请参考以下文章
cmake源码编译安装mysql-5.5.32:多实例遇到的坑