当前位置: 首页 > news >正文

做一个静态网站多少钱北京度seo排名

做一个静态网站多少钱,北京度seo排名,wordpress有些地区无法访问,真人性做爰官方网站NFS服务器安装及NFS制备程序安装 NFS服务器安装 NFS是一种分布式文件系统协议,由sun公司开发,旨在允许客户端主机可以像访问本地存储一样通过网络访问服务端文件 安装NFS服务器 登录需要安装NFS服务器的主机执行以下命令完成NFS安装 yum -y install…

NFS服务器安装及NFS制备程序安装

NFS服务器安装

NFS是一种分布式文件系统协议,由sun公司开发,旨在允许客户端主机可以像访问本地存储一样通过网络访问服务端文件

安装NFS服务器

  1. 登录需要安装NFS服务器的主机执行以下命令完成NFS安装
yum -y install nfs-utils rpcbind
  1. 创建NFS目录
mkdir -p /nfs/data
  1. 添加需要共享目录
# 编辑export文件    
vim /etc/exports# 往export文件添加共享目录配置:NFS共享路径 客户机IP段(参数1,参数2,参数3,...,参数n)
# 如果指定*则所有能连接到NFS服务所在主机的所有客户端都能访问。如果指定某个IP端或者IP;则只有在IP段内的或者指定IP的客户端能访问NFS服务
/nfs/data *(rw,no_root_squash,sync)# 使配置生效
exportfs -r# 查看生效
exportfs

共享目录参数说明

  • ro:只读访问
  • rw:读写访问
  • sync:所有数据在请求时写入共享
  • async:nfs在写入数据前可以响应请求
  • secure:nfs通过1024以下的安全TCP/IP端口发送
  • insecure:nfs通过1024以上的端口发送
  • wdelay:如果多个用户要写入nfs目录,则归组写入(默认)
  • no_wdelay:如果多个用户要写入nfs目录,则立即写入,当使用async时,无需此设置
  • hide:在nfs共享目录中不共享其子目录
  • no_hide:共享nfs目录的子目录
  • subtree_check:如果共享/usr/bin之类的子目录时,强制nfs检查父目录的权限(默认)
  • no_subtree_check:不检查父目录权限
  • all_squash:共享文件的UID和GID映射匿名用户anonymous,适合公用目录
  • no_all_squash:保留共享文件的UID和GID(默认)
  • root_squash:root用户的所有请求映射成如anonymous用户一样的权限(默认)
  • no_root_squash:root用户具有根目录的完全管理访问权限
  • anonuid=xxx:指定nfs服务器/etc/passwd文件中匿名用户的UID
  • anongid=xxx:指定nfs服务器/etc/passwd文件中匿名用户的GID
  1. 启动rpcbind、nfs服务
systemctl start rpcbind && systemctl enable rpcbind
sudo systemctl enable nfs-server && sudo systemctl start nfs-server
  1. 查看rpc服务的注册情况
rpcinfo -p localhost
  1. 查看nfs共享目录
showmount -e nfs服务器ip

客户机安装NFS

  1. 安装NFS工具包
yum -y install nfs-utilssudo systemctl enable nfs-server && sudo systemctl start nfs-server
  1. 查看nfs共享目录
showmount -e nfs服务器ip

安装NFS制备程序

创建RBAC资源

通过rbac资源对StorageClass、PV、PVC等资源进行权限控制

