会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
水中鱼2018
博客园
首页
新随笔
联系
订阅
管理
2022年11月29日
oracle数据库连接方式
摘要: 数据库:Oracle分类:数据库连接方式--创建两个表create table tmp1( id number(10) not null, name varchar2(10) not null);create table tmp2( id number(10) not null, age numbe
阅读全文
posted @ 2022-11-29 13:54 水中鱼2018
阅读(230)
评论(0)
推荐(0)
2020年11月2日
安装docker-compose
摘要: 方法1: pip安装 [root@harbor ~]# which pip3 /usr/local/bin/pip3 [root@harbor ~]# pip3 install docker-compose 方法2: 二进制文件安装 下载后添加可执行权限 curl -L https://github
阅读全文
posted @ 2020-11-02 10:59 水中鱼2018
阅读(174)
评论(0)
推荐(0)
2020年10月29日
ansible中变量使用
摘要: [root@localhost ansible]# cat var.yml hosts: k1 remote_user: root vars: var1: "ls -l />/root/wang20201029.log" tasks: - name: ls shell: "{{var1}}"
阅读全文
posted @ 2020-10-29 14:55 水中鱼2018
阅读(80)
评论(0)
推荐(0)
2020年10月27日
ansible批量更改centos7系统密码
摘要: 背景 最近有不少客户需要定期更改密码,每次一台一台更改浪费时间,写此过程一劳永逸 编写playbook [root@localhost pw]# cat 1-changePassword.yml hosts: k remote_user: root tasks: - name: change pas
阅读全文
posted @ 2020-10-27 21:07 水中鱼2018
阅读(492)
评论(0)
推荐(0)
2020年10月26日
nginx日志切割
摘要: 系统:centos7 nginx:编译安装1.16.1 创建定时任务 [root@nginx1 shell]# crontab -l0 1 * * * /root/shell/cut_log.sh 编写脚本 [root@nginx1 shell]# cat cut_log.sh#!/bin/bash
阅读全文
posted @ 2020-10-26 14:59 水中鱼2018
阅读(74)
评论(0)
推荐(0)
2020年10月23日
ansible安装nginx1.18(用官方的yum源)
摘要: 环境:centos7.6 ansible:2.9.13 nginx1.18 到nginx官网获得nginx官方yum源方法 1.打开链接:http://nginx.org/en/download.html 2.找到对应版本的yum配置 将信息保存为nginx.reop文件 [root@localho
阅读全文
posted @ 2020-10-23 16:26 水中鱼2018
阅读(230)
评论(0)
推荐(0)
2020年10月20日
ansible批量开启防火墙端口
摘要: 系统环境:centos7 ansible playbook 编写 [root@control ansible]# cat 1-openFirewall.yml - hosts: dlinux remote_user: root tasks: - name: create new dir file:
阅读全文
posted @ 2020-10-20 16:45 水中鱼2018
阅读(1437)
评论(0)
推荐(0)
centos系统备份及恢复(恢复到其它主机需要配置/etc/fstab 下的UUID)
摘要: tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/mnt --exclude=/sys --exclude=/backup.tgz --exclude=/media / 让我们来简单看一下这个命令: “tar”
阅读全文
posted @ 2020-10-20 13:20 水中鱼2018
阅读(1349)
评论(1)
推荐(0)
2020年10月18日
检测服务
摘要: [root@mysql shell]# cat checkService.sh#!/bin/bash services=(nginx java mysqld mongod)checkServices(){ ss -ntlp |grep $1 > /dev/null [ $? -eq 0 ] && e
阅读全文
posted @ 2020-10-18 17:40 水中鱼2018
阅读(137)
评论(0)
推荐(0)
2020年10月17日
数据库备份
摘要: 备份相关存储过程,含有创建数据库create databaseName ;use databaseName; [root@d-mysql205 shell]# cat dbBak_R.sh #!/bin/bashbakPath=/root/mysqlbak/`date +%F`mkdir -p ${
阅读全文
posted @ 2020-10-17 11:55 水中鱼2018
阅读(77)
评论(0)
推荐(0)
下一页
公告