Centos7安装Inception

本文详细介绍了在Centos7系统中安装Inception的步骤,包括Python环境配置、Inception的基础环境安装、bison的指定版本安装、Inception的配置与启动、pymysql的安装以及Mysql的安装与配置。此外,还提到了Inception的实操注意事项,如开启binlog功能,以及在使用过程中可能出现的错误及其解决办法。
摘要由CSDN通过智能技术生成

1.操作环境
操作系统:Centos7
语言:Python3.6
参考文章
inception安装使用 https://www.jianshu.com/p/20e87911483f
Pymysql安装 https://blog.csdn.net/zzzcl112/article/details/80503690
2.安装inception
2.1安装基础环境

cd /usr/local 以后的安装,下载操作都在usr/local下进行
yum -y install cmake libncurses5-dev libssl-dev g++ bison gcc gcc-c++ openssl-devel ncurses-devel mysql pymysql

2.2安装bison
注意,Centos7一定要制定bison版本不高于2.6,否则Inception可能会出现编译错误,该下载速度十分缓慢,可以考虑长时间等待或者更换镜像源。

wget http://ftp.gnu.org/gnu/bison/bison-2.5.1.tar.gz
tar -zxvf bison-2.5.1.tar.gz
cd bison-2.5.1
./configure
make
make install

2.3安装inception

cd /usr/local/
wget https://github.com/mysql-inception/inception/archive/master.zip
unzip  inception-master.zip
cd inception-master
sh inception_build.sh builddir linux

2.4修改配置

Nano /etc/inc.cnf

###################
[inception]
general_log=1
general_log_file=inc.log
port=6669
socket=/tmp/inc.socket
character-set-client-handshake=0
character-set-server=utf8# 这里的数据库是填inception的库,也用作备份库
inception_remote_system_password=123456
inception_remote_system_user=root
inception_remote_backup_port=3306
inception_remote_backup_host=127.0.0.1
inception_support_charset=utf8
inception_enable_nullable=0
inception_check_primary_key=1
inception_check_column_comment=1
inception_check_table_comment=1
inception_osc_min_table_size=1
inception_osc_bin_dir=/usr/bin
inception_osc_chunk_time=0.1
inception_ddl_support=1
inception_enable_blob_type=1
inception_check_column_default_value=1
###################

2.5启动服务

nohup /usr/local/inception-master/builddir/mysql/bin/Inception --defaults-file=/etc/inc.cnf &

2.6 测试是否安装成功

mysql -uroot -h127.0.0.1 -P 6669 输入后,进入数据库命令行
>inception get variables; 输入后,出现如下表格则说明安装成功
MySQL [(none)]> inception get variables;
+------------------------------------------+---------------------------------------------+
| Variable_name                            | Value                                       |
+------------------------------------------+---------------------------------------------+
| autocommit                               | OFF                                         |
| bind_address                             | *                                           |
| character_set_system                     | utf8                                        |
| character_sets_dir                       | /usr/local/inception-master/share/charsets/ |
| connect_timeout                          | 10                                          |
| date_format                              | %Y-%m-%d                                    |
| datetime_format                          | %Y-%m-%d %H:%i:%s                           |
| general_log                              | ON                                          |
| general_log_file                         | inc.log                                     |
| inception_check_autoincrement_datatype   | ON                                          |
| inception_check_autoincrement_init_value | ON                                          |
| inception_check_autoincrement_name       | ON                                          |
| inception_check_column_comment           | ON                                          |
| inception_check_column_default_value     | ON                                          |
| inception_check_dml_limit                | ON      
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值