docker简单构建mysql-mariadb数据库安全策略
docker简单构建mysql-mariadb数据库安全策略1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586#创建用户CREATE USER 'gegewu'@'%' IDENTIFIED BY '123456';#授权运程登录用户GRANT ALL PRIVILEGES ON *.* TO 'gegewu'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION; /注:此用户只能用于远程登录 本地用户只能用于本地登录mysql -uroot -pzxcujvjdfkvdb#修改数据库密码SET PASSWORD FOR root@'localh ...
mysql-mariadb配置远程连接
mysql-mariadb配置远程连接一. MySQL5.7授权用户远程访问概览:
1.授权远程登陆2.注释配置文件中bind=127.0.0.1
或
1.创建远程登陆用户注释bind=127.0.0.12.授权登陆
做个记录,每次弄环境的时候,特别是弄mysql环境,时不时都要用到下面的命令 命令如下:
授权
123456# 授权远程登陆grant all privileges on *.* to 'root'@'%' identified by 'oa123456' with grant option;# 刷新flush privileges;# 退出quit;
创建远程登陆用户
12345678910# 创建远程登陆用户CREATE USER 'gegewu'@'%' IDENTIFIED BY '123456';# 授权远程登陆以及操作所有数据库的权限grant all privileges on *.* to 'gegewu'@ ...
mysql备份脚本
4d04042c6ca46bd44e1433b27a81c2cf1d7ebe395378e6b7d366280b19cd34464dbaf1b441366bd6ad20f97f778b89aeeeaf429e24c71e03e0a8cad736649e91abcfee610148ffd49863b8dcf69717f77113147a0c9a4344240550d0c751cfa6d43cfe5b4a840e4ecffab93568236480425f32df2377c162804f5ddb9a9f5d0161da849a34989a44ff16ec31d6f15f2c243bac70d87c65e198322cfa61d504b0b4dcbb2a1c05dc766339f8b8a4eb5ccad749a22b8458e2f581b0035c955b2f8aff8efae838b2f5c1606849a823812a253042f7c64e3b7d293b14455bfb1def79ceec3f25a1154bb8517196e7f3c6aeb9e9fdc3c3649f21a6d ...
编译部署nginx
ubuntu centos nginx安装编译部署环境: centos7 ubuntu18.04
概览:
ubuntu编译部署nginx
centos编译部署nginx
建议托管文件参考传送门
一. ubuntu部署nginx1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283#!/bin/bash#软件:nginx#环境:centos7#/usr/local/src/nginx-1.13.0/configure --prefix=/usr/local/nginxset -eecho -e "\033[33m 1.此脚本只适用于首次安装部署,多次执行此脚本会覆盖nginx配置文件 \n 2.想部署其他版本的需要自行更改链接:http://ngi ...
编译部署keepalived
编译部署keepalived环境:centos7 ubuntu18.04
一. centos 编译部署keepalived1234567891011121314151617181920212223242526272829303132333435363738394041424344#!/bin/bash#环境:centos7#软件版:keepalived-2.0.18.tar.gz set -edir="/usr/local/src"keepalived="keepalived-2.0.18"keepalived_v="keepalived-2.0.18.tar.gz"yilai="openssl openssl-devel wget vim lrzsz"keepalived_make(){ echo -e "\033[33m 此脚本容错率较低请不要重复执行 \033[0m" sleep 10 echo -e "\033[36m =========== ...
各种加速器
4d04042c6ca46bd44e1433b27a81c2cf1d7ebe395378e6b7d366280b19cd34464dbaf1b441366bd6ad20f97f778b89aeeeaf429e24c71e03e0a8cad736649e91abcfee610148ffd49863b8dcf69717f77113147a0c9a4344240550d0c751cfa6d43cfe5b4a840e4ecffab93568236480425f32df2377c162804f5ddb9a9f5d0161da849a34989a44ff16ec31d6f15f2c243bac70d87c65e198322cfa61d504b0b4dcbb2a1c05dc766339f8b8a4eb5ccad749a22b8458e2f581b0035c955b2f8aff8efae838b2f5c1606849a823812a25091c30d1b1befeff4fd986d6c526b1311438a7e05506f3bb313b4d8578bbae64cd82b952ac7f93cf1 ...
ubuntu-ufw配置
ubuntu-ufw 配置参考:
https://ednovas.xyz/2021/08/15/ufw/
前言:
只有防火墙内部有规则的时候 使用 ufw status /ufw status verbose 才能显示规则 情况 否则显示 /活动/不活动/激活/未激活
防火墙拓补:
一. 重置防火墙会把所有已添加的规则全部删除并且禁用防火墙123456789101112131415161718192021222324252627# 常规操作sudo ufw reset //重置防火墙sudo ufw disable //禁用防火墙sudo ufw enable //开启防火墙sudo ufw status 查看防火墙状态sudo ufw enable 开启防火墙sudo ufw status verbose 查看比status查看的更详细的防火墙sudo ufw enablesudo ufw default denysudo ufw allow ssh 允许ssh服务sudo ufw deny ssh 禁用ssh服务sudo ufw logging on 启用日志记 ...
dockerfile构建telegraf_py版及oracle客户端
dockerfile构建telegraf_py版及oracle客户端概览:
容器内:
部署telegraf
部署oracle客户端
安装python3环境
安装cx_Oracle库
脚本用于构建telegraf python环境 配合python脚本用于监控oracle
功能
内部配置完成python环境
容器内可访问外部网络
内部部署oracle客户端容器构建完成后可连接oracle数据库
一. 启动脚本123456789101112#!/bin/bash#oracleexport ORACLE_HOME=/home/oracle/instantclient_11_2export TNS_ADMIN=$ORACLE_HOME/network/admin#export NLS_LANG=AMERICAN_AMERICA.ZHS16GBKexport NLS_LANG=AMERICAN_AMERICA.AL32UTF8export LD_LIBRARY_PATH=$ORACLE_HOMEexport PATH=$ORACLE_HOME:$PATH#source /etc/pro ...
vmware_v2v迁移脚本
4d04042c6ca46bd44e1433b27a81c2cf1d7ebe395378e6b7d366280b19cd34464dbaf1b441366bd6ad20f97f778b89aeeeaf429e24c71e03e0a8cad736649e91abcfee610148ffd49863b8dcf69717f77113147a0c9a4344240550d0c751cfa6d43cfe5b4a840e4ecffab93568236480425f32df2377c162804f5ddb9a9f5d0161da849a34989a44ff16ec31d6f15f2c243bac70d87c65e198322cfa61d504b0b4dcbb2a1c05dc766339f8b8a4eb5ccad749a22b8458e2f581b0035c955b2f8aff8efae838b2f5c1606849a823812a2537aa9e0c3618248a4526981560d0721580f886b42bd47bb145e63f5cc96d66df104a5bcb6f9672f2c ...
写文章默认加签
一. 前言
模板与特定页面项目Kratos-Rebirth-Specified-Pages已经废弃,所有功能均已内置,无需使用额外的模块。此处给出我使用的scaffolds/post.md文件内容:
二. 写文章默认加签
12345678910111213141516title: 文章标题date: 2018-03-24 15:31:36categories: Demotags:- Tag0- Tag1- Tag2sticky: 100pic:comments: truetoc: trueexpire: trueonly:- home- category- tag
三. 作者使用
123456789---title: {{ title }}date: {{ date }}categories:tags:pic:comments: truetoc: true---