摘要: openssl rand -base64 8 阅读全文
posted @ 2021-08-13 17:23 从零到1 阅读(20) 评论(0) 推荐(0) 编辑
摘要: shell 编程 for while until 循环命令 执行机制:依次将列表中的元素赋值给“变量名”;每次赋值后即执行依次循环体,直到列表中的元素耗尽,循环结束。 for循环格式1: for 变量名 in 列表 do 循环体 done for循环格式2: for ((控制变量初始化;条件判断表达 阅读全文
posted @ 2021-08-13 00:03 从零到1 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 路由配置文件 永久生效:/etc/sysconfig/network-scripts/route-网卡名(此文件默认不存在,需要手工创建) 格式:10.0.0.0/8 via 172.16.0.1(getway)一块网卡配置多个IP地址 临时生效:ifconfig eth0:1 192.168.1. 阅读全文
posted @ 2021-08-11 10:35 从零到1 阅读(527) 评论(0) 推荐(0) 编辑
摘要: Linux主机名修改位置 centos6以下配置文件:cat /etc/sysconfig/network 临时设置:hostname xunj 永久设置:修改/etc/sysconfig/network 文件里HOSTNAME=xunj (需要重启系统) centos7以上配置文件:cat /et 阅读全文
posted @ 2021-08-10 23:30 从零到1 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 1、打包/etc/目录下面所有conf结尾的文件,压缩包名称为当天的时间,并拷贝到/usr/local/src目录备份。find /etc/ -regex ".*conf$"|xargs tar -zcvf `date +%F`.tar.gz;cp `date +%F`.tar.gz /usr/lo 阅读全文
posted @ 2021-07-09 09:52 从零到1 阅读(39) 评论(0) 推荐(0) 编辑
摘要: yum厂库配置:1、安装HTTP服务yum -y install httpd2、挂载镜像文件mkdir -p /var/www/html/Centos/7/mount /dev/sr0 /var/www/html/Centos/7/客户端配置:[Base]name=Centos-basebaseur 阅读全文
posted @ 2021-07-08 21:41 从零到1 阅读(52) 评论(0) 推荐(0) 编辑
摘要: 1、复制/etc/profile至/tmp/目录,用查找替换命令删除/tmp/profile文件中的 行首的空白字符 cp /etc/profile /tmp/ :%s/^ \+//g 2、在vim中设置tab缩进为4个字符 进入扩展模式 : :set tabstop=4 3、20分钟内通关vimt 阅读全文
posted @ 2021-06-27 22:09 从零到1 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 1、按系列罗列Linux的发行版,并描述不同发行版之间的联系与区别。 linux的发行版: RedHat、suse、红旗、debian、Ubuntu、centos等,主流有suse、centos、Redhat、ubuntu Redhat: RHEL: RedHat Enterprise Linux, 阅读全文
posted @ 2021-06-14 23:04 从零到1 阅读(219) 评论(0) 推荐(0) 编辑
摘要: iptables防火墙应用 一、iptables防火墙基础; 二、iptables规则编写; 三、实战演练; 一、iptables防火墙基础; 1.概述:保护内部主机和内部网络的安全,通过过滤的方式对网络层的ip地址和端口进行处理; 2.了解防火墙: 硬件防火墙:ASA 软件防火墙:iptables 阅读全文
posted @ 2020-07-27 22:16 从零到1 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 配置方式: # For details see man 4 crontabs # Example of job definition:# . minute (0 - 59)# | . hour (0 - 23)# | | . day of month (1 - 31)# | | | . month 阅读全文
posted @ 2020-07-23 22:32 从零到1 阅读(175) 评论(0) 推荐(0) 编辑