先自我介绍一下,小编浙江大学毕业,去过华为、字节跳动等大厂,目前阿里P7
深知大多数程序员,想要提升技能,往往是自己摸索成长,但自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!
因此收集整理了一份《2024年最新Linux运维全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友。
既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上运维知识点,真正体系化!
由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新
如果你需要这些资料,可以添加V获取:vip1024b (备注运维)
正文
memory: 3912796Ki
pods: 210
System Info:
Machine ID: 4a78154c965a40aab1a1693fb8a32f46
System UUID: b2a04d56-33a5-145f-4eae-af3b16123147
Boot ID: dd6b58d2-cb34-4415-af1e-49fc8ac515c9
Kernel Version: 4.19.12-1.el7.elrepo.x86_64
OS Image: CentOS Linux 7 (Core)
Operating System: linux
Architecture: amd64
Container Runtime Version: docker://19.3.13
Kubelet Version: v1.21.0
Kube-Proxy Version: v1.21.0
PodCIDR: 172.30.0.0/25
PodCIDRs: 172.30.0.0/25
Non-terminated Pods: (3 in total)
Namespace Name CPU Requests CPU Limits Memory Requests Memory Limits Age
kube-system coredns-5969657997-fzmph 100m (10%) 0 (0%) 70Mi (1%) 170Mi (4%) 32h
kube-system metrics-server-794dfd4bbb-w5lpc 0 (0%) 0 (0%) 0 (0%) 0 (0%) 32h
kube-system traefik-ingress-controller-hx5zm 0 (0%) 0 (0%) 0 (0%) 0 (0%) 32h
Allocated resources:
(Total limits may be over 100 percent, i.e., overcommitted.)
Resource Requests Limits
cpu 100m (10%) 0 (0%)
memory 70Mi (1%) 170Mi (4%)
ephemeral-storage 0 (0%) 0 (0%)
hugepages-2Mi 0 (0%) 0 (0%)
Events:
## 二.设置Nginx-deployment的yaml文件
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: nginx
name: nginx-deployment
spec:
replicas: 2
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- image: nginx:latest
name: nginx
#标签选择器
nodeSelector:
type: nginx
#设置污点可以调度到对应服务器
tolerations:
- key: “key”
operator: “Equal”
value: “nginx”
effect: “NoSchedule”
### 应用启动
kubectl apply -f nginx-deployment.yaml
### 查看已经调度到对应的服务器
kubectl get pod -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
nginx-deployment-57f94c46b4-5whb5 1/1 Running 0 6h30m 172.17.97.3 192.168.1.232
## 三.设置Nginx配置文件和程序根目录挂载
启动的Nginx使用默认的配置文件和默认的网站根目录,需要使用volume挂载
cat nginx-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: nginx
name: nginx-deployment
spec:
replicas: 1
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- image: nginx:latest
name: nginx
volumeMounts:
- name: conf
mountPath: /etc/nginx
- name: opt
mountPath: /opt
#标签选择器
nodeSelector:
type: nginx
#设置污点可以调度到对应服务器
tolerations:
- key: “key”
operator: “Equal”
value: “nginx”
effect: “NoSchedule”
volumes:
- name: conf
hostPath:
path: /etc/nginx
type: Directory
- name: opt
hostPath:
path: /opt
type: Directory
本次使用了本机挂载hostPath挂载配置文件及根目录,生产环境最好使用pvc挂载
## 四.设置Service对外提供服务
cat nginx-service.yaml
kind: Service
metadata:
labels:
app: nginx
name: nginx-deployment
spec:
ports:
- port: 80
name: nginx-svc8880
protocol: TCP
targetPort: 80
nodePort: 8880
selector:
app: nginx
type: NodePort
PS:使用NodePort启用端口对外提供服务,如果对外映射多个端口需要在port参数下加参数name定义名称,单个端口无需设置参数name
k8s默认使用NodePort对外映射端口为30000-50000如需要映射其他端口需要修改配置文件/opt/kubernetes/cfg/kube-apiserver,修改端口范围
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210625000016284.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl8zNzc5MTMwMw==,size_16,color_FFFFFF,t_70)
## 五、将博客模板导入导入容器
[root@kmaster79111 test]# docker cp 30f9301444d7:/etc/nginx .
[root@kmaster79111 test]# ll
total 0
drwxr-xr-x 5 root root 240 Jun 26 06:25 nginx
[root@kmaster79111 test]# cd nginx/
[root@kmaster79111 nginx]# ll moban5179
total 164
-rw-r–r-- 1 root root 11365 Jan 13 15:50 about.html
-rw-r–r-- 1 root root 21522 Jan 13 15:50 blog-details-fullwidth.html
-rw-r–r-- 1 root root 25133 Jan 13 15:50 blog-details.html
-rw-r–r-- 1 root root 8611 Jan 13 15:50 contact.html
drwxr-xr-x 4 root root 96 Oct 29 2020 css
drwxr-xr-x 7 root root 4096 Oct 29 2020 images
-rw-r–r-- 1 root root 21890 Jan 13 15:50 index-2.html
-rw-r–r-- 1 root root 27032 Jan 13 15:50 index-3.html
-rw-r–r-- 1 root root 27202 Jan 13 15:50 index.html
drwxr-xr-x 2 root root 89 Oct 29 2020 js
drwxr-xr-x 4 root root 31 Oct 29 2020 plugins
-rw-r–r-- 1 root root 3177 Nov 10 2016 ╦╡├ў.htm
[root@kmaster79111 nginx]# ll
total 7832
drwxr-xr-x 2 root root 26 Jun 26 06:31 conf.d
-rw-r–r-- 1 root root 1350222 Jun 25 21:49 Desktop.zip
-rw-r–r-- 1 root root 1007 May 25 20:28 fastcgi_params
drwxr-xr-x 2 root root 4096 Jun 25 21:48 Machine777_CSDN
-rw-r–r-- 1 root root 345563 Jun 25 21:48 Machine777_CSDN.html
-rw-r–r-- 1 root root 5290 May 25 20:28 mime.types
drwxr-xr-x 6 root root 235 Jan 13 15:59 moban5179
-rw-r–r-- 1 root root 6288470 Jun 25 22:25 moban5179.zip
lrwxrwxrwx 1 root root 22 May 25 21:01 modules -> /usr/lib/nginx/modules
-rw-r–r-- 1 root root 648 May 25 21:01 nginx.conf
-rw-r–r-- 1 root root 636 May 25 20:28 scgi_params
-rw-r–r-- 1 root root 664 May 25 20:28 uwsgi_params
[root@kmaster79111 nginx]# vim conf.d/default.conf
[root@kmaster79111 nginx]# cat conf.d/default.conf
server {
listen 80;
listen [::]:80;
server_name localhost;
#access\_log /var/log/nginx/host.access.log main;
location / {
#root /usr/share/nginx/html;
root /etc/nginx/moban5179/;
index index.html about.html blog-details-fullwidth.html blog-details.html contact.html index-2.html index-3.html index.htm;
}
#error\_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。
需要这份系统化的资料的朋友,可以添加V获取:vip1024b (备注运维)
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!
1:80
#
网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。
需要这份系统化的资料的朋友,可以添加V获取:vip1024b (备注运维)
[外链图片转存中…(img-zZhPGcDK-1713343806710)]
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!