为了做好运维面试路上的助攻手,特整理了上百道 【运维技能栈面试题集锦】 ,让你面试不慌心不跳,高薪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+ 道面试题, 内容 又全含金量又高
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行业感爱好的新人,都欢迎参加我们的的圈子(技能交换、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习发展!
标签就是给commit起一个别名,轻易记忆
- #添加标签
- git log --oneline
- git tag v1.2 ----> 给当前版本打标签
- git tag -a v1.0 -m '注释,优化了修复了什么' <commit的ID>
- #删除标签
- git tag -d v1.2
- [root@k8s-node2 demo]# git log --oneline
- b8e21cc add test.txt
- 9d5ab15 add test.txt
- 382f080 add test.txt
- ff6047d add file6 file7
- b693580 add file6 file7
- 58bea1a add three file
- fe9e8c2 add two file
- [root@k8s-node2 demo]# git tag
- [root@k8s-node2 demo]# git tag v1.2
- [root@k8s-node2 demo]# git tag
- v1.2
- [root@k8s-node2 demo]# git show v1.2
- commit b8e21cc519dfd918ee880831e37585afcdf73410
- Author: oldqiang <296917342@qq.com>
- Date: Mon Sep 23 12:03:35 2019 +0800
- add test.txt
- diff --git a/demo/test.txt b/demo/test.txt
- index 69f66d3..d99f9f0 100644
- --- a/demo/test.txt
- +++ b/demo/test.txt
- @@ -1,3 +1,3 @@
- 11111
- -aaaaa
- +22222
- 33333
- [root@k8s-node2 demo]# git tag -a v1.0 -m 'v1.0 add 后裔' fe9e8c2
- [root@k8s-node2 demo]# git tag
- v1.0
- v1.2
- [root@k8s-node2 demo]# git show v1.0
- tag v1.0
- Tagger: oldqiang <296917342@qq.com>
- Date: Mon Sep 23 12:18:45 2019 +0800
- v1.0 add 后裔
- commit fe9e8c25cfb61eb63da6681dc09d054cd5739243
- Author: oldqiang <296917342@qq.com>
- Date: Mon Sep 23 10:44:54 2019 +0800
- add two file
- diff --git a/file1 b/file1
- new file mode 100644
- index 0000000..5721413
- --- /dev/null
- +++ b/file1
- @@ -0,0 +1 @@
- +423
复制代码 扩展
Git 打补丁-- patch 和 diff 的使用
diff
patch 打补丁,创建补丁,卸载补丁
git克隆 码云网站复制项目链接
[外链图片转存失败(img-ZksPvapA-1569213856173)(https://upload-images.jianshu.io/upload_images/16952149-dc299a71ec5aeca1.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)]
9. git长途仓库gitee
- ssh-keygen -t rsa
- cat /root/.ssh/id_rsa.pub
- cd /root/demo/
- ll
- git remote add origin git@gitee.com:linuxcx/linux.git
- git push -u origin master
复制代码 10. gitlab安装
- #上传gitlab-ce-11.9.11-ce.0.el7.x86\_64.rpm到当前目录
- echo "192.168.37.202 mirrors.aliyun.com" >>/etc/hosts
- curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
- yum localinstall gitlab-ce-11.9.11-ce.0.el7.x86_64.rpm -y
- vim /etc/gitlab/gitlab.rb
- #设置访问url和关闭prometheus
- external_url 'http://http://gitlablcx.com'
- prometheus_monitoring['enable'] = false
- #配置gitlab通过smtp发送邮件
- [root@k8s-node2 demo]# vim /etc/gitlab/gitlab.rb
- gitlab_rails['gitlab\_email\_enabled'] = true
- gitlab_rails['gitlab\_email\_from'] = '245684979@qq.com'
- gitlab_rails['gitlab\_email\_display\_name'] = 'linux\_gitlab'
- gitlab_rails['smtp\_enable'] = true
- gitlab_rails['smtp\_address'] = "smtp.qq.com"
- gitlab_rails['smtp\_port'] = 465
- gitlab_rails['smtp\_user\_name'] = "245684979"
- gitlab_rails['smtp\_password'] = "lvlina.199625"
- gitlab_rails['smtp\_domain'] = "qq.com"
- gitlab_rails['smtp\_authentication'] = "login"
- gitlab_rails['smtp\_enable\_starttls\_auto'] = true
- gitlab_rails['smtp\_tls'] = true
- #重新配置
- gitlab-ctl reconfigure
复制代码 11.gitlab汉化
- #下载汉化包
- https://gitlab.com/xhang/gitlab
- gitlab-ctl stop
- tar xf gitlab-11-9-stable-zh.tar.gz
- \cp -a gitlab-11-9-stable-zh/* /opt/gitlab/embedded/service/gitlab-rails/
复制代码
12. gitlab-用户-用户组-项目之间的关系
先创建用户组,在基于用户组创建项目,最后创建用户,编辑用户组,添加成员,注意权限
13. gitlab备份和规复
- #备份
- gitlab-rake gitlab:backup:create
- #恢复
- gitlab-ctl stop
- gitlab-rake gitlab:backuip:restore BACKUP=1510472027_2019_09_23_9.4.5
- gitlab-ctl start
- vim /etc/gitlab/gitlab.rb
- gitlab_rails['manage\_backup\_path'] = true
- gitlab_rails['backup\_path'] = "/var/opt/gitlab/backups"
- gitlab_rails['backup\_keep\_time'] = 604800
- #迁移云主机
- 先备份,云主机安装相同版本,恢复
- #更新配置
- gitlab-ctl reconfigure
复制代码 14.gitlab版本升级
- gitlab升级,要小版本跨 10--->11--->12
复制代码 扩展内容:
1.安装svn服务器,将svn中的数据迁徙到git仓库
git-svn
git clone svn
svn是一个中心化的版本控制工具,git是分布式的,每个人都可以有完备的代码仓库
- #安装svn
- yum install subversion -y
- mkdir /svn/repo -p
- #初始化仓库
- svnadmin create /svn/repo
- cd /svn/repo/conf
- vim svnserve.conf
- [general]
- anon-access = none
- auth-access = write
- password-db = passwd
- authz-db = authz
- realm = /svn/repo
- [sasl]
- vim passwd
- [users]
- admin = 123456
- vim authz
- [/]
- admin = rw
- test = r
- 启动svn服务
- svnserve -d -r /svn/repo
- #svn迁移到git
- yum install git-svn -y
- git svn clone svn://10.0.0.13 --username=admin --no-metadata --authors-file=password.txt git
- cat password.txt
- admin=<245684979@qq.com>
复制代码 2.找回gitlab的root密码
- [/code] [size=4]2. 持续摆设[/size]
- gitlab, lb(摆设服务器), web01,web02
- [code]#lb01,web01,web02都按照nginx
- echo "192.168.37.202 mirrors.aliyun.com" >>/etc/hosts
- curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
- curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
- yum install nginx -y
- #创建upstream资源池文件
- vim /etc/nginx/upstream_monitor
- server 10.0.0.7;
- server 10.0.0.8;
- #配置lb01负载均衡
- vim /etc/nginx/nginx.conf
- worker_processes 1;
- events {
- worker_connections 1024;
- }
- http {
- include mime.types;
- default_type application/octet-stream;
- sendfile on;
- keepalive_timeout 65;
- upstream monitor {
- include /etc/nginx/upstream_monitor;
- }
- server {
- listen 80;
- server_name monitor.oldqiang.com;
- location / {
- proxy_pass http://monitor;
- proxy_set_header Host $host;
- proxy_set_header X-Forwarded-For $remote\_addr;
- }
- }
- }
- nginx -t
- systemctl restart nginx
- systemctl enable nginx
- #配置web01和web02,文件内容相同
- vi /etc/nginx/nginx.conf
- worker_processes 1;
- events {
- worker_connections 1024;
- }
- http {
- include mime.types;
- default_type application/octet-stream;
- sendfile on;
- keepalive_timeout 65;
- server {
- listen 80;
- server_name monitor.oldqiang.com;
- location / {
- root /code/web;
- index index.html index.htm;
- }
- }
- }
- nginx -t
- systemctl restart nginx
- systemctl enable nginx
- #在web01和web02创建首页并创建软连接
- [root@cx01 nginx]# cd /code/
- [root@cx01 code]# mkdir web\_v1
- [root@cx01 code]# echo web01 >web\_v1/index.html
- [root@cx01 code]# ln -s web\_v1 web
- [root@cx01 code]# ll
- total 0
- lrwxrwxrwx 1 root root 6 Sep 24 11:11 web -> web_v1
- drwxr-xr-x 2 root root 24 Sep 24 11:11 web_v1
- [root@web02 code]# cd /code/
- [root@web02 code]# mkdir web\_v1
- [root@web02 code]# echo web02 >web\_v1/index.html
- [root@web02 code]# ln -s web\_v1 web
- [root@web02 code]# ll
- total 0
- lrwxrwxrwx 1 root root 6 Sep 24 11:12 web -> web_v1
- drwxr-xr-x 2 root root 24 Sep 24 11:12 web_v1
- #在windows上做hosts解析
- C:\Windows\System32\drivers\etc\hosts
- 10.0.0.5 http://monitor.lcx.com/
复制代码
新建项目
流程
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。 |