本篇内容介绍了“怎么实现docker Yearning+Inception SQL审核平台”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!【一】安装【1.1】系统环境系统环境:CentOS Linux release 7.6.1708 (Core)系统内存:4G系统内核:1Python:3.6.4关闭iptables and selinux本次安装采用的是外部MySQL 5.7【1.2】关闭iptables[root@localhost ~]# systemctl stop firewalld.service//关闭iptables[root@localhost ~]# systemctl disable firewalld.service//开机 禁止启动 iptables【1.3】禁用selinux 以及安装 Python[root@localhost ~]# vim /etc/sysconfig/selinux# This file controls the state of SELinux on the system.# SELINUX= can take one of these three values:# enforcing – SELinux security policy is enforced.# permissive – SELinux prints warnings instead of enforcing.# disabled – No SELinux policy is loaded.SELINUX=disabled// 改成 disabled# SELINUXTYPE= can take one of three two values:# targeted – Targeted processes are protected,# minimum – Modification of targeted policy. Only selected processes are protected.# mls – Multi Level Security protection.SELINUXTYPE=targeted【1.3.1】Python 安装[root@localhost ~]# cd /root/software[root@localhost software]# yum -y install zlib-*[root@localhost software]# wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tgz[root@localhost software]# tar -zxvf Python-3.6.4.tgz[root@localhost software]# mkdir -p /usr/local/python3[root@localhost software]# cd Python-3.6.4/[root@localhost Python-3.6.4]# ./configure –prefix=/usr/local/python3[root@localhost Python-3.6.4]# make[root@localhost Python-3.6.4]# make install[root@localhost Python-3.6.4]# mv /usr/bin/python /usr/bin/python_bak//修改旧版本[root@localhost Python-3.6.4]# ln -s /usr/local/python3/bin/python3 /usr/bin/python//创建新的软连接 [root@localhost Python-3.6.4]# python -V//检查python的版本Python 3.6.4[root@localhost Python-3.6.4]# vim ~/.bash_profile//配置成功后,pip3用不了,需要进一步配置将/usr/local/python3/bin加入PATH# .bash_profile# Get the aliases and functionsif [ -f ~/.bashrc ]; then. ~/.bashrcfi# User specific environment and startup programsPATH=$PATH:$HOME/bin:/usr/local/python3/binexport PATH[root@localhost Python-3.6.4]# source ~/.bash_profile// 让环境变量生效【1.3.2】配置 yum 源 否则 yum 不可用[root@localhost Python-3.6.4]# yum -y update//显然上面的 except 是python2的写法,当然不能使用默认的Python3来执行了。于是把这个文件第1行的 #!/usr/bin/python 替换成 #!/usr/bin/python2.7File “/usr/bin/yum”, line 30except KeyboardInterrupt, e: ^SyntaxError: invalid syntax[root@localhost Python-3.6.4]# vim /usr/bin/yum于是把这个文件第1行的 #!/usr/bin/python 替换成 #!/usr/bin/python2.7【1.4】安装 MySQL[root@localhost ~]# cd /etc/yum.repos.d/[root@localhost yum.repos.d]# vim mysql.repos[mysql5.7-community]name=MySQL 5.7 Community Serverbaseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/7/$basearch/enabled=1gpgcheck=0[root@localhost yum.repos.d]# yum -y install mysql-*//等待 安装 执行完成【1.5】启动MySQL服务 以及 设置开机启动[root@localhost yum.repos.d]# systemctl start mysqld[root@localhost yum.repos.d]# systemctl enable mysqld[root@localhost yum.repos.d]# systemctl daemon-reload【1.6】查看 mysql 的初始密码[root@localhost yum.repos.d]# grep ‘temporary password’ /var/log/mysqld.log2019-06-25T03:27:20.334210Z 1 [Note] A temporary password is generated for root@localhost: GIutnKkR%7fe【1.7】登录 mysql 环境做配置以及修改参数[root@localhost yum.repos.d]# mysql -uroot -pGIutnKkR%7fe //回车进入数据库mysql> set global validate_password_policy=0;mysql> set global validate_password_length=1;mysql> set global validate_password_mixed_case_count=2;mysql> show variables like ‘validate_password%’; +————————————–+——-+| Variable_name | Value |+————————————–+——-+| validate_password_check_user_name | OFF || validate_password_dictionary_file | || validate_pass免费主机域名word_length | 6 || validate_password_mixed_case_count | 2 || validate_password_number_count | 1 || validate_password_policy | LOW || validate_password_special_char_count | 1 |+————————————–+——-+7 rows in set (0.02 sec)mysql> alter user ‘root’@’localhost’ identified by ‘123456’;mysql> flush privileges;mysql> quit;【1.8】创建 Yearning 数据库 与 用户 和 密码 并且授权[root@localhost yum.repos.d]# mysql -uroot -p123456mysql> create database Yearning charset utf8;//创建 Yearning 库mysql> create user ‘Yearning’@’%’ identified by ‘Yearning’;//创建 Yearning 用户mysql> grant all on *.* to ‘Yearning’@’%’ identified by ‘Yearning’; //授权 Yearning 用户权限mysql> flush privileges;mysql> quit;【1.9】安装 docker[root@localhost ~]# yum install -y yum-utils device-mapper-persistent-data lvm2//安装 docker 的依赖包【1.9.1】设置yum源[root@localhost ~]# yum-config-manager –add-repo https://download.docker.com/linux/centos/docker-ce.repo【1.9.2】可以查看所有仓库中所有docker版本,并选择特定版本安装[root@localhost ~]# yum list docker-ce –showduplicates | sort -r已加载插件:fastestmirror, langpacks已安装的软件包可安装的软件包* updates: ap.stykers.moeLoading mirror speeds from cached hostfile* extras: ftp.sjtu.edu.cndocker-ce.x86_64 3:18.09.6-3.el7 docker-ce-stabledocker-ce.x86_64 3:18.09.6-3.el7 @docker-ce-stabledocker-ce.x86_64 3:18.09.5-3.el7 docker-ce-stabledocker-ce.x86_64 3:18.09.4-3.el7 docker-ce-stabledocker-ce.x86_64 3:18.09.3-3.el7 docker-ce-stabledocker-ce.x86_64 3:18.09.2-3.el7 docker-ce-stabledocker-ce.x86_64 3:18.09.1-3.el7 docker-ce-stabledocker-ce.x86_64 3:18.09.0-3.el7 docker-ce-stabledocker-ce.x86_64 18.06.3.ce-3.el7 docker-ce-stabledocker-ce.x86_64 18.06.2.ce-3.el7 docker-ce-stabledocker-ce.x86_64 18.06.1.ce-3.el7 docker-ce-stabledocker-ce.x86_64 18.06.0.ce-3.el7 docker-ce-stabledocker-ce.x86_64 18.03.1.ce-1.el7.centos docker-ce-stabledocker-ce.x86_64 18.03.0.ce-1.el7.centos docker-ce-stabledocker-ce.x86_64 17.12.1.ce-1.el7.centos docker-ce-stabledocker-ce.x86_64 17.12.0.ce-1.el7.centos docker-ce-stabledocker-ce.x86_64 17.09.1.ce-1.el7.centos docker-ce-stabledocker-ce.x86_64 17.09.0.ce-1.el7.centos docker-ce-stabledocker-ce.x86_64 17.06.2.ce-1.el7.centos docker-ce-stabledocker-ce.x86_64 17.06.1.ce-1.el7.centos docker-ce-stabledocker-ce.x86_64 17.06.0.ce-1.el7.centos docker-ce-stabledocker-ce.x86_64 17.03.3.ce-1.el7 docker-ce-stabledocker-ce.x86_64 17.03.2.ce-1.el7.centos docker-ce-stabledocker-ce.x86_64 17.03.1.ce-1.el7.centos docker-ce-stabledocker-ce.x86_64 17.03.0.ce-1.el7.centos docker-ce-stable* base: ap.stykers.moe【1.9.3】安装 docker 选择对应的版本[root@localhost ~]# yum install docker-ce #由于repo中默认只开启stable仓库,故这里安装的是最新稳定版18.03.1.ce[root@localhost ~]# yum install
[root@localhost ~]# cd /root/software/Yearning/install/// cd 到环境目录 解压 inception.tar 包[root@localhost install]# tar -xvf inception.tar[root@localhost install]# cd inception/bin/[root@localhost bin]# mkdir -p /var/log/inception/// 创建 inception 日志目录[root@localhost bin]# mkdir -p /var/run/inception/// 创建 incept免费主机域名ion.socket 目录[root@localhost bin]# vim inc.cnf// 修改 inception 配置文件[inception]general_log=1general_log_file=/var/log/inception/inception.log// inception 日志目录port=6669socket=/var/run/inception/inc.socket// inception.socket 存储目录character-set-client-handshake=0character-set-server=utf8inception_support_charset=utf8mb4inception_enable_nullable=0inception_check_primary_key=1inception_check_column_comment=1inception_check_table_comment=1inception_enable_blob_type=1inception_check_column_default_value=1inception_support_charset=utf8inception_osc_on=OFFinception_check_column_default_value=OFFinception_check_column_comment=OFFinception_check_table_comment=OFFinception_enable_identifer_keyword=ONinception_remote_backup_host = 192.168.1.150// 备份数据库的 IPinception_remote_backup_port = 3306// 数据库默认端口inception_remote_system_user = root// 数据库的权限用户_可根据自己定义inception_remote_system_password = 123456// 数据库的用户密码【2.2】启动 inception 服务[root@localhost bin]# pwd/root/software/Yearning/install/inception/bin[root@localhost bin]# nohup bin/Inception –defaults-file=inc.cnf &// 后台调度启用【2.3】运行 Yearning 【备注:HOST=本机IP 与 MYSQL_ADDR=本机IP 后面的参数只要是按照本文操作可以不用选择。默认按照我的就行了】[root@localhost bin]# docker run -d -e HOST=192.168.1.150 -e MYSQL_ADDR=192.168.1.150 -e MYSQL_USER=Yearning -e MYSQL_PASSWORD=Yearning -p8080:80 -p8000:8000 registry.cn-hangzhou.aliyuncs.com/cookie/yearning:v1.3.0【三】相关配置【3.1】访问 Yearning访问Yearning(访问地址为你启动docker的IP地址)登录管理员缺省值:admin / Yearning_admin“怎么实现docker Yearning+Inception SQL审核平台”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注云技术网站,小编将为大家输出更多高质量的实用文章!
这篇文章主要讲解了“设定Oracle用户名密码的规则有哪些”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“设定Oracle用户名密码的规则有哪些”吧!$ sqlplus / as sysdbaSQL > s…