In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
In order to study whether the automated inspection and analysis tools of sql are easy to use, I install and use soar and soar-web locally.
The preliminary experimental results are summarized as follows:
1. Installation is relatively troublesome, especially the installation of dependent packages for soar-web, which involves downloading and installing python pip-related components.
two。 You will encounter some strange problems when starting soar-web, indicating that "ImportError: No module named xxx" is not installed, but the installation is successful through the python-m pip list check.
3. The startup script run.sh of soar-web cannot be started normally, but it can be started normally with python./soar-web.py install.
4. Database type, only MySQL is supported
Follow-up:
Finally, in a comprehensive sense, there is still a lot of room for the functions of soar-web to automate SQL inspection and optimization. Next, I will continue to investigate and compare the remaining two tools: see and Yearning
1.see tool
Https://github.com/myide/see
2. Yearning tool
Https://github.com/cookieY/Yearning
1. The main steps of soar are as follows:
Step 1: download the installation package
# prepare dir and installmkdir-p / opt/soft/soar & & mkdir-p / opt/install/soar/ {log,conf} wget-O / opt/soft/soar/soar-c https://github.com/XiaoMi/soar/releases/download/0.11.0/soar.linux-amd64
Step 2: copy and install files
# install servermv / opt/soft/soar/soar / opt/install/soar # directory introduction: # configuration file is in yaml format. In general, only a few parameters such as online-dsn, test-dsn, log-output and so on need to be configured. Even if you don't create a configuration file, SOAR still gives basic heuristic suggestions. # default files will be loaded in the order of / etc/soar.yaml,. / etc/soar.yaml,. / soar.yaml. # find the first one and no longer load subsequent configuration files. If you need to specify another configuration file, you can specify it through the-config parameter. # about database permissions online-dsn requires the SELECT permission of the corresponding database table, and test-dsn requires the highest permission of root. # modify the default configuration parameters, as follows # reference # # 1. Modify the basic parameters of soar.conf root > > cat > / opt/install/soar/conf/soar.yaml > EOF step 3: prepare the environment variable # env parameter and pathecho'> > / etc/profile & &\ echo 'SOAR_HOME=/opt/install/soar' > > / etc/profile & &\ echo' SOAR_CONF_DIR=$SOAR_HOME/conf' > > / etc/profile & &\ echo 'SOAR_LOG_DIR=$SOAR_HOME/log' > > / etc/profile & &\ echo' PATH=$PATH : $SOAR_HOME' > > / etc/profile & &\ source / etc/profile step 4: file entitles permissions chmod-R 777 $SOAR_HOME/soar step 5: check soar global configuration takes effect # View version soar-version # print all heuristic rules soar-list-heuristic-rules # print supported report format soar-list-report-types
2. The main steps of soar-web are as follows:
Step 1: install the dependency package for soar-web
# 1.1 install python3 and python3-pip and gcc (required for gcc to install python components such as pycryptodome in source code) yum install-y python36 python36-pip gcc # check python3 installation results python-V# check pip installed python components python3- m pip list# uninstall pip components # python3- m pip uninstall "packagename" # 1.2 flask (python3 must be installed first) # installation tutorial: https://www.cnblogs.com/wobeinianqing/p / 7650498.html# yum install-y flaskpython3-m pip install flask # 1.3 install pymysql (python3 must be installed first) # installation tutorial: https://blog.csdn.net/qq_37788558/article/details/73716002# installation tutorial: https://github.com/PyMySQL/PyMySQLpython3-m pip install PyMySQL # 1.4 install pycryptodome (python3 must be installed first) python3-m pip install pycryptodome# if pip download is slow You can use the following command # or installation mode 2, such as python3-m pip install / opt/soft/soar/pycryptodome-3.9.6.tar.gz#### or installation mode 3 The following # format = python3-m pip install https://pypi.tuna.tsinghua.edu.cn/simple/simple/{ package name} # format = python3-m pip install https://pypi.doubanio.com/simple/{ package name} python3-m pip install https://pypi.tuna.tsinghua.edu.cn/simple/pycryptodome-3.9.6.tar.gz
Step 2: install soar-web
# 2.1 download the source code of soar-web wget-O / opt/soft/soar/soar-web-master.zip-c https://codeload.github.com/xiyangxixian/soar-web/zip/masteryum install-y unzipunzip / opt/soft/soar/soar-web-master.zip-d / opt/soft/soar/ # 2.2 install soar-webmkdir-p / opt/install/soar-web & &\ mv / opt/soft/soar/soar-web-master/* / opt / install/soar-web# run soar-webchmod-R 777 / opt/install/soar-web/run.shbash / opt/install/soar-web/run.sh # 2.3or start soar-webcd / opt/install/soar-web/python3. / soar-web.py install as follows
Step 3: check the port, as follows
Netstat-nltp | grep 5077
Step 4: client, access URL, as follows:
Address = http://{server-ip}:5077
Step 5: configure database source
Online environment parameters = database account number: database password @ database hostname: database hostport/ database instance name
Step 6: testing and using SQL checking
First, select the configuration parameter "mysql-CNT7XMYSQLD01", and then enter the SQL to be checked, as shown below: get the result of checking SQL
Summary
This is the end of this article on the installation and use of soar and soar-web of sql automation inspection and analysis tools. For more information about sql automation inspection and analysis tools, please search for previous articles or continue to browse the relevant articles below. I hope you will support me in the future!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.