一份詳盡的利用 Kubeadm部署 Kubernetes 1.13.1 集群指北

2019獨角獸企業重金招聘Python工程師標準>>> hot3.png

我的最新版桌面


概 述

Kubernetes集群的搭建方法其實有多種,比如我在之前的文章《利用K8S技術棧打造個人私有云(連載之:K8S集群搭建)》中使用的就是二進制的安裝方法。雖然這種方法有利于我們理解 k8s集群,但卻過于繁瑣。而 kubeadm是 Kubernetes官方提供的用于快速部署Kubernetes集群的工具,其歷經發展如今已經比較成熟了,利用其來部署 Kubernetes集群可以說是非常好上手,操作起來也簡便了許多,因此本文詳細敘述之。

注: 本文首發于 My Personal Blog:CodeSheep·程序羊,歡迎光臨 小站


節點規劃

本文準備部署一個 一主兩從三節點 Kubernetes集群,整體節點規劃如下表所示:

主機名IP角色
k8s-master192.168.39.79k8s主節點
k8s-node-1192.168.39.77k8s從節點
k8s-node-2192.168.39.78k8s從節點

下面介紹一下各個節點的軟件版本:

  • 操作系統:CentOS-7.4-64Bit
  • Docker版本:1.13.1
  • Kubernetes版本:1.13.1

所有節點都需要安裝以下組件:

  • Docker:不用多說了吧
  • kubelet:運行于所有 Node上,負責啟動容器和 Pod
  • kubeadm:負責初始化集群
  • kubectl: k8s命令行工具,通過其可以部署/管理應用 以及CRUD各種資源

準備工作

  • 所有節點關閉防火墻
systemctl disable firewalld.service 
systemctl stop firewalld.service
  • 禁用SELINUX
setenforce 0vi /etc/selinux/config
SELINUX=disabled
  • 所有節點關閉 swap
swapoff -a
  • 設置所有節點主機名
hostnamectl --static set-hostname  k8s-master
hostnamectl --static set-hostname  k8s-node-1
hostnamectl --static set-hostname  k8s-node-2
  • 所有節點 主機名/IP加入 hosts解析

編輯 /etc/hosts文件,加入以下內容:

192.168.39.79 k8s-master
192.168.39.77 k8s-node-1
192.168.39.78 k8s-node-2

組件安裝

0x01. Docker安裝(所有節點)

不贅述 ! ! !

0x02. kubelet、kubeadm、kubectl安裝(所有節點)

  • 首先準備repo
cat>>/etc/yum.repos.d/kubrenetes.repo<<EOF
[kubernetes]
name=Kubernetes Repo
baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/
gpgcheck=0
gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg
EOF
  • 然后執行如下指令來進行安裝
setenforce 0
sed -i 's/^SELINUX=enforcing$/SELINUX= disabled/' /etc/selinux/configyum install -y kubelet kubeadm kubectl
systemctl enable kubelet && systemctl start kubelet

安裝kubelet kubeadm kubectl


Master節點配置

0x01. 初始化 k8s集群

為了應對網絡不暢通的問題,我們國內網絡環境只能提前手動下載相關鏡像并重新打 tag :