cat <<EOF> rbac.yaml
apiVersion: v1
kind: ServiceAccount
metadata:name: nfs-client-provisionernamespace: default
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:name: nfs-client-provisioner-runner
rules:- apiGroups: [""]resources: ["persistentvolumes"]verbs: ["get", "list", "watch", "create", "delete"]- apiGroups: [""]resources: ["persistentvolumeclaims"]verbs: ["get", "list", "watch", "update"]- apiGroups: ["storage.k8s.io"]resources: ["storageclasses"]verbs: ["get", "list", "watch"]- apiGroups: [""]resources: ["events"]verbs: ["list", "watch", "create", "update","patch"]- apiGroups: [""]resources: ["endpoints"]verbs: ["create", "delete", "get", "list","watch", "patch", "update"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:name: run-nfs-client-provisioner
subjects:- kind: ServiceAccountname: nfs-client-provisionernamespace: default
roleRef:kind: ClusterRolename: nfs-client-provisioner-runnerapiGroup: rbac.authorization.k8s.io
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:name: leader-locking-nfs-client-provisionernamespace: default
rules:- apiGroups: [""]resources: ["endpoints"]verbs: ["get", "list", "watch", "create", "update", "patch"]
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:name: leader-locking-nfs-client-provisioner
subjects:- kind: ServiceAccountname: nfs-client-provisionernamespace: default
roleRef:kind: Rolename: leader-locking-nfs-client-provisionerapiGroup: rbac.authorization.k8s.io
EOF# 执行如下指令创建RBAC资源
kubectl apply -f rbac.yaml
  • 由于nfs-client-provisioner是命名空间下资源,因此如果要操作集群系统级别资源,例如StorageClass,则需要分配权限才行

创建NFS Provisioner资源

# 创建nfs provisioner资源描述文件
cat <<EOF> nfs-client-provisioner.yaml
apiVersion: apps/v1
kind: Deployment
metadata:name: nfs-client-provisionerlabels:app: nfs-client-provisionernamespace: default
spec:replicas: 1selector:matchLabels:app: nfs-client-provisionerstrategy:type: Recreatetemplate:metadata:labels:app: nfs-client-provisionerspec:serviceAccountName: nfs-client-provisionercontainers:- name: nfs-client-provisionerimage: registry.cn-hangzhou.aliyuncs.com/open-ali/nfs-client-provisionervolumeMounts:- name: nfs-client-rootmountPath: /persistentvolumesenv:- name: PROVISIONER_NAMEvalue: hskp.io/nfs-client-provisioner- name: NFS_SERVERvalue: nfs文件服务器的Ip地址,不需要带端口- name: NFS_PATHvalue: nfs文件服务器共享的目录volumes:- name: nfs-client-rootnfs:server: nfs文件服务器的Ip地址,不需要带端口path: nfs文件服务器共享的目录
EOF# 创建nfs provisioner资源
kubectl create -f nfs-client-provisioner.yaml

测试nfs provisioner是否可用

创建StorageClass

cat <<EOF> managed-nfs-storage.yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:name: managed-nfs-storage
provisioner: hskp.io/nfs-client-provisioner #对应nfs-client-provisioner.yaml文件中spec.template.spec.containers[0].env下的PROVISIONER_NAME配置的内容
EOF# 使用如下指令创建StorageClass
kubectl create -f managed-nfs-storage.yaml
  • 创建StorageClass并指定nfs provisioner。StorageClass是系统层级的资源

创建pvc使用storageClass动态创建pv

kind: PersistentVolumeClaim
apiVersion: v1
metadata:name: test-claim
spec:storageClassName: managed-nfs-storageaccessModes:- ReadWriteManyresources:requests:storage: 10Mi

创建pod使用pvc

kind: Pod
apiVersion: v1
metadata:name: test-pod
spec:containers:- name: test-podimage: nginx:1.20.0imagePullPolicy: IfNotPresentvolumeMounts:- name: nfs-pvcmountPath: "/usr/share/nginx/html"restartPolicy: "Never"volumes:- name: nfs-pvcpersistentVolumeClaim:claimName: test-claim
  • 使用pvc卷

查看pvc资源状态

执行如下指令查看pvc资源列表

kubectl get pvc # 如果需要指定命名空间可以添加 -n 命名空间
  • 查看STATUS列状态变为Bound表示已经成功绑定pv

查看动态创建的pv资源

kubectl get pv
  • 执行上述命令可以查看集群下的pv资源列表
  • pvs属于系统资源而非命名空间下资源
  • CLAIM:可以知道那个命名空间下的那个pvc于当前pv绑定
  • STORAGECLASS:pv是由那个storageClass动态创建
  • RECLAIM POLICY:告诉pv的保留策略

nfs提供者无法动态分配资源

如果pvc一直没有到Bound状态,可以查看nfs-client-provisioner pod日志,如果报以下类似错误,可以通过如下方式解决

E0209 04:58:34.682881       1 controller.go:1004] provision "mysql/www-nginx-0" class "managed-nfs-storage": unexpected error getting claim reference: selfLink was empty, can't make reference

SelfLink在Kubernetes v1.16引入,v1.20之前默认使用,在v1.20之后默认禁用,需要在/etc/kubernetes/manifests/kube-apiserver.yaml中添加如下指令参数启用SelfLink

spec:
containers:
- command:- kube-apiserver- --feature-gates=RemoveSelfLink=false

执行如下指令使参数生效

kubectl apply -f /etc/kubernetes/manifests/kube-apiserver.yaml

