数据库审计平台---基础环境部署
数据库审计平台 --- 介绍
数据库审计平台 --- 依赖环境部署
操作系统 | |
RedHat |
RedHat Enterprise Linux 7.4 |
软件版本 | |
Python |
Python2.7(系统自带) |
Mongodb |
mongodb-linux-x86_64-enterprise-rhel70-3.6.5.tgz |
Redis |
redis-3.2.3.tar.gz |
Mysql |
mysql-5.7.21-el7-x86_64.tar.gz |
cx_Oracle |
cx_Oracle-5.1.2-11g-py27-1.x86_64.rpm |
oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm |
|
oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm |
|
virtualenv |
virtualenv-15.2.0.tar.gz (通过互联网安装‘pip2.7 install virtualenv'的版本是最新版) |
pip |
setuptools-19.6.tar.gz |
pip-8.0.2.tar.gz |
|
PyH |
PyH-0.1.1.tar.gz |
Celery |
celery-4.1.1.zip |
WTForms |
WTForms-JSON-0.3.3.tar.gz |
Themis |
themis-master.zip |
Themis |
https://github.com/CreditEaseDBA/Themis |
pyh |
https://github.com/hanxiaomax/pyh |
Celery |
https://github.com/celery/celery/tree/v4.1.1 |
wtforms |
https://github.com/kvesteri/wtforms-json |
WTForms |
https://pypi.org/project/WTForms-JSON/#files |
PyH |
https://code.google.com/archive/p/pyh/downloads |
操作系统环境配置
目录结构
操作系统最小化安装
配置yum源
mount /dev/cdrom /mnt
vi /etc/yum.repos.d/1.repo
[sqltuning]
name=sqltuning
baseurl=file:///mnt/
enable=1
gpgcheck=0
安装系统工具包
yum install gcc python-devel unzip
配置全局环境变量
vi /etc/profile
export MONGODB_HOME=/opt/mongodb
export ORACLE_HOME=/usr/lib/oracle/12.1/client64
export MYSQL_HOME=/opt/mysql
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
export TNS_ADMIN=$ORACLE_HOME/network/admin
export REDIS_HOME=/opt/redis
export PATH=$PATH:$REDIS_HOME/bin:$MONGODB_HOME/bin:$ORACLE_HOME/bin:$MYSQL_HOME/bin
配置开机启动
vi /etc/rc.d/rc.local
/opt/mongodb/bin/mongod -f /opt/mongodb/bin/mongodb.conf
安装所有组件
安装mongodb
cd /opt/media
tar -zxvf mongodb-linux-x86_64-enterprise-rhel70-3.6.5.tgz
mv mongodb-linux-x86_64-enterprise-rhel70-3.6.5 /opt/mongodb
mkdir -p /opt/mongodb/db /opt/mongodb/logs
cd /opt/mongodb/bin
vi /opt/mongodb/bin/mongodb.conf
dbpath=/opt/mongodb/db
logpath=/opt/mongodb/logs/mongodb.log
port=27017
fork=true
bind_ip=10.6.0.169,127.0.0.1
启动mongodb
/opt/mongodb/bin/mongod --auth -f /opt/mongodb/bin/mongodb.conf
教程 http://www.runoob.com/mongodb/mongodb-tutorial.html
配置mongodb
>use admin
>db.createUser({user: "dba", //用户名pwd: "sqltuning", //密码roles: [ { role: "root", db: "admin" } ] //设置权限}
)
#因为执行eval需要anyAction,故创建新角色
>db.createRole({
role: "sysAdmin",
privileges: [{
resource: {
anyResource: true
},
actions: ['anyAction']
}],
roles: []
})
>use sqlreview ---创建sqlreview
>db.createUser({user: "sqlreview", //用户名pwd: "sqlreview", //密码roles: [{ role: "dbOwner", db: "sqlreview" } ,
{role:"sysAdmin",db:"admin"}
] //设置权限}
)
#finish
安装redis
cd /opt/media
tar -zxvf redis-3.2.3.tar.gz
mkdir -p /opt/redis
cd /opt/media/redis-3.2.3
make PREFIX=/opt/redis install
cp /opt/media/redis/utils/redis_init_script /etc/rc.d/init.d/redis
vi /etc/rc.d/init.d/redis
chkconfig -add redis
mkdir -p /etc/redis
cp /opt/media/redis/redis.conf /etc/redis/6379.conf
配置redis
vi /etc/redis/6379.conf
dir /opt/redis/db
requirepass sqltuning
启动redis
systemctl status redis.service
systemctl restart redis.service
安装mysql
groupadd mysql
useradd -g mysql mysql
passwd mysql
cd /opt/media
tar -zxvf mysql-5.7.21-el7-x86_64.tar.gz
mv mysql-5.7.21-el7 /opt/mysql
mkdir -p /opt/mysql/data /opt/mysql/log
/opt/mysql/bin/mysql_install_db --user=mysql --basedir=/opt/mysql/ --datadir=/opt/mysql/data/
/opt/mysql/bin/mysqld --user=mysql --basedir=/opt/mysql/ --datadir=/opt/mysql/data/
注:/var/lib/mysql这个目录是否存在,如果不存在自行创建,并授权
mkdir -p /var/lib/mysql
chown -R mysql.mysql /var/lib/mysql
/opt/mysql/bin/mysqld --user=mysql --basedir=/usr/local/mysql --datadir=/opt/mysql/data
vi /opt/mysql/support-files/mysql.server
修改basedir、datadir以及脚本中的所有目录
ln -s /opt/mysql/bin/mysql /usr/bin
vi /etc/my.cnf
#[mysqld]
#datadir=/var/lib/mysql
#socket=/var/lib/mysql/mysql.sock
## Disabling symbolic-links is recommended to prevent assorted security risks
#symbolic-links=0
## Settings user and group are ignored when systemd is used.
## If you need to run mysqld under a different user or group,
## customize your systemd unit file for mariadb according to the
## instructions in http://fedoraproject.org/wiki/Systemd#[mysqld_safe]
#log-error=/var/log/mariadb/mariadb.log
#pid-file=/var/run/mariadb/mariadb.pid##
## include all files from the config directory
##
#!includedir /etc/my.cnf.d##########################################################################[mysqld]
basedir=/opt/mysql
datadir=/opt/mysql/data
port = 3306
socket = /var/lib/mysql/mysql.sock
character-set-server = utf8
#skip-grant-tablesskip-name-resolve
#skip-external-locking
lower_case_table_names=1
log_bin_trust_function_creators =1
back_log = 512
#skip-networking
max_connections = 500
max_connect_errors = 100
table_open_cache = 4096
#external-locking
max_allowed_packet = 16Mmax_heap_table_size = 64M
read_buffer_size = 8M
read_rnd_buffer_size = 16M
sort_buffer_size = 8M
join_buffer_size = 8Mthread_cache_size = 64
#thread_concurrency = 8
thread_stack = 192Kquery_cache_size = 64M
query_cache_limit = 2Mft_min_word_len = 4#memlockdefault-storage-engine = INNODB
transaction_isolation = REPEATABLE-READtmp_table_size = 64Mbinlog_cache_size = 1M
log-bin=/opt/mysql/log/mysql-bin
binlog_format=mixedslow_query_log
slow_query_log_file=/opt/mysql/log/mysql_solw.log
long_query_time = 2
log-error=/opt/mysql/log/mysql_error.log# *** Replication related settings
server-id = 1#*** MyISAM Specific options
key_buffer_size = 32M
bulk_insert_buffer_size = 64M
myisam_sort_buffer_size = 128M
myisam_max_sort_file_size = 10G
myisam_repair_threads = 1# *** INNODB Specific options ***
#skip-innodb
#innodb_additional_mem_pool_size = 16M
innodb_buffer_pool_size = 3Ginnodb_data_file_path = ibdata1:10M:autoextend
#innodb_data_home_dir = <directory>
innodb_write_io_threads = 8
innodb_read_io_threads = 8
#innodb_force_recovery=1
innodb_thread_concurrency = 16
innodb_flush_log_at_trx_commit = 2
#innodb_fast_shutdown
innodb_log_buffer_size = 8M
innodb_log_file_size = 256M
innodb_log_files_in_group = 3
#innodb_log_group_home_dir
innodb_max_dirty_pages_pct = 90
#innodb_flush_method=O_DSYNC
innodb_lock_wait_timeout = 120[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
#safe-updates
[myisamchk]
key_buffer_size = 512M
sort_buffer_size = 512M
read_buffer = 8M
write_buffer = 8M
[mysqlhotcopy]
interactive-timeout
[mysqld_safe]
open-files-limit = 8192
cp /opt/mysql/support-files/mysql.server /etc/init.d/mysqld
chmod 755 /etc/init.d/mysqld
chkconfig -add mysqld
chkconfig --level 2345 mysqld on
vi /etc/my.cnf
[mysqld]
skip-grant-tables
systemctl restart mysql.service
注:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
mysql -u root -p (一路直接回车)
update mysql.user set authentication_string=password('sqltuning') where user='root';
flush privileges;
systemctl restart mysql.service
mysql -uroot -p
sqltuning
setup password = password('sqltuning');flush privileges;
配置mysql
?????????????????
数据库审计平台---基础环境部署相关推荐
- 数据库审计平台 --- 依赖环境部署
数据库审计平台 --- 介绍 数据库审计平台---基础环境部署 依赖软件说明 cx_Oracle cx_Oracle-5.1.2-11g-py27-1.x86_64.rpm oracle-instan ...
- 数据库审计平台 --- 介绍
数据库审计平台---基础环境部署 数据库审计平台 --- 依赖环境部署 介绍 Themis是宜信公司DBA团队开发的一款数据库审核产品.可帮助DBA.开发人员快速发现数据库质量问题,提升工作效率 功能 ...
- See-SQL审计平台介绍及部署
声明:这是我在大学毕业后进入第一家互联网公司学习的内容 背景 线下数据库,成天有人要求运维执行这sql那sql的,又苦逼又容易背锅,问了下公司的DBA大神,推荐了see审计平台,执行sql有审计记录, ...
- 搭建云平台(一) 云平台基础服务部署
最近因课程要求,自己动手搭了一个OpenStack云平台,我将整个过程分了六篇博客.我使用了两个CentOS的虚拟机,一个作为计算节点,一个作为控制节点,整体过程比较繁杂,有心人可以细心看一看 1.修 ...
- SAP(HANA+S/4)上云基础环境部署最佳实践
简介:为提高客户服务水平及集团管理效率,客户选择了SAP解决方案.但是同时也对客户的IT基础设施提出了更多的要求.对此我们针对SAP上云基础设施选型.云原生产品.灾备方案设计,云上安全环境设计总结出了 ...
- 数据库审计系统基本原理与部署方式
数据库审计系统简介 什么是数据库审计? 数据库审计是记录数据库被访问行为的日志系统. 访问数据库的一般有两种行为,一种是应用服务区的访问,一种是数据库运维人员的访问. 数据库审计(简称DBAudit) ...
- Openstack(T版)私有云平台<环境部署>及安装<keystone组件>
文章目录 一.基础环境配置 1. 下载基础工具包 2. 下载open stack t版 客户端 3. 配置hosts主机映射 4. 三台主机做免交互 5. 配置时间同步 二.系统环境配置 1. 配置M ...
- 安全合规--52--安全合规审计平台bombus-2.0部署实践
一.引子 陌陌近期开源了他们的安全合规审计平台bombus-2.0,因此打算搭建起来看看,感觉这个平台对于日常合规工作的开展还是能方便很多的.平台具体就不过多做介绍了,开源项目中的README.md文 ...
- 直播带货app源码,进行直播平台的环境部署
直播项目环境部署 最近总是接到直播带货app源码的开发,在环境部署的过程中踩了不少坑.现在我将环境部署的完整教程分享给大家. 一 .搭建前期准备 注:操作系统centos7.0以上 64位,直播带货a ...
最新文章
- mysql5.7 skip ssl_MySQL 5.7 的SSL加密方法
- vs2019功能介绍_MFC界面库BCGControlBar v30.0新功能详解:支持VS 2019
- 【数据结构】线性表的链式存储-双链表
- python遍历文件内容_Python四种逐行读取文件内容的方法
- python 的csr_python的高级数组之稀疏矩阵
- 将整数m的各位数字保存到数组A中
- new操作符的作用是什么
- java实现从头部及尾部删除指定长度字符
- ubuntu 上NVIDIA驱动和CUDA9.0 的坑之一二
- C++第五章课后习题-输入n个字符串,把其中以字母A打头的字符串输出
- [原]ActiveReport6 for net使用(一)
- 论文笔记_S2D.15_2016-CVPR_ResNet_用于图像识别的深度残差学习网络
- 英语 没有听懂对方说什么 怎么说
- EndNote X7如何在论文中嵌入中文定格式要求的参考文献
- 14、Date and Time (日期和时间)
- 「BJOI 2019」排兵布阵
- Eclipse 创建JavaWeb工程
- 爱上开源之Boot4go-etcdv3-browser之剧透篇
- Wireshark | 猿如意
- dhcp服务器日志文件,dhcp服务器日志
热门文章
- tomcat启动spring项目,报具有该名称的xxxbean已经在xxx定义,覆盖被禁止
- 为什么经过认证的具有GPS完整性的无人机导航GPS很重要?
- NCRE - 嵌入式系统开发工程师 – 操作系统(随笔)
- html网页在ie浏览器乱码怎么办,IE浏览器出现了乱码该怎么解决?
- 出入口控制在智慧城市建设中的发展与应用
- android 隐私伪装原理,加锁、隐藏和伪装!三招严防私密App被偷看
- JS Uncaught DOMException: Blocked a frame with origin “XXX“ from accessing a cross-origin frame问题解决
- windows安装数据库
- 小朋友的Qimo计算机问世
- ChatGPT写2023高考语文新课标I卷作文