docker pull mirrorgooglecontainers/kube-apiserver:v1.13.1
docker pull mirrorgooglecontainers/kube-controller-manager:v1.13.1
docker pull mirrorgooglecontainers/kube-scheduler:v1.13.1
docker pull mirrorgooglecontainers/kube-proxy:v1.13.1
docker pull mirrorgooglecontainers/pause:3.1
docker pull mirrorgooglecontainers/etcd:3.2.24
docker pull coredns/coredns:1.2.6
docker pull registry.cn-shenzhen.aliyuncs.com/cp_m/flannel:v0.10.0-amd64docker tag mirrorgooglecontainers/kube-apiserver:v1.13.1 k8s.gcr.io/kube-apiserver:v1.13.1
docker tag mirrorgooglecontainers/kube-controller-manager:v1.13.1 k8s.gcr.io/kube-controller-manager:v1.13.1
docker tag mirrorgooglecontainers/kube-scheduler:v1.13.1 k8s.gcr.io/kube-scheduler:v1.13.1
docker tag mirrorgooglecontainers/kube-proxy:v1.13.1 k8s.gcr.io/kube-proxy:v1.13.1
docker tag mirrorgooglecontainers/pause:3.1 k8s.gcr.io/pause:3.1
docker tag mirrorgooglecontainers/etcd:3.2.24 k8s.gcr.io/etcd:3.2.24
docker tag coredns/coredns:1.2.6 k8s.gcr.io/coredns:1.2.6
docker tag registry.cn-shenzhen.aliyuncs.com/cp_m/flannel:v0.10.0-amd64 quay.io/coreos/flannel:v0.10.0-amd64docker rmi mirrorgooglecontainers/kube-apiserver:v1.13.1 ? ? ? ? ??
docker rmi mirrorgooglecontainers/kube-controller-manager:v1.13.1 ?
docker rmi mirrorgooglecontainers/kube-scheduler:v1.13.1 ? ? ? ? ??
docker rmi mirrorgooglecontainers/kube-proxy:v1.13.1 ? ? ? ? ? ? ??
docker rmi mirrorgooglecontainers/pause:3.1 ? ? ? ? ? ? ? ? ? ? ? ?
docker rmi mirrorgooglecontainers/etcd:3.2.24 ? ? ? ? ? ? ? ? ? ? ?
docker rmi coredns/coredns:1.2.6
docker rmi registry.cn-shenzhen.aliyuncs.com/cp_m/flannel:v0.10.0-amd64

準備好的鏡像

然后再在 Master節點上執行如下命令初始化 k8s集群:

kubeadm init --kubernetes-version=v1.13.1 --apiserver-advertise-address 192.168.39.79 --pod-network-cidr=10.244.0.0/16
  • --kubernetes-version: 用于指定 k8s版本
  • --apiserver-advertise-address:用于指定使用 Master的哪個network interface進行通信,若不指定,則 kubeadm會自動選擇具有默認網關的 interface
  • --pod-network-cidr:用于指定Pod的網絡范圍。該參數使用依賴于使用的網絡方案,本文將使用經典的flannel網絡方案。

執行命令后,控制臺給出了如下所示的詳細集群初始化過程:

