上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 33 下一页

2021年2月8日

用Shell判断字符串包含关系

摘要: 方法一:利用grep查找 strA="long string" strB="string" result=$(echo $strA | grep "${strB}") if [[ "$result" != "" ]] then echo "包含" else echo "不包含" fi 先打印长字符串 阅读全文

posted @ 2021-02-08 14:18 uestc2007 阅读(104) 评论(0) 推荐(0)

shell命令调用http接口(curl方式)

摘要: 样例 1、curl -H "Content-Length:0" -X GET "http://127.0.0.1:8080" 2、curl -H "Content-Type: application/json" -H "connection:Keep-Alive" -s -X POST -d '{" 阅读全文

posted @ 2021-02-08 14:14 uestc2007 阅读(7463) 评论(0) 推荐(0)

shell脚本实现发送信息到钉钉

摘要: 操作步骤 1、钉钉创建群组 2、编写shell脚本 #!/bin/bash time=$(date "+%Y-%m-%d %H:%M:%S") RESULT1=`curl -H "Content-Type: application/json" -s -X POST -d '[{"optType":" 阅读全文

posted @ 2021-02-08 14:12 uestc2007 阅读(1257) 评论(0) 推荐(1)

2021年1月27日

功能测试特殊字符处理总结

摘要: 1 空值NULL1.1概述“NULL”指数据库中具体字段的“NULL”值。NULL是一个不确定的值(NULL represents an unknown value),所以不包括在任何一个指定的集合中。常用数据库有DB2,Sybase,Oracle和MySql,不同数据库对NULL的处理存在差异,容 阅读全文

posted @ 2021-01-27 11:07 uestc2007 阅读(1101) 评论(0) 推荐(0)

2021年1月14日

redis集群批量删除key

摘要: vi del_redis.sh 信息如下: #!/bin/bash # 配置redis-cli地址 redis_cmd=/web/redis-4.0.14/src/redis-cli # 配置reids集群IP地址 redis_ser01=10.0.0.150 redis_ser02=10.0.0. 阅读全文

posted @ 2021-01-14 16:32 uestc2007 阅读(508) 评论(0) 推荐(0)

2021年1月13日

CentOS7集群环境SSH免密访问

摘要: 1.准备工作 1)通过克隆或者其他方式获得可互相通信的多台节点(本文为3台虚拟机:hadoop101、hadoop102、hadoop103) 2)配置节点的静态IP、hostname、hosts [root@hadoop101 jdk1.8.0_121]# vi /etc/hosts 127.0. 阅读全文

posted @ 2021-01-13 14:25 uestc2007 阅读(161) 评论(0) 推荐(0)

CentOS7搭建NTP服务器及客户端同步时间

摘要: 一、服务器配置 1、查看服务器、客户端操作系统版本 [root@hadoop101 ~]# cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core) 2、查看服务器是否安装ntp,系统默认安装ntpdate; [root@hadoop1 阅读全文

posted @ 2021-01-13 14:13 uestc2007 阅读(492) 评论(0) 推荐(0)

CentOS7关闭SELINUX

摘要: 安全增强型Linux(Security-Enhanced Linux)简称SELinux,它是一个 Linux 内核模块,也是Linux的一个安全子系统。为了避免安装过程出现各种错误,建议关闭,有如下两种关闭方法: 1)临时关闭(不建议使用) [root@hadoop101 ~]# setenfor 阅读全文

posted @ 2021-01-13 14:09 uestc2007 阅读(439) 评论(0) 推荐(0)

CentOS7设置hostname、hosts、静态IP地址、关闭防火墙

摘要: 1. 设置hostname 方法1: centos7 里面修改hostname的方式有所改变,修改/etc/hosts和/etc/sysconfig/network两个文件已经不能生效。使用的新命令是: [root@hadoop101 mort]# hostnamectl set-hostname 阅读全文

posted @ 2021-01-13 14:05 uestc2007 阅读(673) 评论(0) 推荐(0)

CentOS7使用集群同步脚本对文件同步分发

摘要: 1.介绍 使用集群同步脚本对文件同步分发 2.操作 1)安装rsync [root@hadoop101 ~]$ yum install rsync 2)在/root目录下创建bin目录,并在bin目录下创建文件xsync,文件内容如下: [root@hadoop101 ~]$ mkdir bin [ 阅读全文

posted @ 2021-01-13 13:55 uestc2007 阅读(428) 评论(0) 推荐(0)

上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 33 下一页

导航