forked from jly8866/archer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
62 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,12 +39,71 @@ linux : 64位linux操作系统均可 | |
### 主要配置文件: | ||
* archer/archer/settings.py<br/> | ||
|
||
### docker部署: | ||
### 采取docker部署: | ||
#### inception部署 | ||
[项目地址](https://github.com/hhyo/inception) | ||
- 自定义配置文件,参考配置(inc.cnf) | ||
``` | ||
[inception] | ||
general_log=1 | ||
general_log_file=inception.log | ||
port=6669 | ||
socket=/tmp/inc.socket | ||
character-set-client-handshake=0 | ||
character-set-server=utf8 | ||
inception_remote_system_password=root #inception备份库配置信息 | ||
inception_remote_system_user=wzf1 | ||
inception_remote_backup_port=3306 | ||
inception_remote_backup_host=127.0.0.1 | ||
inception_support_charset=utf8mb4 | ||
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=/data/temp | ||
inception_osc_chunk_time=0.1 | ||
inception_enable_blob_type=1 | ||
inception_check_column_default_value=1 | ||
``` | ||
- 指定配置文件和映射端口启动 | ||
``` | ||
docker run --name inception -v /etc/inc.cnf:/etc/inc.cnf -p 6669:6669 -d registry.cn-hangzhou.aliyuncs.com/lihuanhuan/inception | ||
``` | ||
- 访问 | ||
``` | ||
mysql -hxxxx -P6669 | ||
``` | ||
#### archer部署 | ||
- 下载settings.py文件,替换相关配置项,其中docker已经包含SQLADVISOR,请将SQLADVISOR配置项修改为 | ||
|
||
``` | ||
SQLADVISOR ='/opt/SQLAdvisor/sqladvisor/sqladvisor' | ||
``` | ||
|
||
- 指定配置文件和映射端口启动 | ||
``` | ||
docker run --name archer -v | ||
/etc/archer/settings.py:/opt/archer/archer/settings.py -p 9123:9123 -d registry.cn-hangzhou.aliyuncs.com/lihuanhuan/arche | ||
``` | ||
- 进入容器,初始化数据库,后续升级可走增量变动脚本 | ||
``` | ||
docker exec -ti archer /bin/bash | ||
cd /opt/archer | ||
source venv4archer/bin/activate | ||
# 初始化数据库 | ||
python3 manage.py makemigrations sql | ||
python3 manage.py migrate | ||
# 创建管理员账号 | ||
python3 manage.py createsuperuser | ||
``` | ||
- 访问 | ||
``` | ||
http://xxxx:9123/ | ||
``` | ||
|
||
### 手动安装步骤: | ||
centos7一键安装脚本(可配置好除inception和SQLAdvisor之外的环境):src/script/centos7_install.sh | ||
centos7一键安装脚本:克隆代码到本地后执行`bash src/script/centos7_install.sh`,可配置好除inception和SQLAdvisor之外的环境 | ||
1. 环境准备:<br/> | ||
(1)克隆代码到本地: [email protected]:hhyo/archer.git 或下载zip包<br/> | ||
(2)安装mysql集群,请注意保证mysql数据库默认字符集为utf8或utf8mb4<br/> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters