摘要: 实现主机之间跨路由跨网段通讯。写下配置步骤 一,IP地址配置 A [root@localhost network-scripts]# cat ifcfg-eth0 NAME=eth0 DEVICE=eth0 ONBOOT=yes BOOTPROTO=static IPADDR=172.16.0.10 阅读全文
posted @ 2022-05-04 11:53 gg888666 阅读(431) 评论(0) 推荐(0)
摘要: 一、修改原网卡文件和重命名原网卡文件 [root@B network-scripts]# cat ifcfg-eth0 NAME=eth0 DEVICE=eth0 ONBOOT=yes BOOTPROTO=static IPADDR=192.168.0.10 PREFIX=24 二、修改 /etc/ 阅读全文
posted @ 2022-05-04 10:58 gg888666 阅读(111) 评论(0) 推荐(0)
摘要: 数组名[数组下标]=值 root@ls4E7syj1iCHuan:/etc/apt# awk 'BEGIN{students["1"]="aa";students["2"]="bb";students["3"]="cc";for(k in students){print k,students[k]; 阅读全文
posted @ 2022-04-26 15:17 gg888666 阅读(102) 评论(0) 推荐(0)
摘要: OpenSSL是一个开放源代码的软件库包,应用程序可以使用这个包来进行安全通信,避免窃听,同时确认另一端连线者的身份。这个包广泛被应用在互联网的网页服务器上 其主要库是以C语言所写成,实现了基本的加密功能,实现了SSL与TLS协议。 三种子命令: 标准命令 消息摘要命令 加密命令 [root@loc 阅读全文
posted @ 2022-04-24 21:02 gg888666 阅读(446) 评论(0) 推荐(0)
摘要: TLS 1.2 加密传输层 TLS是基于TCP建立两个应用进程之间的安全连接。在客户/服务器应用模式中,为了实现双向身份鉴别,仅仅在服务器端保留固定安全参数并进行单向验证是不够的。因此,有必要为每一次客户机和服务器之间的数据传输过程动态产生上诉安全参数,而且这些安全参数在每一次数据传输过程结束后自动 阅读全文
posted @ 2022-04-24 15:38 gg888666 阅读(287) 评论(0) 推荐(0)
摘要: 一,条件测试 1, 数值测试 [root@rocky ~]# ##[ $a -gt $b ] [root@rocky ~]# [ $A -gt $b ] [root@rocky ~]# [ $a -gt $b ] [root@rocky ~]# echo $? 1 注意:[ ]中间必须有空格否则会报 阅读全文
posted @ 2022-04-24 13:31 gg888666 阅读(99) 评论(0) 推荐(0)
摘要: /etc/pki/tls/certs[root@centos7 certs]# make [root@centos7 certs]# cat Makefile |grep 128 /usr/bin/openssl genrsa -aes128 $(KEYLEN) > $@ make /data2/c 阅读全文
posted @ 2022-04-24 13:28 gg888666 阅读(377) 评论(0) 推荐(0)
摘要: 1,取用户 awk -F: '{print $1}' /etc/passwd 2,取分区和利用率 df | awk -F" +|%" '{print $1,$5}' 3,访问IP前三名 awk '{print $1}' access_log |sort |uniq -c|sort -nr|head 阅读全文
posted @ 2022-04-24 13:26 gg888666 阅读(51) 评论(0) 推荐(0)
摘要: 模式PATTERN PATTERN:根据pattern条件,过滤匹配的行,再做处理 如果未指定:空模式,匹配每一行 /regular expression/:仅处理能够模式匹配到的行,需要用/ /括起来 [root@localhost ~]# ss -nt | awk "/^ESTAB/" ESTA 阅读全文
posted @ 2022-04-24 13:25 gg888666 阅读(83) 评论(0) 推荐(0)
摘要: awk -F: '{print $1,$3}' /etc/passwd awk -F: 'BEGIN{print "begin"}{print $1,$3}END{print "end"}' /etc/passwd root@ubuntu2004:~# df | awk -F" +|%" '{pri 阅读全文
posted @ 2022-04-24 13:24 gg888666 阅读(217) 评论(0) 推荐(0)