Yearning審核平台的安裝


Yearning審核平台的安裝

 

# 文檔:https://guide.yearning.io/install.html
cd /opt/
wget https://github.com/cookieY/Yearning/releases/download/v2.2.0/Yearning-2.2.0.linux-amd64.zip
unzip Yearning-2.2.0.linux-amd64.zip
cd Yearning-go/
# 創建用戶:grant all privileges on *.* to 'admin_m'@'%' identified by 'U0BKqeJQn3xDv3R8';
# create database Yearning;

cat >conf.toml<<"EOF"    
[Mysql]
Db = "Yearning"
Host = "127.0.0.1"
Port = "3306"
Password = "U0BKqeJQn3xDv3R8"
User = "admin_m"

[General]
SecretKey = "ZpoFq87tejMVB1lK"
EOF

# 查看幫助
[root@db238 Yearning-go]# ./Yearning -h
version: Yearning/2.2.0 author: HenryYee
Usage: Yearning [-m migrate] [-p port] [-s start] [-b web-bind] [-h help] [-c config file]

Options:
 -s  啟動Yearning
 -m  數據初始化(第一次安裝時執行)
 -p  端口
 -b  釘釘/郵件推送時顯示的平台地址
 -x  表結構修復,升級時可以操作。如出現錯誤可直接忽略。
 -h  幫助
 -c  配置文件路徑
 -k  用戶權限變更為權限組(2.1.7以下升級至2.1.7及以上使用)
 -f  初始化Admin用戶密碼
[root@db238 Yearning-go]# 
# 初始化數據結構
[root@db238 Yearning-go]# ./Yearning -m

(/var/jenkins_home/workspace/Yearning-go/src/service/migrate.go:31) 
[2020-03-11 11:15:53]  [102.42ms]  INSERT  INTO `core_accounts` (`username`,`password`,`rule`,`department`,`real_name`,`email`,`is_read`) VALUES ('admin','pbkdf2_sha256$120000$IFgWsCsylFGH$ppS2HD5Cf7diu9ThadAjIsGqbtTkOpEcpt7JZjTbYCI=','admin','DBA','超級管理員','',0)  
[1 rows affected or returned ] 

(/var/jenkins_home/workspace/Yearning-go/src/service/migrate.go:39) 
[2020-03-11 11:15:53]  [2.62ms]  INSERT  INTO `core_global_configurations` (`authorization`,`ldap`,`message`,`other`,`stmt`,`audit_role`,`board`) VALUES ('global','{"url":"","user":"","password":"","type":1,"sc":"","ldaps":false}','{"web_hook":"","host":"","port":25,"user":"","password":"","to_user":"","mail":false,"ding":false,"ssl":false}','{"limit":"1000","idc":["Aliyun","AWS"],"multi":false,"query":false,"exclude_db_list":[],"insulate_word_list":[],"register":false,"export":false,"per_order":2,"ex_query_time":60,"query_timeout":0}',0,'{"DMLInsertColumns":false,"DMLMaxInsertRows":10,"DMLWhere":false,"DMLOrder":false,"DMLSelect":false,"DDLCheckTableComment":false,"DDlCheckColumnComment":false,"DDLCheckColumnNullable":false,"DDLCheckColumnDefault":false,"DDLTimeFieldDefault":false,"DDLEnableAcrossDBRename":false,"DDLEnableAutoincrementInit":false,"DDLEnableAutoIncrement":false,"DDLEnableAutoincrementUnsigned":false,"DDLEnableDropTable":false,"DDLEnableDropDatabase":false,"DDLEnableNullIndexName":false,"DDLIndexNameSpec":false,"DDLMaxKeyParts":5,"DDLMaxKey":5,"DDLMaxCharLength":10,"MaxTableNameLen":10,"MaxAffectRows":1000,"MaxDDLAffectRows":0,"EnableSetCollation":false,"EnableSetCharset":false,"SupportCharset":"","SupportCollation":"","CheckIdentifier":false,"MustHaveColumns":"","DDLMultiToSubmit":false,"DDLPrimaryKeyMust":false,"DDLAllowColumnType":false,"DDLImplicitTypeConversion":false,"DMLMinimalRollback":false,"DDLAllowPRINotInt":false,"IsOSC":false,"OscBinDir":"","OscDropNewTable":false,"OscDropOldTable":false,"OscCheckReplicationFilters":false,"OscCheckAlter":false,"OscAlterForeignKeysMethod":"rebuild_constraints","OscMaxLag":1,"OscRecursionMethod":"processlist","OscCheckInterval":1,"OscMaxThreadConnected":25,"OscMaxThreadRunning":25,"OscCriticalThreadConnected":20,"OscCriticalThreadRunning":20,"OscPrintSql":false,"OscChunkTime":0.5,"OscSize":0,"AllowCreateView":false,"AllowCreatePartition":false,"AllowSpecialType":false}','')  
[1 rows affected or returned ] 

(/var/jenkins_home/workspace/Yearning-go/src/service/migrate.go:46) 
[2020-03-11 11:15:53]  [20.45ms]  INSERT  INTO `core_graineds` (`username`,`rule`,`permissions`,`group`) VALUES ('admin','','{"ddl":"1","ddl_source":[],"dml":"1","dml_source":[],"user":"1","base":"1","auditor":[],"query":"1","query_source":[]}',NULL)  
[1 rows affected or returned ] 
初始化成功!
 用戶名: admin
密碼:Yearning_admin
[root@db238 Yearning-go]# 
# 啟動Yearning
[root@db238 Yearning-go]# ./Yearning -s -b "192.168.142.238" -p "8000" &
[1] 19957
[root@db238 Yearning-go]# 檢查更新.......
數據已更新!

__    __  _____       ___   _____    __   _   _   __   _   _____  
\ \  / / | ____|     /   | |  _  \  |  \ | | | | |  \ | | /  ___| 
 \ \/ /  | |__      / /| | | |_| |  |   \| | | | |   \| | | |     
  \  /   |  __|    / / | | |  _  /  | |\   | | | | |\   | | |  _  
  / /    | |___   / /  | | | | \ \  | | \  | | | | | \  | | |_| | 
 /_/     |_____| /_/   |_| |_|  \_\ |_|  \_| |_| |_|  \_| \_____/  vgolang.ver

Welcome to Yearning
https://yearning.io
____________________________________O/_______
                                    O\
⇨ http server started on [::]:8000

[root@db238 Yearning-go]# 

用戶名: admin
密碼:Yearning_admin
登陸:http://192.168.142.238:8000/

#####################################################
#關於SecretKey
#SecretKey是token/數據庫密碼加密/解密的salt。
#建議所有用戶在初次安裝Yearning之前將SecretKey更改(不更改將存在安全風險)
#格式: 大小寫字母均可, 長度必須為16位
#特別注意:
#此key僅可在初次安裝時更改!之后不可再次更改!如再次更改會導致之前已存放的數據源密碼無法解密,
#最終導致無法獲取相關數據源信

 

 

 

 

 

 

 

 

 

 

釘釘:

https://oapi.dingtalk.com/robot/send?access_token=f61dd7d7ead1a0c4ededec2df77818877c22b69472dda1d29c1261dcdaa6ebfe

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM