摘要: 数据库: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:55 水中鱼2018 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 方法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 阅读(168) 评论(0) 推荐(0) 编辑
摘要: [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 阅读(73) 评论(0) 推荐(0) 编辑
摘要: 背景 最近有不少客户需要定期更改密码,每次一台一台更改浪费时间,写此过程一劳永逸 编写playbook [root@localhost pw]# cat 1-changePassword.yml hosts: k remote_user: root tasks: - name: change pas 阅读全文
posted @ 2020-10-27 21:07 水中鱼2018 阅读(464) 评论(0) 推荐(0) 编辑
摘要: 系统: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 阅读(67) 评论(0) 推荐(0) 编辑
摘要: 环境: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 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 系统环境: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 阅读(1374) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(1157) 评论(1) 推荐(0) 编辑
摘要: [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 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 备份相关存储过程,含有创建数据库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 阅读(71) 评论(0) 推荐(0) 编辑