mysql alisql_初次安装aliSql
卸载原有自带的Mysql
yum remove mysql-libs
安装依赖包
yum install centos-release-scl devtoolset-4-gcc-c++ devtoolset-4-gcc cmake git ncurses-devel openssl-devel bison -y
创建账号
groupadd mysql
useradd -r -g mysql mysql
安装步骤
wget -c https://github.com/alibaba/AliSQL/archive/AliSQL-5.6.32-4.tar.gz
tar zxvf AliSQL-5.6.32-4.tar.gz
cd AliSQL-AliSQL-5.6.32-4/
scl enable devtoolset-4 bash
cmake .
-DCMAKE_BUILD_TYPE="Release"
-DCMAKE_INSTALL_PREFIX="/opt/alisql"
-DWITH_EMBEDDED_SERVER=0
-DWITH_EXTRA_CHARSETS=all
-DWITH_MYISAM_STORAGE_ENGINE=1
-DWITH_INNOBASE_STORAGE_ENGINE=1
-DWITH_PARTITION_STORAGE_ENGINE=1
-DWITH_CSV_STORAGE_ENGINE=1
-DWITH_ARCHIVE_STORAGE_ENGINE=1
-DWITH_BLACKHOLE_STORAGE_ENGINE=1
-DWITH_FEDERATED_STORAGE_ENGINE=1
-DWITH_PERFSCHEMA_STORAGE_ENGINE=1
-DWITH_TOKUDB_STORAGE_ENGINE=1
make
make install
授权
cd /opt/alisql
chown -R mysql. .
初始化
cd /opt/alisql
echo never > /sys/kernel/mm/transparent_hugepage/enabled ##开启TokuDB,不执行会提示:[ERROR] TokuDB: Huge pages are enabled, disable them before continuing
scripts/mysql_install_db --user=mysql --datadir=/opt/alisql/data --basedir=/opt/alisql
cp support-files/my-default.cnf /etc/my.cnf
cp support-files/mysql.server /etc/init.d/mysqld
环境变量配置
echo "PATH=/opt/alisql/bin:/opt/alisql/lib:$PATH" >> /etc/profile
source /etc/profile
启动并加入开机自启
service mysqld start
chkconfig --level 35 mysqld on
————————————————
版权声明:本文为CSDN博主「饼子啃书」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_33160876/article/details/113423308
相关文章