[root@localhost ~]# kubeadm init --config kubeadm-config.yaml
W1224 11:01:25.408209   10137 strict.go:54] error unmarshaling configuration schema.GroupVersionKind{Group:"kubeadm.k8s.io", Version:"v1beta1", Kind:"ClusterConfiguration"}: error unmarshaling JSON: while decoding JSON: json: unknown field "\u00a0 podSubnet”
[init] Using Kubernetes version: v1.13.1
[preflight] Running pre-flight checks
[preflight] Pulling images required for setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[preflight] You can also perform this action in beforehand using 'kubeadm config images pull’
[kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env”
[kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml”
[kubelet-start] Activating the kubelet service
[certs] Using certificateDir folder "/etc/kubernetes/pki”
[certs] Generating "etcd/ca" certificate and key
[certs] Generating "etcd/healthcheck-client" certificate and key
[certs] Generating "etcd/server" certificate and key
[certs] etcd/server serving cert is signed for DNS names [localhost.localdomain localhost] and IPs [192.168.39.79 127.0.0.1 ::1]
[certs] Generating "etcd/peer" certificate and key
[certs] etcd/peer serving cert is signed for DNS names [localhost.localdomain localhost] and IPs [192.168.39.79 127.0.0.1 ::1]
[certs] Generating "apiserver-etcd-client" certificate and key
[certs] Generating "ca" certificate and key
[certs] Generating "apiserver-kubelet-client" certificate and key
[certs] Generating "apiserver" certificate and key
[certs] apiserver serving cert is signed for DNS names [localhost.localdomain kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local] and IPs [10.96.0.1 192.168.39.79]
[certs] Generating "front-proxy-ca" certificate and key
[certs] Generating "front-proxy-client" certificate and key
[certs] Generating "sa" key and public key
[kubeconfig] Using kubeconfig folder "/etc/kubernetes”
[kubeconfig] Writing "admin.conf" kubeconfig file
[kubeconfig] Writing "kubelet.conf" kubeconfig file
[kubeconfig] Writing "controller-manager.conf" kubeconfig file
[kubeconfig] Writing "scheduler.conf" kubeconfig file
[control-plane] Using manifest folder "/etc/kubernetes/manifests”
[control-plane] Creating static Pod manifest for "kube-apiserver”
[control-plane] Creating static Pod manifest for "kube-controller-manager”
[control-plane] Creating static Pod manifest for "kube-scheduler”
[etcd] Creating static Pod manifest for local etcd in "/etc/kubernetes/manifests”
[wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory "/etc/kubernetes/manifests". This can take up to 4m0s
[apiclient] All control plane components are healthy after 24.005638 seconds
[uploadconfig] storing the configuration used in ConfigMap "kubeadm-config" in the "kube-system” Namespace
[kubelet] Creating a ConfigMap "kubelet-config-1.13" in namespace kube-system with the configuration for the kubelets in the cluster
[patchnode] Uploading the CRI Socket information "/var/run/dockershim.sock" to the Node API object "localhost.localdomain" as an annotation
[mark-control-plane] Marking the node localhost.localdomain as control-plane by adding the label "node-role.kubernetes.io/master=''”
[mark-control-plane] Marking the node localhost.localdomain as control-plane by adding the taints [node-role.kubernetes.io/master:NoSchedule]
[bootstrap-token] Using token: 26uprk.t7vpbwxojest0tvq
[bootstrap-token] Configuring bootstrap tokens, cluster-info ConfigMap, RBAC Roles
[bootstraptoken] configured RBAC rules to allow Node Bootstrap tokens to post CSRs in order for nodes to get long term certificate credentials
[bootstraptoken] configured RBAC rules to allow the csrapprover controller automatically approve CSRs from a Node Bootstrap Token
[bootstraptoken] configured RBAC rules to allow certificate rotation for all node client certificates in the cluster
[bootstraptoken] creating the "cluster-info" ConfigMap in the "kube-public” namespace
[addons] Applied essential addon: CoreDNS
[addons] Applied essential addon: kube-proxyYour Kubernetes master has initialized successfully!To start using your cluster, you need to run the following as a regular user:mkdir -p $HOME/.kubesudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/configsudo chown $(id -u):$(id -g) $HOME/.kube/configYou should now deploy a pod network to the cluster.
Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:https://kubernetes.io/docs/concepts/cluster-administration/addons/You can now join any number of machines by running the following on each node
as root:kubeadm join 192.168.39.79:6443 --token 26uprk.t7vpbwxojest0tvq --discovery-token-ca-cert-hash sha256:028727c0c21f22dd29d119b080dcbebb37f5545e7da1968800140ffe225b0123[root@localhost ~]#

0x02. 配置 kubectl

在 Master上用 root用戶執行下列命令來配置 kubectl:

echo "export KUBECONFIG=/etc/kubernetes/admin.conf" >> /etc/profile
source /etc/profile?
echo $KUBECONFIG

0x03. 安裝Pod網絡

安裝 Pod網絡是 Pod之間進行通信的必要條件,k8s支持眾多網絡方案,這里我們依然選用經典的 flannel方案

  • 首先設置系統參數:
sysctl net.bridge.bridge-nf-call-iptables=1
  • 然后在 Master節點上執行如下命令:
kubectl apply -f kube-flannel.yaml

kube-flannel.yaml 文件在此

一旦 Pod網絡安裝完成,可以執行如下命令檢查一下 CoreDNS Pod此刻是否正常運行起來了,一旦其正常運行起來,則可以繼續后續步驟

kubectl get pods --all-namespaces -o wide

檢查所有pod是否正常啟動

同時我們可以看到主節點已經就緒:kubectl get nodes

查看主節點狀態


添加 Slave節點

在兩個 Slave節點上分別執行如下命令來讓其加入Master上已經就緒了的 k8s集群:

kubeadm join --token <token> <master-ip>:<master-port> --discovery-token-ca-cert-hash sha256:<hash>

如果 token忘記,則可以去 Master上執行如下命令來獲取:

kubeadm token list

上述kubectl join命令的執行結果如下:

[root@localhost ~]# kubeadm join 192.168.39.79:6443 --token yndddp.oamgloerxuune80q --discovery-token-ca-cert-hash sha256:7a45c40b5302aba7d8b9cbd3afc6d25c6bb8536dd6317aebcd2909b0427677c8
[preflight] Running pre-flight checks
[discovery] Trying to connect to API Server "192.168.39.79:6443”
[discovery] Created cluster-info discovery client, requesting info from "https://192.168.39.79:6443”
[discovery] Requesting info from "https://192.168.39.79:6443" again to validate TLS against the pinned public key
[discovery] Cluster info signature and contents are valid and TLS certificate validates against pinned roots, will use API Server "192.168.39.79:6443”
[discovery] Successfully established connection with API Server "192.168.39.79:6443”
[join] Reading configuration from the cluster…
[join] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -oyaml’
[kubelet] Downloading configuration for the kubelet from the "kubelet-config-1.13" ConfigMap in the kube-system namespace
[kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml”
[kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env”
[kubelet-start] Activating the kubelet service
[tlsbootstrap] Waiting for the kubelet to perform the TLS Bootstrap…
[patchnode] Uploading the CRI Socket information "/var/run/dockershim.sock" to the Node API object "localhost.localdomain" as an annotationThis node has joined the cluster:
* Certificate signing request was sent to apiserver and a response was received.
* The Kubelet was informed of the new secure connection details.Run 'kubectl get nodes' on the master to see this node join the cluster.

效果驗證

  • 查看節點狀態
kubectl get nodes

節點狀態

  • 查看所有 Pod狀態
kubectl get pods --all-namespaces -o wide

查看所有 Pod狀態

好了,集群現在已經正常運行了,接下來看看如何正常的拆卸集群。


拆卸集群

首先處理各節點:

kubectl drain <node name> --delete-local-data --force --ignore-daemonsets
kubectl delete node <node name>

一旦節點移除之后,則可以執行如下命令來重置集群:

kubeadm reset

安裝 dashboard

就像給elasticsearch配一個可視化的管理工具一樣,我們最好也給 k8s集群配一個可視化的管理工具,便于管理集群。

因此我們接下來安裝 v1.10.0版本的 kubernetes-dashboard,用于集群可視化的管理。

  • 首先手動下載鏡像并重新打標簽:(所有節點)
docker pull registry.cn-qingdao.aliyuncs.com/wangxiaoke/kubernetes-dashboard-amd64:v1.10.0
docker tag registry.cn-qingdao.aliyuncs.com/wangxiaoke/kubernetes-dashboard-amd64:v1.10.0 k8s.gcr.io/kubernetes-dashboard-amd64:v1.10.0
docker image rm registry.cn-qingdao.aliyuncs.com/wangxiaoke/kubernetes-dashboard-amd64:v1.10.0
  • 安裝 dashboard:
kubectl create -f dashboard.yaml

dashboard.yaml 文件在此

  • 查看 dashboard的 pod是否正常啟動,如果正常說明安裝成功:
 kubectl get pods --namespace=kube-system
[root@k8s-master ~]# kubectl get pods --namespace=kube-system
NAME                                    READY   STATUS    RESTARTS   AGE
coredns-86c58d9df4-4rds2                1/1     Running   0          81m
coredns-86c58d9df4-rhtgq                1/1     Running   0          81m
etcd-k8s-master                         1/1     Running   0          80m
kube-apiserver-k8s-master               1/1     Running   0          80m
kube-controller-manager-k8s-master      1/1     Running   0          80m
kube-flannel-ds-amd64-8qzpx             1/1     Running   0          78m
kube-flannel-ds-amd64-jvp59             1/1     Running   0          77m
kube-flannel-ds-amd64-wztbk             1/1     Running   0          78m
kube-proxy-crr7k                        1/1     Running   0          81m
kube-proxy-gk5vf                        1/1     Running   0          78m
kube-proxy-ktr27                        1/1     Running   0          77m
kube-scheduler-k8s-master               1/1     Running   0          80m
kubernetes-dashboard-79ff88449c-v2jnc   1/1     Running   0          21s
  • 查看 dashboard的外網暴露端口
kubectl get service --namespace=kube-system
NAME                   TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)         AGE
kube-dns               ClusterIP   10.96.0.10      <none>        53/UDP,53/TCP   5h38m
kubernetes-dashboard   NodePort    10.99.242.186   <none>        443:31234/TCP   14
  • 生成私鑰和證書簽名:
openssl genrsa -des3 -passout pass:x -out dashboard.pass.key 2048
openssl rsa -passin pass:x -in dashboard.pass.key -out dashboard.key
rm dashboard.pass.key
openssl req -new -key dashboard.key -out dashboard.csr【如遇輸入,一路回車即可】
  • 生成SSL證書:
openssl x509 -req -sha256 -days 365 -in dashboard.csr -signkey dashboard.key -out dashboard.crt
  • 然后將生成的 dashboard.keydashboard.crt置于路徑 /home/share/certs下,該路徑會配置到下面即將要操作的

dashboard-user-role.yaml文件中

  • 創建 dashboard用戶
 kubectl create -f dashboard-user-role.yaml

dashboard-user-role.yaml 文件在此

  • 獲取登陸token
kubectl describe secret/$(kubectl get secret -nkube-system |grep admin|awk '{print $1}') -nkube-system
[root@k8s-master ~]# kubectl describe secret/$(kubectl get secret -nkube-system |grep admin|awk '{print $1}') -nkube-system
Name:         admin-token-9d4vl
Namespace:    kube-system
Labels:       <none>
Annotations:  kubernetes.io/service-account.name: adminkubernetes.io/service-account.uid: a320b00f-07ed-11e9-93f2-000c2978f207Type:  kubernetes.io/service-account-tokenData
====
ca.crt:     1025 bytes
namespace:  11 bytes
token:      eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJrdWJlLXN5c3RlbSIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJhZG1pbi10b2tlbi05ZDR2bCIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50Lm5hbWUiOiJhZG1pbiIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50LnVpZCI6ImEzMjBiMDBmLTA3ZWQtMTFlOS05M2YyLTAwMGMyOTc4ZjIwNyIsInN1YiI6InN5c3RlbTpzZXJ2aWNlYWNjb3VudDprdWJlLXN5c3RlbTphZG1pbiJ9.WbaHx-BfZEd0SvJwA9V_vGUe8jPMUHjKlkT7MWJ4JcQldRFY8Tdpv5GKCY25JsvT_GM3ob303r0yE6vjQdKna7EfQNO_Wb2j1Yu5UvZnWw52HhNudHNOVL_fFRKxkSVjAILA_C_HvW6aw6TG5h7zHARgl71I0LpW1VESeHeThipQ-pkt-Dr1jWcpPgE39cwxSgi-5qY4ssbyYBc2aPYLsqJibmE-KUhwmyOheF4Lxpg7E3SQEczsig2HjXpNtJizCu0kPyiR4qbbsusulH-kdgjhmD9_XWP9k0BzgutXWteV8Iqe4-uuRGHZAxgutCvaL5qENv4OAlaArlZqSgkNWw

token既然生成成功,接下來就可以打開瀏覽器,輸入 token來登錄進集群管理頁面:

登錄集群管理頁面

集群概覽


后 記

由于能力有限,若有錯誤或者不當之處,還請大家批評指正,一起學習交流!

  • My Personal Blog:CodeSheep 程序羊
  • 我的半年技術博客之路


轉載于:https://my.oschina.net/hansonwang99/blog/2993870

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/281010.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/281010.shtml
英文地址,請注明出處:http://en.pswp.cn/news/281010.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

.NET性能優化-使用內存+磁盤混合緩存

我們回顧一下上一篇文章中的內容&#xff0c;有一個朋友問我這樣一個問題&#xff1a;我的業務依賴一些數據&#xff0c;因為數據庫訪問慢&#xff0c;我把它放在 Redis 里面&#xff0c;不過還是太慢了&#xff0c;有什么其它的方案嗎&#xff1f;其實這個問題比較簡單的是吧&…

最小生成樹詳解

注&#xff1a;本文算法使用鏈式前向星數據結構實現。學習鏈接&#xff1a;鏈式前向星-學習筆記 一、Prim算法 普通prim算法模板&#xff1a; //用前向星錄數據的時候記得把head初始化為-1 fill(dist,distLEN,MAX); memset(vis,0,sizeof vis); int ans0; dist[1]0; //如…

dropbox文件_Dropbox即將發布的擴展程序更新將添加更多文件編輯支持,包括Pixlr照片...

dropbox文件Dropbox is perhaps the best-known cloud storage platform for consumers, but it’s hoping to become something more. With an upcoming overhaul to its user tools, Dropbox will add more complex editing tools, in addition to what it already provides …

黑客竊取思科、IBM與甲骨文認證管理系統內的敏感數據

目前一套被思科、F5、IBM以及甲骨文等企業所廣泛使用的認證管理系統(即Credential Manager System)正面臨著數據泄露風險&#xff0c;其中的敏感數據也許已經被黑客們所獲取。 根據Pearson VUE(主營計算機測試方案開發與交付)發布的一項公告&#xff0c;某惡意軟件已經藏身于該…

Spring下載地址

下載地址&#xff1a;https://repo.spring.io/libs-release-local/org/springframework/spring/ 進入后可選擇下載版本&#xff0c;選擇版本后&#xff0c;進入目錄結構。其中dist是最終發布版本&#xff0c;包含開發所需lib和源碼。docs是開發文檔。schema是一些約束文件。 Do…

C#字符串:轉數組、數字

1.List<string> 轉數組&#xff0c;字符串 string[] strs list.ToArray();string s string.Join(",", list.ToArray());//數組轉list string[] strArr new string[3] { "1", "2", "3" }; List<string> strList strArr…

.NET7發布,一大批優秀.NET6項目沒人看了嗎...(都是好項目)

恍惚間都已經.NET7.0了&#xff0c;不能再呆在舊版本了&#xff01;這里分享一套Vue3 Axios TS Vite Element Plus .NET 6 WebAPI JWT SqlSugar的通用管理后臺&#xff0c;各種最新框架組件&#xff0c;學習必備&#xff01;這里把源碼、腳本以及專門錄制的視頻教程都打…

Python的日志記錄-logging模塊的使用

一、日志 1.1什么是日志 日志是跟蹤軟件運行時所發生的事件的一種方法&#xff0c;軟件開發者在代碼中調用日志函數&#xff0c;表明發生了特定的事件&#xff0c;事件由描述性消息描述&#xff0c;同時還包含事件的重要性&#xff0c;重要性也稱為級別或嚴重性。 1.2何時使用日…

詢問HTG:白噪聲屏幕保護程序,有效的文件命名以及從密碼泄露中恢復

Once a week we share three of the questions we’ve answered from the Ask HTG inbox with the greater readership; this week we’re looking at white noise screen savers, efficient file naming systems, and recovering from a password compromise. 每周一次&#…

專家預測第二波WannaCry勒索病毒攻擊即將到來!

WannaCry的傳播腳步今晨戛然而止 今天一大早&#xff0c;全網的WannaCry蠕蟲病毒攻擊突然減弱消退了!所有這一切功勞來自于英國研究人員malwaretech&#xff0c;他通過逆向發現WannaCry代碼中有一個特殊域名地址&#xff1a; www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.co…

01.HTML基礎命令筆記

目錄 HTML結構 body內常用標簽 常用 div與span img a標簽 超鏈接標簽 其他格式標簽 列表 表格 表單 select標簽 label標簽 textarea多行文本 HTML結構 <!DOCTYPE html> <html lang"zh-CN"> <head><meta charset"UTF-8"&…

ios numlock_從“提示”框:默認情況下啟用NumLock,無廣告的iOS應用和立體聲供電的派對燈...

ios numlockOnce a week we round up some of the great tips readers have sent into the tip box. This week we’re looking at how to enable the NumLock by default, stripping ads from iOS apps, and turning Christmas lights into audio-responsive party lights. 每…

Windows 7 自動更新失敗導致無法進系統解決方案

故障現象&#xff1a;自動更新后&#xff0c;重啟電腦&#xff0c;提示&#xff1a;&#xff08;配置Windows update 失敗 還原更改 請勿關閉計算機&#xff09;&#xff0c; 而計算機一直停留該界面&#xff0c;如果半個小時以上都無反應。此時&#xff0c;就不要再繼續等待了…

Net程序員為什么要學點其他語言副業

最近看了很多同行的文章、或者是現實中身邊的例子也好&#xff0c;真的覺得大家太不容易了。感覺說的就是自己。入門上學的時候接觸了.NET&#xff0c;它的簡單以及宇宙無敵的Visual Studio&#xff0c;讓我深深地迷戀上它。畢業之后&#xff0c;就成功的做來一名.Neter&#x…

PaperWeekly 第28期 | 圖像語義分割之特征整合和結構預測

“ 余昌黔 華中科技大學碩士 研究方向為圖像語義分割 知乎專欄 https://zhuanlan.zhihu.com/semantic-segmentation 前言 近來閱讀了 PASCAL VOC 2012 排行榜上前幾的文章&#xff0c;包括 PSPNet 和林國省老師的幾篇論文&#xff0c;覺得現在在 semantic segmentation 領域對于…

POJ.2774.Long Long Message/SPOJ.1811.LCS(后綴數組 倍增)

題目鏈接 POJ2774SPOJ1811 LCS - Longest Common Substring 比后綴自動機慢好多(廢話→_→)。 \(Description\) 求兩個字符串最長公共子串 \(Solution\) 任何一個子串一定是某個后綴的前綴 可以將兩個字符串拼在一起&#xff0c;中間用一個從未出現過的字符隔開&#xff0c;這樣…

02.CSS基礎筆記及導入

CSS是什么 CSS&#xff08;Cascading Style Sheet&#xff0c;層疊樣式表)定義如何顯示HTML元素。 當瀏覽器讀到一個樣式表&#xff0c;它就會按照這個樣式表來對文檔進行格式化&#xff08;渲染&#xff09;。 CSS樣式 CSS引入HTML 內部樣式與外部樣式 <!DOCTYPE> …

如何還原桌面圖標_如何為Windows 10桌面圖標還原或更改文本的默認外觀?

如何還原桌面圖標For whatever reason, sooner or later we all have someone or something mess around with our keyboards and create ‘interesting’ results. With that in mind, today’s SuperUser Q&A post has a simple and elegant way to help a frustrated re…

「前端早讀君007」css進階之徹底理解視覺格式化模型

今日勵志 不論你在什么時候開始&#xff0c;重要的是開始之后不要停止。 前言 對于部分前端工程師來講&#xff0c;有時候CSS令他們很頭疼&#xff0c;明明設置了某個樣式&#xff0c;但是布局就是不起作用。 如果你也有這種問題&#xff0c;那么是時候學習下什么是css視覺格式…

.NET周報【11月第3期 2022-11-22】

國內文章.NET Conf China 2022 第一批講師陣容大揭秘&#xff01;整個期待了&#xff01;https://mp.weixin.qq.com/s/4p89hhBPw6qv-0OB_T_TOg目光看過來 2022 年 12 月 3-4 日&#xff0c;一場社區性質的國內規模最大的 線上線下.NET Conf 2022 技術大會 即將盛大開幕。目前大…