摘要: 范例if [ "x${var}" == "x" ]if [ x"$DPVS_TYPE" == x"SNAT" ] 目的防止出现语法错误。 分析因为如果不写x,只用 if [ "${var} == "0" ]来判断${var}的值;当${var}为空或未设置时,语句被解释为 if [ == "0" ] 阅读全文
posted @ 2022-08-24 15:05 Linux_Boy 阅读(271) 评论(0) 推荐(0) 编辑
摘要: CMD特性: 1)启动容器默认执行的命令 2)如果docker run指定了其他命令,cmd命令会被忽略 3)如果定义了多个cmd,只有最后一个会执行 案例: [root@master dockerfile]# cat Dockerfile FROM alpine LABEL mainter='te 阅读全文
posted @ 2022-06-25 17:35 Linux_Boy 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 1 # 创建主题 my-topic1 副本(replication-factor) 3 分区(partitions)3 2 # ./bin/kafka-topics.sh --zookeeper 192.168.37.130:2181,192.168.37.131:2181,192.168.37.1 阅读全文
posted @ 2022-03-04 10:54 Linux_Boy 阅读(100) 评论(0) 推荐(0) 编辑
摘要: # wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo# yum clean all# yum makecache# yum -y install ansible# ansible --versi 阅读全文
posted @ 2022-01-17 09:30 Linux_Boy 阅读(582) 评论(0) 推荐(0) 编辑
摘要: 问题:ansible yum模块安装nginx,提示:No package matching 'nginx' found available, installed or updated [root@ansible ~]# ansible proxy -v -m yum -a "name=nginx 阅读全文
posted @ 2021-12-29 17:45 Linux_Boy 阅读(1042) 评论(1) 推荐(1) 编辑
摘要: [jht@dlpt-pic jsifs-filefw]$ curl -X POST -H 'Content-Type: application/json' -i 10.1.55.168:8124/uploadFile HTTP/1.1 200 Content-Type: text/plain;cha 阅读全文
posted @ 2021-12-13 14:07 Linux_Boy 阅读(136) 评论(0) 推荐(0) 编辑
摘要: [root@ansible yum.repos.d]# wget --help GNU Wget 1.14,非交互式的网络文件下载工具。 用法: wget [选项]... [URL]... 长选项所必须的参数在使用短选项时也是必须的。 启动: -V, --version 显示 Wget 的版本信息并 阅读全文
posted @ 2021-12-05 15:28 Linux_Boy 阅读(318) 评论(0) 推荐(0) 编辑
摘要: [root@ansible ~]# help ulimit ulimit: ulimit [-SHacdefilmnpqrstuvx] [限制] 修改 shell 资源限制。 在允许此类控制的系统上,提供对于 shell 及其创建的进程所可用的 资源的控制。 选项: -S 使用 `soft'(软)资 阅读全文
posted @ 2021-12-05 09:26 Linux_Boy 阅读(139) 评论(0) 推荐(0) 编辑
摘要: Keepalived故障切换转移原理Keepalived Directors 之间的故障切换转移,是通过VRRP协议(Virtual Router Redundancy Protocol 中文虚拟路由器冗余协议)来实现的在Keepalived Directors正常工作时,主Director节点会不 阅读全文
posted @ 2021-11-14 09:47 Linux_Boy 阅读(72) 评论(0) 推荐(0) 编辑
摘要: # FileName: ddos.sh # Revision: 1.0 # Date: 2021-10-25 # Author: Linux_Boy # Description: DDos攻击处理 file=$1 while true; do awk '{print $1}' $1|grep -v 阅读全文
posted @ 2021-10-26 11:25 Linux_Boy 阅读(94) 评论(0) 推荐(0) 编辑