03 2022 档案

摘要:描述TCP和UDP区别 TCP协议:这是一个面向连接的传输协议.优点:数据可靠性高.缺点:相对UDP来说速度较慢,连接和断开较为繁琐. UDP协议:这是一个无连接的简单的面向数据报的传输层协议优点:速度快缺点:无法保证数据是完整的. 补充:1、基于连接与无连接;2、对系统资源的要求(TCP较多,UD 阅读全文
posted @ 2022-03-29 15:26 海月如希 阅读(42) 评论(0) 推荐(0) 编辑
摘要:TCP三次握手 说明 第一次:Client发送一个SYN段指明Client打算连接的Server的端口,以及初始序号seq 第二次:Server发回包含Server的初始序号的SYN报文段作为应答。同时,将确认序号ACK设置为Client的seq+1以对Client的SYN报文段进行确认。一个SYN 阅读全文
posted @ 2022-03-29 15:22 海月如希 阅读(29) 评论(0) 推荐(0) 编辑
摘要:OSI七层 7.应用层:各种应用程序协议,如HTTP、FTP、SMTP、POP3 6.表示层:信息的语法语意以及它们的联系,如加密解密、转换翻译、压缩解压缩。 5.会话层:不同机器上的用户之间建立及管理会话。 4.传输层:接收上一层的数据,在必要的时候把数据进行分割,并将这些数据交给网络层,且保证p 阅读全文
posted @ 2022-03-29 15:04 海月如希 阅读(104) 评论(0) 推荐(0) 编辑
摘要:一、配置物理网卡 [root@centos8 ~]#cat /etc/sysconfig/network-scripts/ifcfg-ens33NAME=ens33DEVICE=ens33BOOTPROTO=noneMASTER=bond0SLAVE=yesONBOOT=yes[root@cento 阅读全文
posted @ 2022-03-29 10:07 海月如希 阅读(110) 评论(0) 推荐(0) 编辑
摘要:apt install 安装软件包 apt remove 移除软件包 apt purge 移除软件包及配置文件 apt update 刷新存储库索引 apt search 搜索应用程序 apt show 显示安装细节 apt list 列出包含条件的包(已安装,可升级等) apt edit-sour 阅读全文
posted @ 2022-03-25 10:30 海月如希 阅读(133) 评论(0) 推荐(0) 编辑
摘要:echo /etc/fstab | sed -nr 's#(^\/.*)\/(.*)#\1#p' echo /etc/fstab | sed -nr 's#(^\/.*)\/(.*)#\2#p' 搜索 复制 阅读全文
posted @ 2022-03-24 20:00 海月如希 阅读(44) 评论(0) 推荐(0) 编辑
摘要:cat /etc/fstab |sed -r 's/^#\ ?(.*)/\1/'| sed '/^$/d' 搜索 复制 阅读全文
posted @ 2022-03-24 15:25 海月如希 阅读(47) 评论(0) 推荐(0) 编辑
摘要:ifconfig ens33 | sed -nr '/inet/s#(.*inet)(.*)( n.*)#\2#gp' 搜索 复制 阅读全文
posted @ 2022-03-24 10:54 海月如希 阅读(17) 评论(0) 推荐(0) 编辑
摘要:下载httpd2.4源码包到当前路径,并解压 [root@centos7 data]#tar -xvf httpd-2.4.25 使用yum安装若干依赖包: [root@centos7 data]#yum install gcc openssl-devel pcre-devel apr-devel 阅读全文
posted @ 2022-03-23 10:35 海月如希 阅读(43) 评论(0) 推荐(0) 编辑
摘要:配置本地源 [root@localhost ~]# mkdir /yum [root@localhost ~]# mount /dev/cdrom /yum [root@localhost ~]# ls /yum [root@localhost ~]# rm -rf /etc/yum.repos.d 阅读全文
posted @ 2022-03-23 10:19 海月如希 阅读(34) 评论(0) 推荐(0) 编辑
摘要:tr,translate的简写,即翻译的意思。主要用来从标准输入中通过替换或删除操作进行字符转换。只接受标准输入,不接受文件参数。 命令语法: tr [–c/d/s/t] [SET1] [SET2] 参数解释: SET1/SET2: 字符集-c: complement,用SET2替换SET1中没有包 阅读全文
posted @ 2022-03-16 15:55 海月如希 阅读(436) 评论(0) 推荐(0) 编辑
摘要:#!/bin/bash echo "MY hostname is `hostname`"echo "My IPv4 address is `ifconfig | egrep -w "inet" | head -n1 | tr -s " " ":" | cut -d: -f4` "echo "My K 阅读全文
posted @ 2022-03-16 10:41 海月如希 阅读(117) 评论(0) 推荐(0) 编辑
摘要:#!/bin/bash maxuse=`df | grep "/dev/sd" | tr -s " " ":" | cut -d : -f5 | sort -nr | head -n1` echo $maxuse 阅读全文
posted @ 2022-03-16 09:39 海月如希 阅读(112) 评论(0) 推荐(0) 编辑
摘要:ss -nt |tr -s " " :|cut -d: -f6|sort | uniq -c |sort -nr 阅读全文
posted @ 2022-03-16 09:23 海月如希 阅读(42) 评论(0) 推荐(0) 编辑
摘要:cat /etc/passwd | cut -d: -f1,3,7 | sort -t: -k2 -n | tail -n1 阅读全文
posted @ 2022-03-15 14:47 海月如希 阅读(35) 评论(0) 推荐(0) 编辑
摘要:统计个数: cat /etc/passwd | grep -v /sbin/nologin | wc -l 将符合条件的用户显示出来: cat /etc/passwd | grep -v /sbin/nologin | cut -d: -f 1 阅读全文
posted @ 2022-03-15 14:24 海月如希 阅读(68) 评论(0) 推荐(0) 编辑
摘要:[root@Centos8 ~]# useradd user1;useradd user2;useradd user3 [root@Centos8 ~]# mkdir /data/test [root@Centos8 ~]# ls /datatest 1、目录/data/test属主、属组为user 阅读全文
posted @ 2022-03-09 15:28 海月如希 阅读(1096) 评论(0) 推荐(0) 编辑
摘要:(1)、创建组distro,其GID为2019; groupadd -g 2019 distro (2)、创建用户mandriva, 其ID号为1005;基本组为distro; useradd -u 1005 -g distro mandriva id mandriva (3) 、创建用户magei 阅读全文
posted @ 2022-03-07 16:58 海月如希 阅读(29) 评论(0) 推荐(0) 编辑
摘要:cat /etc/issue | tr '[:lower:]' '[:upper:]' > /tmp/issue.out 阅读全文
posted @ 2022-03-07 15:58 海月如希 阅读(8) 评论(0) 推荐(0) 编辑
摘要:cp -rf p*[^0-9] /tmp/mytest1/ 阅读全文
posted @ 2022-03-07 15:45 海月如希 阅读(30) 评论(0) 推荐(0) 编辑
摘要:1 目录结构 bin 存放普通用户的二进制命令,如/bin/date、/bin/ls sbin 存放管理员用户的二进制命令 ,如/sbin/service usr 存放系统文件,相当于C:\Windows /usr/local软件安装的目录,相当于C:\program lib lib lib64 统 阅读全文
posted @ 2022-03-04 09:49 海月如希 阅读(212) 评论(0) 推荐(0) 编辑
摘要:[root@localhost ~]# []:这是提示符的分隔符号,没有特殊含义。 root:显示的是当前的登录用户,笔者现在使用的是 root 用户登录。 @:分隔符号,没有特殊含义。 localhost:当前系统的简写主机名(完整主机名是 localhost.localdomain)。 ~:代表 阅读全文
posted @ 2022-03-04 09:43 海月如希 阅读(108) 评论(0) 推荐(0) 编辑
摘要:1 一切皆文件 2 小型,单一用途的程序 3 连接程序,共同完成复杂功能 4 避免令人困惑的用户界面 5 配置数据存储在文本中 解释: 一切皆文件:是 Unix/Linux 的基本哲学之一。不仅普通的文件,目录、字符设备、块设备、 套接字等在 Unix/Linux 中都是以文件被对待;它们虽然类型不 阅读全文
posted @ 2022-03-02 09:09 海月如希 阅读(67) 评论(0) 推荐(0) 编辑
摘要:第一步 echo 'export HISTTIMEFORMAT="%F %T"' >>/etc/profile 第二步 source /etc/profile 第三步 重新执行history命令,发现显示历史命令使用的时间了 阅读全文
posted @ 2022-03-01 10:36 海月如希 阅读(134) 评论(0) 推荐(0) 编辑
摘要:1 选择安装Ubuntu 2 选择语言 3 手动编辑网卡 4 配置硬盘分区 5 配置存储 6 配置用户名和密码 7 安装SSH 8 开始安装 9 以普通用户登录 阅读全文
posted @ 2022-03-01 10:27 海月如希 阅读(81) 评论(0) 推荐(0) 编辑
摘要:1 首先选择安装CentOS 2 配置手动分区 3 配置网卡 4 点击开始安装 5 创建用户 6 开始安装 7 root用户登录 8 切换到普通用户登录 阅读全文
posted @ 2022-03-01 10:09 海月如希 阅读(670) 评论(0) 推荐(0) 编辑