Install goInception and related environment configuration under Linux

Preface

 goInception is a MySQL operation and maintenance tool that integrates auditing, execution, backup, and generation of rollback statements. Through the grammatical analysis of the executed SQL, it returns the audit results based on custom rules, and provides execution, backup and generation of rollback statements. Features

GitHub https://github.com/hanchuanchuan/goInception

 

installation steps

Install go environment

1. Download the source code

cd /opt
wget -c https://dl.google.com/go/go1.13.4.linux-amd64.tar.gz

2. Unzip the source code

tar zxvf go1.13.4.linux-amd64.tar.gz

3. Configure environment variables

echo "export PATH=$PATH:/opt/go/bin" >> /etc/profile
source /etc/profile

4. Verify that the installation is successful

go version

  If a version number appears, it means success! 

 

Install goInception

1. Download the source code

  Method 1 Link:  https://pan.baidu.com/s/1YkMlgaBtaTQTNhHkC4KIbQ  Password: aai2 Place in the /opt/goInception directory

  Way two 

cd /opt
mkdir goInception
wget -c https://github.com/hanchuanchuan/goInception/releases/download/v1.1.5/goInception-linux-amd64-v1.1.5.tar.gz

2. Unzip the source code

tar zxvf goInception-linux-amd64-v1.1.5.tar.gz -C /opt/goInception

3. Rename

cd goInception/config/
mv config.toml.default config.toml

4. Modify the configuration

vi config.toml

  In English input state, press i to enter insert mode, modify the following configuration, and keep the default configuration


# IP地址
host = "127.0.0.1"

# 端口
port = 4000

backup_host = "127.0.0.1"
backup_port = 3306
backup_user = "root"
backup_password = "newpass"

5. Start

nohup /opt/goInception/goInception -config=/opt/goInception/config/config.toml >>/dev/null 2>1& &

6. Connect

mysql -h127.0.0.1 -P4000

7. If there is a disconnection problem, run the following command after starting

exit

 

Guess you like

Origin blog.csdn.net/javanbme/article/details/112607083