摘要:
日志文件保存目录 /var/log/ ##一、两个重要的系统日志文件 message --记录系统或者服务程序运行状态信息和错误信息 secure(安全)重要 -- 用户登录信息 作用:可以监控文件信息,检查是否有过多失败记录 [root@hgg ~]# >/var/log/secure #清空日志 阅读全文
posted @ 2022-01-08 12:25
运维小勾勾
阅读(2042)
评论(0)
推荐(0)
摘要:
1、和程序软件安装相关的目录(/usr/local) [root@hgg ~]# ll -d /usr/local drwxr-xr-x. 12 root root 131 Jun 25 11:41 /usr/local 2、系统中如何安装软件(吃饭) 01、订餐点外卖 (做好的饭 筷子) yum安 阅读全文
posted @ 2022-01-08 12:25
运维小勾勾
阅读(90)
评论(0)
推荐(0)
摘要:
1、系统登录之后提示文件(/etc/motd) 方法一:[root@hgg ~]# vi /etc/motd 方法二:echo "哈哈哈" >> /etc/motd 作用:可以对操作系统的用户进行注意事项说明 2、登录之前提示文件(/etc/issue) /etc/issue==/etc/issue 阅读全文
posted @ 2022-01-08 12:23
运维小勾勾
阅读(51)
评论(0)
推荐(0)
摘要:
[root@hgg ~]# ls -l /etc/hosts -rw-r--r--. 1 root root 180 Jun 29 16:21 /etc/hosts [root@hgg ~]# ll /etc/hosts -rw-r--r--. 1 root root 180 Jun 29 16:2 阅读全文
posted @ 2022-01-08 12:20
运维小勾勾
阅读(194)
评论(0)
推荐(0)
摘要:
1、什么是变量 两种方式解释: 看书 目录 内容 变量 变量值 小学算术题 x+1=5 x=4 已知变量=数值 变量=变量值 1)设置变量的方法(临时生效) [root@hgg ~]# x=1234 [root@hgg ~]# echo $x 1234 2、脚本概念 将多个命令整合在一个文件 阅读全文
posted @ 2022-01-08 12:18
运维小勾勾
阅读(111)
评论(0)
推荐(0)
摘要:
步骤一:摁空格停留 步骤二:摁e进入一下界面 步骤三:找到uft-8,在后面输入 init=/bin/sh,并按 ctrl +x 执行 步骤四:进入如下界面时,输入:mount -o remount,rw / 步骤五: 进入如下界面时,输入passwd,设置密码 步骤六:设置好密码后,进入如下界面, 阅读全文
posted @ 2022-01-08 12:15
运维小勾勾
阅读(157)
评论(0)
推荐(0)
摘要:
1、Windows/linux--系统出现故障--安全模式 系统启动:服务程序 网络 安全服务--启动级别 系统服务启动--启动级别 查看系统运行级别方法: [root@hgg ~]# runlevel N 3 切换运行级别: 1)临时切换 init 级别数值 切换运行级别 centos 7 启 阅读全文
posted @ 2022-01-08 12:12
运维小勾勾
阅读(201)
评论(0)
推荐(0)
摘要:
1、主机名称配置文件(/etc/hostname重要) 如何修改主机名称: centos 7: 临时修改: hostname hgg01(要修改的名称) 永久修改: [root@HGG ~]# vi /etc/hostname [root@HGG01 ~]# cat /etc/hostname 阅读全文
posted @ 2022-01-08 12:09
运维小勾勾
阅读(155)
评论(0)
推荐(0)
摘要:
move(移动)==mv 目录/文件 目标文件/目录 mv命令用法和cp命令类似 a.文件的数据剪切 [root@HGG ~]# mv /hgg/hgg.txt /tmp [root@HGG ~]# ls -ld /tmp/hgg.txt -rw-r--r--. 1 root root 0 Ju 阅读全文
posted @ 2022-01-08 12:03
运维小勾勾
阅读(265)
评论(0)
推荐(0)
摘要:
copy--cp 用法:cp 要复制的数据信息(文件/目录) 复制到什么位置(目录中) a.文件备份方法: [root@HGG ~]# cp /hgg/hgg.txt /tmp •[root@HGG ~]# ls -l /tmp/hgg.txt • -rw-r--r--. 1 root ro 阅读全文
posted @ 2022-01-08 12:02
运维小勾勾
阅读(97)
评论(0)
推荐(0)

浙公网安备 33010602011771号