原创 Linux Shell 中 "數字"、"字符" 增加的兩種實現方法

方法一 代碼 [dev@testbmj 1111]$ cat 2222.sh #!/bin/bash declare count declare count_str MAX=10 for ((i = 0; i < MAX

原创 zookeeper shell -- zkCli.sh 命令基本使用操作

客戶端命令行操作 基本命令 命令參數 功能描述 addauth addauth scheme auth 創建 && 驗證用戶 close – – config config [-c] [-w] [-s]

原创 CentOS 7 下 zookeeper ACL 超級管理員使用

背景 使用 zookeeper 添加普通賬戶,並給某節點進行賦權,忘記密碼後,無法對該節點進行操作,通過開啓 ACL super 賬戶進行操作。 zkCli 連接 $ zkCli.sh 添加 ACL 測試賬戶 #

原创 CentOS 7 下 redis 部署 && 日常使用

redis 集羣可用性測試 [dev@hessian01 ~]$ redis-cli --cluster check 192.168.8.119:7001 -a 123456 Warning: Using a password

原创 CentOS 7 下邏輯卷擴容

查看磁盤現狀 [root@JH-ZBK-WEB2 ~]# df -h 查看邏輯卷狀態 [root@JH-ZBK-WEB2 ~]# lvdisplay 根據邏輯卷名稱 – 卸載 – 不卸載無法刪除 [root@J

原创 CentOS 7 下 RPM 方式安裝 MySQL 5.7.x

MySQL 下載 MySQL 官網 Download Oracle MySQL 下載 下載 安裝 文件準備 mysql-5.7.19-1.el7.x86_64.rpm-bundle.tar 卸載

原创 ansible 學習記錄(六) -- 條件判斷

Condition When --- - name: test when condition hosts: localhost gather_facts: no vars: seq: - 1

原创 ansible 學習記錄(七) -- group 和 host 變量

inventory 文件定義 [master] master ansible_user=root ansible_password=123456 ansible_connection=ssh [slave] node1 an

原创 ansible 學習記錄(四) -- ansible 概念學習

概覽 Inventory (服務器資源) Playbook (操作) module (模塊) Role (web server) node1 Role (web server)Task (git)Task (serv

原创 ansible 學習記錄(五) -- playbook 學習

Debug 模塊使用 ansible doc – debug module playbook/helloworld.yml --- - name: Hello World hosts: localhost

原创 ansible 學習記錄(一) -- 環境準備

ansible 學習記錄(一) – ansible 安裝 ansible 學習機器準備 hostname system ip cpu mem data username passwd role ansible mas

原创 ansible 學習記錄(三) -- inventory 學習

VS Code 準備 node1 ansible_connection=ssh ansible_user=root ansible_ssh_pass=123456 VS Code 同步 Sync Local -> Re

原创 ansible 學習記錄(三) -- inventory SSH Key 認證方式的實現

Control 節點生成 key [root@master ~]# ssh-keygen ssh-copy-id 分發 [root@master ~]# ssh-copy-id -i .ssh/id_rsa.pub n

原创 ansible 學習記錄(四) -- playbook 學習

Yaml 編寫結構 # key: values name: "Ansible" version: 2.4 python_version: 2.7 # list module: - "Network" - "Linux Ser

原创 ansible 學習記錄(二) -- vs code 遠程連接服務器

環境準備 – VS Code 環境安裝 SFTP 插件安裝 sftp 配置 Ctrl + Shift + p SFTP: Config { "name": "My Server", "hos