第十六周-day65-Shell编程day02_判断两数大小,使用传参的方法定义变量,判断参数是否为(1)

echo 1.利用’$(())'计算
echo 加:$1+ 2 = " 2=" 2="(( x + x+ x+y))"
echo 减:$1- 2 = " 2=" 2="(( x − x- xy))"
echo 乘:$1* 2 = " 2=" 2="((KaTeX parse error: Undefined control sequence: \* at position 2: x\̲*̲y))"
echo 除:$1/ 2 = " 2=" 2="(( x / x/ x/y))"
echo 幂:$1* 2 = " 2=" 2="((KaTeX parse error: Undefined control sequence: \* at position 2: x\̲*̲\*y))"
echo 余:$1% 2 = " 2=" 2="(( x x% xy))"
echo ‘###################’
echo 2.利用awk计算
echo 加:$1+ 2 = ‘ 2=` 2=echo|awk -vx= x − v y = x -vy= xvy=y “BEGIN{print x+y}” echo 减:$1+$2= e c h o ∣ a w k − v x = echo|awk -vx= echoawkvx=x -vy=$y “BEGIN{print x-y}” echo 乘:$1+$2= e c h o ∣ a w k − v x = echo|awk -vx= echoawkvx=x -vy=$y “BEGIN{print x*y}” echo 除:$1+$2= e c h o ∣ a w k − v x = echo|awk -vx= echoawkvx=x -vy=$y “BEGIN{print x/y}” echo 幂:$1+$2= e c h o ∣ a w k − v x = echo|awk -vx= echoawkvx=x -vy=$y “BEGIN{print x**y}” echo 余:$1+$2= e c h o ∣ a w k − v x = echo|awk -vx= echoawkvx=x -vy=KaTeX parse error: Expected '}', got '#' at position 43: …@shell scripts]#̲ sh bc02.sh 6 3…(())计算
加:6+3=9
减:6-3=3
乘:6
3=18
除:6/3=2
幂:6**3=216
余:6%3=0
###################
2.利用awk计算
加:6+3=9
减:6+3=3
乘:6+3=18
除:6+3=2
幂:6+3=216
余:6+3=0


#### 3.条件测试表达式


![](https://imgconvert.csdnimg.cn/aHR0cHM6Ly91cGxvYWQtaW1hZ2VzLmppYW5zaHUuaW8vdXBsb2FkX2ltYWdlcy8xNjk1MjE0OS04NmY3ZjRlMjEwZjMyMWM1LnBuZw)  
 ![](https://imgconvert.csdnimg.cn/aHR0cHM6Ly91cGxvYWQtaW1hZ2VzLmppYW5zaHUuaW8vdXBsb2FkX2ltYWdlcy8xNjk1MjE0OS1mNTA0OWE4OTAyOTkyYjQ5LnBuZw)




---


#### 3.2 文件测试表达式


![](https://imgconvert.csdnimg.cn/aHR0cHM6Ly91cGxvYWQtaW1hZ2VzLmppYW5zaHUuaW8vdXBsb2FkX2ltYWdlcy8xNjk1MjE0OS04ZGVmNGVmOGRmZjE1MDViLnBuZw)



[root@shell scripts]# test -L “/bin/sh” && echo ture||echo false
ture
[root@shell scripts]# test -s “/bin/sh” && echo ture||echo false
ture
[root@shell scripts]# test -d “/root” && echo ture||echo false
ture
[root@shell scripts]# test -x “ip.sh” && echo ture||echo false
ture #文件可执行
[root@shell scripts]# test -x “bc.sh” && echo ture||echo false
false #文件不可执行
[root@shell scripts]# test ! -x “bc.sh” && echo ture||echo false
ture #取反
[root@shell scripts]# test -s “bc.sh” && echo ture||echo false
ture #文件存在非空
[root@shell scripts]# test ! -s “bc.sh” && echo ture||echo false
false #取反



##############
#测试表达式
##############
[root@shell scripts]# test -f “/etc/hosts” && echo ture||echo false
ture
[root@shell scripts]# test -f “/etc/host” && echo ture||echo false
false
[root@shell scripts]# test -e “/etc/” && echo ture||echo false
ture
[root@shell scripts]# test -e “/etcetc/” && echo ture||echo false
false
[root@shell scripts]# test -d “/etc/hosts” && echo ture||echo false
false
[root@shell scripts]# test -d “/etc/” && echo ture||echo false
ture
[root@shell scripts]# test -L “/bin/sh” && echo ture||echo false
ture
[root@shell scripts]# test -L “/bin/ls” && echo ture||echo false
false
[root@shell scripts]# test -s “1.sh” && echo ture||echo false
ture
[root@shell scripts]# touch 2.sh
[root@shell scripts]# test -s “2.sh” && echo ture||echo false
false
############
#取反
############
[root@shell scripts]# test ! -x “bc.sh” && echo ture||echo false
ture #取反
[root@shell scripts]# test -s “bc.sh” && echo ture||echo false
ture #文件存在非空
[root@shell scripts]# test ! -s “bc.sh” && echo ture||echo false
false #取反

######################
#测试文件可读可写可执行
######################
[root@shell scripts]# su - oldboy #切换到普通用户下
Last login: Thu May 16 17:01:19 CST 2019 on pts/0
[oldboy@shell ~]$
[oldboy@shell ~]$ test -r “test_01.sh” && echo ture||echo false
false
[oldboy@shell ~]$ test -w “test_01.sh” && echo ture||echo false
false
[oldboy@shell ~]$ test -x “test_01.sh” && echo ture||echo false
false



> 
> ##### **练习**
> 
> 
> 



> 
> ![](https://imgconvert.csdnimg.cn/aHR0cHM6Ly91cGxvYWQtaW1hZ2VzLmppYW5zaHUuaW8vdXBsb2FkX2ltYWdlcy8xNjk1MjE0OS0yODI1Yzg4YTgwMDUxNmVhLnBuZw)  
>  ![](https://imgconvert.csdnimg.cn/aHR0cHM6Ly91cGxvYWQtaW1hZ2VzLmppYW5zaHUuaW8vdXBsb2FkX2ltYWdlcy8xNjk1MjE0OS1kYjkyZjNmOWY4YjlkOWE2LnBuZw)
> 
> 
> 



> 
> 采坑:
> 
> 
> **read读入方式定义的变量写为$1 $2了,与取参的$1 $2冲突了**
> 
> 
> 



[root@shell scripts]# cat testday2-1.sh
#!/bin/bash
##############################################################

File Name: testday2-1.sh

Version: V1.0

Author: lcx

Organization: www.oldboyedu.com

##############################################################
read -p "请输入两个文件的路径: " a b

[ -f $a ]&& echo KaTeX parse error: Expected '}', got 'EOF' at end of input: … echo "第一个文件{a}不存在"
}

[ -f $b ]&& echo KaTeX parse error: Expected '}', got 'EOF' at end of input: … echo "第二个文件{b}不存在"
exit
}
[root@shell scripts]# sh testday2-2.sh
请输入两个文件的路径: xxx yyy
第一个文件xxx不存在
第二个文件yyy不存在
[root@shell scripts]# sh testday2-2.sh
请输入两个文件的路径: bc.sh xxx
bc.sh
第二个文件xxx不存在
[root@shell scripts]# sh testday2-2.sh
请输入两个文件的路径: xxx bc.sh
第一个文件xxx不存在
bc.sh

#2.0版 自动化
[root@shell scripts]# cat testday2-1-1.sh
#!/bin/bash
read -p "请输入指定文件路径: " file

for f in echo $file
do
[ -f $f ]&&echo KaTeX parse error: Expected '}', got 'EOF' at end of input: …在||{ echo "{f}不存在"
}
done
[root@shell scripts]# sh 1.sh
请输入指定文件路径: /server/scripts/1.sh /etc/hosts /etc/hostname
/server/scripts/1.sh /etc/hosts /etc/hostname存在
/server/scripts/1.sh /etc/hosts /etc/hostname存在
/server/scripts/1.sh /etc/hosts /etc/hostname存在




---


#### 3.3 字符串测试表达式


![](https://imgconvert.csdnimg.cn/aHR0cHM6Ly91cGxvYWQtaW1hZ2VzLmppYW5zaHUuaW8vdXBsb2FkX2ltYWdlcy8xNjk1MjE0OS1lNDI0ODlkOWY1YjgyZjY0LnBuZw)



#################
#判断变量是否存在
#################
[root@shell ~]# a=111
[root@shell ~]# b=1111
[root@shell ~]# test “ a " = " a" = " a"="b” && echo ture||echo false
false
[root@shell ~]# test “ a " = " a"=" a"="b” && echo ture||echo false
ture
[root@shell ~]# echo $a
111
[root@shell ~]# echo $b
1111

[root@shell scripts]# test -n “KaTeX parse error: Expected 'EOF', got '&' at position 4: a" &̲& echo ture||ec…a” && echo ture||echo false
false
[root@shell scripts]# echo KaTeX parse error: Expected 'EOF', got '#' at position 27: …@shell scripts]#̲ unset a [root@…a" && echo ture||echo false
false
[root@shell scripts]# test -z “$a” && echo ture||echo false
ture


##### ※3.4 练习


![](https://imgconvert.csdnimg.cn/aHR0cHM6Ly91cGxvYWQtaW1hZ2VzLmppYW5zaHUuaW8vdXBsb2FkX2ltYWdlcy8xNjk1MjE0OS03MzlhNTZiZGFhZTg0OGUxLnBuZw)



> 
> **1. 方法第一种**
> 
> 
> 



#第二种
[root@shell scripts]# cat testday2-3-2.sh
#!/bin/bash

判断传入参数的个数

[ “$#” != “2” ] && {
echo “参数必须为2 Usage <$0 arg1 arg2>”
exit 1
}

# 判断传参是否为整数
expr $1 + $2 + 1 &> /dev/null
[ "$?" != "0" ] && {
  echo "参数必须为整数"
    exit 2
}  

echo -n '相加: '; echo $(($1+$2))
echo -n '相减: '; echo $(($1-$2))
echo -n '相乘: '; echo $(($1\*$2))
echo -n '幂运算: '; echo $(($1\*\*$2))
# 判断除数是否为0
[ "$2" = "0" ] && {
    echo "除数必须不能为0!!!"
        exit 3
    }
    echo -n '相除: '; echo $(($1/$2))
    echo -n '取余: '; echo $(($1%$2))
    [root@shell scripts]# sh testday2-3-2.sh 5 6.1

参数必须为整数
[root@shell scripts]# sh testday2-3-2.sh 5 6 7
参数必须为2 Usage <testday2-3-2.sh arg1 arg2>
[root@shell scripts]# sh testday2-3-2.sh 5 0
相加: 5
相减: 5
相乘: 0
幂运算: 1
除数必须不能为0!!!
[root@shell scripts]# sh testday2-3-2.sh 6 3
相加: 9
相减: 3
相乘: 18
幂运算: 216
相除: 2
取余: 0



> 
> **2.方法第二种**
> 
> 
> 



#第三种 read读入默认2个参数

[root@shell scripts]# cat testday2-5.sh
#!/bin/bash
##############################################################

File Name: testday2-5.sh

Version: V1.0

Author: lcx

Organization: www.oldboyedu.com

##############################################################
read -p “请输入需要计算的内容:” m n

判断传参是否为整数

expr $m + KaTeX parse error: Expected 'EOF', got '&' at position 7: n + 1 &̲> /dev/null [ "?" != “0” ] && {
echo “参数必须为整数”
exit 2
}

echo -n '相加: '; echo ( ( (( ((m+$n))
echo -n '相减: '; echo ( ( (( ((m-$n))
echo -n '相乘: '; echo ( ( (( ((m*$n))
echo -n '幂运算: '; echo ( ( (( ((m**$n))

判断除数是否为0

[ “$n” = “0” ] && {
echo “除数必须不能为0!!!”
exit 3
}
echo -n '相除: '; echo ( ( (( ((m/$n))
echo -n '取余: '; echo ( ( (( ((m%$n))
[root@shell scripts]# sh testday2-5.sh
请输入需要计算的内容:5 6 7
参数必须为整数
[root@shell scripts]# sh testday2-5.sh
请输入需要计算的内容:5 6.1
参数必须为整数
[root@shell scripts]# sh testday2-5.sh
请输入需要计算的内容:5 0
相加: 5
相减: 5
相乘: 0
幂运算: 1
除数必须不能为0!!!
[root@shell scripts]# sh testday2-5.sh
请输入需要计算的内容:4 6
相加: 10
相减: -2
相乘: 24
幂运算: 4096
相除: 0
取余: 4


#### 4. 整数二元比较操作符


![](https://imgconvert.csdnimg.cn/aHR0cHM6Ly91cGxvYWQtaW1hZ2VzLmppYW5zaHUuaW8vdXBsb2FkX2ltYWdlcy8xNjk1MjE0OS1hMjFlMTdmYzUxODA3OGZlLnBuZw)


![](https://imgconvert.csdnimg.cn/aHR0cHM6Ly91cGxvYWQtaW1hZ2VzLmppYW5zaHUuaW8vdXBsb2FkX2ltYWdlcy8xNjk1MjE0OS1jMDliYzQ2ZDNjZWQ5MDk3LnBuZw)



> 
> ##### 查看当前磁盘/当前状态,如果使用率超过10%,则触发报警发邮件
> 
> 
> 



[root@shell scripts]# df -h|awk ‘NR==2{print $(NF-1)}’
11%

[root@shell scripts]# df -h|awk ‘NR==2{print $(NF-1)}’
11%
[root@shell scripts]# cat testday2-6.sh
#!/bin/bash
##############################################################

File Name: testday2-6.sh

Version: V1.0

Author: lcx

Organization: www.oldboyedu.com

##############################################################
#查看当前磁盘/当前状态,如果使用率超过10%,则触发报警发邮件
use=df -h|awk 'NR==2{print $(NF-1)}'
userNum=${use/%/}
[ KaTeX parse error: Expected 'EOF', got '&' at position 18: …erNum -gt 10 ] &̲& { echo "s…use"
echo “shell服务器磁盘使用率超过$use”|mail -s “磁盘不足” 245684979@qq.com
}
[root@shell scripts]# sh testday2-6.sh
shell服务器磁盘使用率超过11%


![image.png](https://imgconvert.csdnimg.cn/aHR0cHM6Ly91cGxvYWQtaW1hZ2VzLmppYW5zaHUuaW8vdXBsb2FkX2ltYWdlcy8xNjk1MjE0OS1iOTI4MTI3MTdiYjRlNjI0LnBuZw)



> 
> ##### 查看内存使用状况,如果占用超过10%,则触发报警
> 
> 
> 



[root@shell day02]# cat testday2-7.sh
#!/bin/bash
##############################################################

File Name: testday2-7.sh

Version: V1.0

Author: lcx

Organization: www.oldboyedu.com

##############################################################
#查看内存使用状况,如果占用超过10%,则触发报警
free=free -h|awk 'NR==2{print $3/$2\*100}'
freeNum=${free/.*/}
[ KaTeX parse error: Expected 'EOF', got '&' at position 17: …reeNum -gt 5 ] &̲& { echo "s…{freeNum}%"
echo “shell服务器内存使用率超过${freeNum}%”|mail -s “内存不足” 245684979@qq.com
}
[root@shell day02]# sh testday2-7.sh
shell服务器内存使用率超过9%


![](https://imgconvert.csdnimg.cn/aHR0cHM6Ly91cGxvYWQtaW1hZ2VzLmppYW5zaHUuaW8vdXBsb2FkX2ltYWdlcy8xNjk1MjE0OS0wYTI4YzkzZjU3MDA5OTliLnBuZw)




---


#### 5.逻辑操作符


![](https://imgconvert.csdnimg.cn/aHR0cHM6Ly91cGxvYWQtaW1hZ2VzLmppYW5zaHUuaW8vdXBsb2FkX2ltYWdlcy8xNjk1MjE0OS1kYjMyZjI5OTJhM2ZlODMxLnBuZw)



#练习查看结果

[ -f ip.sh -a 2 -lt 3 ]&& echo 0||echo 1

0

[ -f ip.sh -a 2 -lt 3 -a 5 -gt 6 ]&& echo 0||echo 1

1

[ -f ip.sh -o 2 -gt 3 ]&& echo 0||echo 1

0

[ -f ip1.sh -o 2 -gt 3 ]&& echo 0||echo 1

1

[ ! -f ip1.sh -o 2 -gt 3 ]&& echo 0||echo 1

0

[ -f ip.sh ] && [ 2 -lt 3 ] && [ 2 -lt 3 ]&&echo 0||echo 1

0

[ -f ip.sh ] && [ 2 -lt 3 ] && [ 2 -eq 3 ]&&echo 0||echo 1

1

[ -f ip.sh ] && [ 2 -lt 3 ] && [ 2 -lt 3 ]&&echo 0||echo 1

0

[[ -f ip.sh ]] && [[ 2 -lt 3 ]] && [[ 3 -gt 2 ]]&&echo 0||echo 1

0




---


#### 6. 练习


![](https://imgconvert.csdnimg.cn/aHR0cHM6Ly91cGxvYWQtaW1hZ2VzLmppYW5zaHUuaW8vdXBsb2FkX2ltYWdlcy8xNjk1MjE0OS05NTliYjc1NzVkYjY1YjhmLnBuZw)



> 
> 1、 输入或者通过命令传入一个字符或者数字,如果传入的数字**等于1就打印1**,如果**等于2就打印2**;如果**不等于1也不等于2,就提示输入不对**,然后退出程序。(两种比较方式任选其一:数字比较或字符串比较)
> 
> 
> 



[root@shell day02]# cat testday2-10.sh
#!/bin/bash
##############################################################

File Name: testday2-10.sh

Version: V1.0

Author: lcx

Organization: www.oldboyedu.com

##############################################################

read -p “请输入一个字符或者数字:” a

[ $a -eq 1 ]&& {
echo $a
exit 0
}||
[ $a -eq 2 ]&& {
echo $a
exit 0
}||
echo 输入错误!
exit 1
}

#[ $a -ne 1 -a $a -ne 2 ]&& echo 输入错误!
[root@shell day02]# sh testday2-10.sh
请输入一个字符或者数字:1
1
[root@shell day02]# sh testday2-10.sh
请输入一个字符或者数字:2
2
[root@shell day02]# sh testday2-10.sh
请输入一个字符或者数字:3
输入错误!



> 
> 2、 开发shell脚本,分别以脚本传参方式和read读入方式比较两个整数大小,用条件表达式(禁止if)进行判断并以屏幕输出的方式提醒用户比较结果。(一共需要开发2个脚本,在传参和read读入方式实现时,需要对变量是否为数字及传参个数是否正确给予提示)
> 
> 
> 



> 
> 1)判断是否是两个参数
> 
> 
> 2)判断是否为整数
> 
> 
> 3)[ 2 -gt 3 ] && echo “2大于3”|| echo “2等于3”|| echo “2小于3“
> 
> 
> 



#第一种
[root@shell scripts]# cat testday2-8.sh
#!/bin/bash
#read读入方式
read -p “请输入两个整数: " a b
#判断是否为整数
expr $a + $b &> /dev/null
[ $? -eq 0 ]&& echo 参数正确!||{
echo “参数必须为整数”
exit 2:
}
[ $a -gt KaTeX parse error: Expected 'EOF', got '&' at position 4: b ]&̲& { echo "数…a] > [$b]”
}
[ $a -lt KaTeX parse error: Expected 'EOF', got '&' at position 4: b ]&̲& { echo "数…a] < [$b] "
}
[ $a -eq KaTeX parse error: Expected 'EOF', got '&' at position 4: b ]&̲& { echo "数…a] = [$b]"
}
[root@shell scripts]# sh testday2-8.sh
请输入两个整数: 5 6
参数正确!
数值对比: [5] < [6]
[root@shell scripts]# sh testday2-8.sh
请输入两个整数: 8 1
参数正确!
数值对比: [8] > [1]
[root@shell scripts]# sh testday2-8.sh
请输入两个整数: 8 8
参数正确!
数值对比: [8] = [8]
[root@shell scripts]# sh testday2-8.sh
请输入两个整数: 2.1 1
参数必须为整数



#第二种
[root@shell scripts]# cat testday2-9.sh
#!/bin/bash
#取参方式
a=$1
b=$2

#判断是否为整数
expr $a + $b &> /dev/null
[ $? -eq 0 ]&& echo 参数正确!||{
echo “参数必须为整数”
exit
}
[ $a -gt KaTeX parse error: Expected 'EOF', got '&' at position 4: b ]&̲& { echo "数…a] > [$b]"
}
[ $a -lt KaTeX parse error: Expected 'EOF', got '&' at position 4: b ]&̲& { echo "数…a] < [$b] "
}
[ $a -eq KaTeX parse error: Expected 'EOF', got '&' at position 4: b ]&̲& { echo "数…a] = [$b]"
}
[root@shell scripts]# sh testday2-9.sh 8 8
参数正确!
数值对比: [8] = [8]
[root@shell scripts]# sh testday2-9.sh 8 6
参数正确!
数值对比: [8] > [6]
[root@shell scripts]# sh testday2-9.sh 6 8
参数正确!
数值对比: [6] < [8]
[root@shell scripts]# sh testday2-9.sh 6 8.1
参数必须为整数



> 
> **3、 打印菜单,按照选择项选择你喜欢的美女**
> 
> 
> 



> 
> 示例菜单:
> 
> 
> 
> ```
> [root@oldboy scripts]# sh meinv.sh
> 
> 1.heijiajia
> 
> 2.高圆圆
> 
> 3.蔡徐坤
> 
> please input the num you like: 
> 
> ```
> 
> 要求:
> 
> 
> 1)当用户输入1时,输出“I guess you like heijiajia”,然后退出脚本
> 
> 
> 2)当用户输入非1-3的字符时,输出“I guess you are not man”,然后退出脚本
> 
> 
> 



[root@shell scripts]# cat caidan.sh
#!/bin/bash
prefix="I guess you like "

#菜单
cat <<EOF
1.heijiajia
2.高圆圆
3.蔡徐坤
EOF

read -p "please input the num you like: " num
[ KaTeX parse error: Expected 'EOF', got '&' at position 15: num -eq "1" ] &̲& { echo "prefix"heijiajia
}
[ KaTeX parse error: Expected 'EOF', got '&' at position 15: num -eq "2" ] &̲& { echo "prefix"高圆圆
}
[ $num -eq “3” ] && {
echo “打篮球那个 Are You OK??”
}

#echo -e “\t1.heijiajia\n\t2.gaoyuanyuan\n\t3.caixukun”

[root@shell scripts]# sh caidan.sh
1.heijiajia
2.高圆圆
3.蔡徐坤
please input the num you like: 1
I guess you like heijiajia
[root@shell scripts]# sh caidan.sh
1.heijiajia
2.高圆圆
3.蔡徐坤
please input the num you like: 2
I guess you like 高圆圆
[root@shell scripts]# sh caidan.sh
1.heijiajia
2.高圆圆
3.蔡徐坤
please input the num you like: 3
打篮球那个 Are You OK??

为了做好运维面试路上的助攻手,特整理了上百道 【运维技术栈面试题集锦】 ,让你面试不慌心不跳,高薪offer怀里抱!

这次整理的面试题,小到shell、MySQL,大到K8s等云原生技术栈,不仅适合运维新人入行面试需要,还适用于想提升进阶跳槽加薪的运维朋友。

本份面试集锦涵盖了

  • 174 道运维工程师面试题
  • 128道k8s面试题
  • 108道shell脚本面试题
  • 200道Linux面试题
  • 51道docker面试题
  • 35道Jenkis面试题
  • 78道MongoDB面试题
  • 17道ansible面试题
  • 60道dubbo面试题
  • 53道kafka面试
  • 18道mysql面试题
  • 40道nginx面试题
  • 77道redis面试题
  • 28道zookeeper

总计 1000+ 道面试题, 内容 又全含金量又高

  • 174道运维工程师面试题

1、什么是运维?

2、在工作中,运维人员经常需要跟运营人员打交道,请问运营人员是做什么工作的?

3、现在给你三百台服务器,你怎么对他们进行管理?

4、简述raid0 raid1raid5二种工作模式的工作原理及特点

5、LVS、Nginx、HAproxy有什么区别?工作中你怎么选择?

6、Squid、Varinsh和Nginx有什么区别,工作中你怎么选择?

7、Tomcat和Resin有什么区别,工作中你怎么选择?

8、什么是中间件?什么是jdk?

9、讲述一下Tomcat8005、8009、8080三个端口的含义?

10、什么叫CDN?

11、什么叫网站灰度发布?

12、简述DNS进行域名解析的过程?

13、RabbitMQ是什么东西?

14、讲一下Keepalived的工作原理?

15、讲述一下LVS三种模式的工作过程?

16、mysql的innodb如何定位锁问题,mysql如何减少主从复制延迟?

17、如何重置mysql root密码?

网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。

需要这份系统化的资料的朋友,可以点击这里获取!

一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!
面试题, 内容 又全含金量又高**

  • 174道运维工程师面试题

1、什么是运维?

2、在工作中,运维人员经常需要跟运营人员打交道,请问运营人员是做什么工作的?

3、现在给你三百台服务器,你怎么对他们进行管理?

4、简述raid0 raid1raid5二种工作模式的工作原理及特点

5、LVS、Nginx、HAproxy有什么区别?工作中你怎么选择?

6、Squid、Varinsh和Nginx有什么区别,工作中你怎么选择?

7、Tomcat和Resin有什么区别,工作中你怎么选择?

8、什么是中间件?什么是jdk?

9、讲述一下Tomcat8005、8009、8080三个端口的含义?

10、什么叫CDN?

11、什么叫网站灰度发布?

12、简述DNS进行域名解析的过程?

13、RabbitMQ是什么东西?

14、讲一下Keepalived的工作原理?

15、讲述一下LVS三种模式的工作过程?

16、mysql的innodb如何定位锁问题,mysql如何减少主从复制延迟?

17、如何重置mysql root密码?

网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。

需要这份系统化的资料的朋友,可以点击这里获取!

一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!

  • 10
    点赞
  • 27
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值