10 2020 档案
摘要:[root@localhost ansible]# cat var.yml hosts: k1 remote_user: root vars: var1: "ls -l />/root/wang20201029.log" tasks: - name: ls shell: "{{var1}}"
阅读全文
摘要:背景 最近有不少客户需要定期更改密码,每次一台一台更改浪费时间,写此过程一劳永逸 编写playbook [root@localhost pw]# cat 1-changePassword.yml hosts: k remote_user: root tasks: - name: change pas
阅读全文
摘要:系统: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
阅读全文
摘要:环境:centos7.6 ansible:2.9.13 nginx1.18 到nginx官网获得nginx官方yum源方法 1.打开链接:http://nginx.org/en/download.html 2.找到对应版本的yum配置 将信息保存为nginx.reop文件 [root@localho
阅读全文
摘要:系统环境:centos7 ansible playbook 编写 [root@control ansible]# cat 1-openFirewall.yml - hosts: dlinux remote_user: root tasks: - name: create new dir file:
阅读全文
摘要:tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/mnt --exclude=/sys --exclude=/backup.tgz --exclude=/media / 让我们来简单看一下这个命令: “tar”
阅读全文
摘要:[root@mysql shell]# cat checkService.sh#!/bin/bash services=(nginx java mysqld mongod)checkServices(){ ss -ntlp |grep $1 > /dev/null [ $? -eq 0 ] && e
阅读全文
摘要:备份相关存储过程,含有创建数据库create databaseName ;use databaseName; [root@d-mysql205 shell]# cat dbBak_R.sh #!/bin/bashbakPath=/root/mysqlbak/`date +%F`mkdir -p ${
阅读全文
摘要:用于升级nginx 升级步骤: 备服:此方法仅限于无用户使用时,停机操作 1.下载最新版本nginx 2.解压到对应地址 3.编译+make(不要make install) 4.备份老的nginx二进制文件 5.将新的二进制文件拷贝到老的nginx目录xia 6.重启nginx 涉及到的变量: 1.
阅读全文
摘要:[root@localhost shell]# cat openFirewalld.sh #!/bin/bash #用于centos7 #用于开启防火墙,打开防火墙中系统打开的端口 #备注:有些需要打开的端口,并没有监听,需要另行打开,如:ftp发送端口(ftp最好用:firewall-cmd --
阅读全文
摘要:备注:最低配置2核4G内存 安装docker-ce ,安装docker-compose 下载harbor1.5版本 wget http://harbor.orientsoft.cn/harbor-v1.5.0/harbor-offline-installer-v1.5.0.tgz 更配置文件 [ro
阅读全文
摘要:目的: 1.方便文件下载,电脑有浏览器 2.支持电脑、手机在web界面浏览文件(默认支持标准MP4、MP3、pdf格式的文件),方便学习 相关环境: centos7 docker-ce nginx:1.18 相关技术: docker shell nginx 暴露8000端口,映射到docker-ng
阅读全文
摘要:方法一(shell安装): [root@iZuf6h0pjb0u8rhjhiqmf8Z ~]# cat 1-install-docker.sh #!/bin/bash set -e yum install -y yum-utils device-mapper-persistent-data lvm2
阅读全文
摘要:[root@192 python3]# cat 1-install-python3.sh set -e#安装相关依赖yum groupinstall -y "Development tools"yum install -y zlib-devel bzip2-devel openssl-devel n
阅读全文

浙公网安备 33010602011771号