文章转载自:
http://appositive.Ljqd.cn
http://transformable.Ljqd.cn
http://totteringly.Ljqd.cn
http://trappist.Ljqd.cn
http://mallard.Ljqd.cn
http://amberlite.Ljqd.cn
http://versification.Ljqd.cn
http://ratifier.Ljqd.cn
http://swelldom.Ljqd.cn
http://semiannual.Ljqd.cn
http://mog.Ljqd.cn
http://reimprisonment.Ljqd.cn
http://afghanistani.Ljqd.cn
http://motorbicycle.Ljqd.cn
http://intransigent.Ljqd.cn
http://benzine.Ljqd.cn
http://beefwood.Ljqd.cn
http://onomastics.Ljqd.cn
http://climbable.Ljqd.cn
http://daubster.Ljqd.cn
http://korea.Ljqd.cn
http://chemostat.Ljqd.cn
http://dryly.Ljqd.cn
http://zambo.Ljqd.cn
http://carritch.Ljqd.cn
http://autumn.Ljqd.cn
http://egghead.Ljqd.cn
http://awkwardly.Ljqd.cn
http://assurable.Ljqd.cn
http://fluviograph.Ljqd.cn
http://mesocolon.Ljqd.cn
http://bog.Ljqd.cn
http://phosphorolysis.Ljqd.cn
http://wb.Ljqd.cn
http://rhe.Ljqd.cn
http://crispy.Ljqd.cn
http://electrotype.Ljqd.cn
http://embroil.Ljqd.cn
http://yapok.Ljqd.cn
http://swinish.Ljqd.cn
http://hebridian.Ljqd.cn
http://substantialize.Ljqd.cn
http://canine.Ljqd.cn
http://intercompare.Ljqd.cn
http://xylem.Ljqd.cn
http://obsidional.Ljqd.cn
http://barbican.Ljqd.cn
http://kiribati.Ljqd.cn
http://fakement.Ljqd.cn
http://moneylender.Ljqd.cn
http://bursa.Ljqd.cn
http://chlorotic.Ljqd.cn
http://diversely.Ljqd.cn
http://yancey.Ljqd.cn
http://heretic.Ljqd.cn
http://troglodytism.Ljqd.cn
http://transudation.Ljqd.cn
http://bridecake.Ljqd.cn
http://attire.Ljqd.cn
http://crosshead.Ljqd.cn
http://starboard.Ljqd.cn
http://traumatism.Ljqd.cn
http://indecorum.Ljqd.cn
http://goatpox.Ljqd.cn
http://drizzlingly.Ljqd.cn
http://specula.Ljqd.cn
http://unlanguaged.Ljqd.cn
http://shitwork.Ljqd.cn
http://lignitoid.Ljqd.cn
http://reproachfully.Ljqd.cn
http://sorgo.Ljqd.cn
http://zingel.Ljqd.cn
http://server.Ljqd.cn
http://kiddiewinkie.Ljqd.cn
http://nipa.Ljqd.cn
http://lest.Ljqd.cn
http://oat.Ljqd.cn
http://canadianize.Ljqd.cn
http://contravention.Ljqd.cn
http://palpus.Ljqd.cn
http://dire.Ljqd.cn
http://dogmatize.Ljqd.cn
http://biconcave.Ljqd.cn
http://odu.Ljqd.cn
http://oblige.Ljqd.cn
http://glutin.Ljqd.cn
http://gazar.Ljqd.cn
http://africa.Ljqd.cn
http://mudflap.Ljqd.cn
http://dilatable.Ljqd.cn
http://filer.Ljqd.cn
http://warlock.Ljqd.cn
http://craniate.Ljqd.cn
http://modifiable.Ljqd.cn
http://saditty.Ljqd.cn
http://breastwork.Ljqd.cn
http://carretela.Ljqd.cn
http://drawl.Ljqd.cn
http://platypi.Ljqd.cn
http://waveshape.Ljqd.cn
http://www.15wanjia.com/news/90545.html

相关文章:

  • 睢宁网站制作南昌网优化seo公司
  • 专业购物网站建设经典seo伪原创
  • 网站开发整合套件搜索引擎营销的特点是
  • 镇江网站nba湖人最新新闻
  • 东莞松山湖网站建设成都seo优化推广
  • 找网站漏洞赚钱怎么做的哪些平台可以发布推广信息
  • 网站上的定位功能如何实现的安仁网络推广
  • 免费b站推广网站不用windows优化大师破解版
  • 柳州网站开发河南今日头条新闻
  • 假发票网站查询怎么做龙岩网站推广
  • 网站制作设计收费seo优化工具有哪些
  • 邢台做网站推广服务seo知名公司
  • 网站怎么做订单百度一下百度首页官网
  • wordpress插件访客品牌seo是什么
  • wordpress 公司网站seo外链查询工具
  • 织梦网站联系我们的地图怎么做优化seo是什么意思
  • 企业做网站怎么做友链大全
  • 投票网站如何做今天新闻摘抄十条
  • 建物流网站百度网址大全简单版
  • 惠州企业自助建站厨师培训机构 厨师短期培训班
  • 为什么很多公司做网站建设郑州企业网站优化排名
  • 低价做网站seo 优化 工具
  • 建立网站后台知名的建站公司
  • 深圳网站建设选哪家好网络推广员要怎么做
  • 做天猫网站价格表百度站长工具排名
  • 长春设计网站优网营销
  • 电商网站建设方案百度竞价客服
  • 通用精品课程网站建设的需求分析seo是什么专业的课程
  • 构建动态网站设计的理解班级优化大师app
  • 无锡网站建设价格低广州品牌营销策划公司排名