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

定制网站开发市场营销平台

定制网站开发,市场营销平台,最爱网,wordpress文章单独制版文章目录 机器介绍centos基本配置安装 VMware Tools设置静态ip关闭防火墙关闭SELinux开启时间同步配置host和hostname 安装kubesphere依赖项安装配置文件准备执行安装命令 机器介绍 在ESXI中准备虚拟机,部署参考官网:https://kubesphere.io/zh/ CentOs…

文章目录

    • 机器介绍
    • centos基本配置
      • 安装 VMware Tools
      • 设置静态ip
      • 关闭防火墙
      • 关闭SELinux
      • 开启时间同步
      • 配置host和hostname
    • 安装kubesphere
      • 依赖项安装
      • 配置文件准备
      • 执行安装命令

机器介绍

在ESXI中准备虚拟机,部署参考官网:https://kubesphere.io/zh/

CentOs7.5192.168.31.21master, etcd
CentOs7.5192.168.31.22master, etcd
CentOs7.5192.168.31.23master, etcd
CentOs7.5192.168.31.24worker
CentOs7.5192.168.31.25worker
CentOs7.5192.168.31.26worker

centos基本配置

安装 VMware Tools

  1. 运行以下命令,以安装 VMware Tools:
sudo yum install open-vm-tools

这将使用 yum 从 VMware Tools 软件源安装 open-vm-tools 软件包。

  1. 安装完成后,重新启动虚拟机以使 VMware Tools 生效:
sudo reboot

设置静态ip

使用vi编辑器打开:

sudo vim /etc/sysconfig/network-scripts/ifcfg-ens33
TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="static"                              #dhcp改为static 
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="ens33"
UUID="74ca9b68-1475-4b02-9750-f48b871504df"
DEVICE="ens33"
ONBOOT="yes"                                   #开机启用本配置
IPADDR=192.168.0.180                           #静态IP
GATEWAY=192.168.0.1                            #默认网关
NETMASK=255.255.255.0                          #子网掩码
DNS1=192.168.0.1                               #DNS地址1
DNS2=223.6.6.6                                 #DNS地址2

重启网络服务使配置生效:

sudo service network restart

关闭防火墙

#设置开机 “启动” 防火墙命令
systemctl enable firewalld.service# 设置开机 “禁用” 防火墙命令
systemctl disable firewalld.service#防火墙开启命令
systemctl start firewalld#防火墙关闭命令
systemctl stop firewalld#防火墙状态查看命令1
systemctl status firewalld

关闭SELinux

关闭 SELinux 可以通过编辑 /etc/selinux/config 文件并将 SELINUX 参数设置为 disabled。具体步骤如下:

  1. 以 root 用户身份登录 Linux 系统。
  2. 打开 /etc/selinux/config 文件,可以使用命令 vi /etc/selinux/config。
  3. 找到 SELINUX 参数,并将其设置为 disabled。
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
  1. 保存并关闭文件。
  2. 重启系统使更改生效。

SELinux 作为一个安全模块,可以提供强制访问控制机制,限制进程和用户对系统资源的访问,从而提高系统的安全性和可靠性。但是,在某些情况下,关闭 SELinux 可能是必要的,例如:

  1. 应用程序与 SELinux 不兼容:某些应用程序可能与 SELinux 不兼容,导致运行时出现问题。在这种情况下,关闭 SELinux 可能是解决问题的一种方法。
  2. 调试问题:在调试系统问题时,关闭 SELinux 可能有助于确定问题的根本原因。
  3. 降低系统负载:在某些情况下,关闭 SELinux 可能有助于降低系统负载,提高系统性能。
  4. 简化系统管理:在某些情况下,关闭 SELinux 可能会简化系统管理,减少管理工作量。

需要注意的是,关闭 SELinux 可能会降低系统的安全性和可靠性,因此应该谨慎考虑。如果必须关闭 SELinux,请确保在关闭之前仔细评估系统的安全风险,并采取其他措施来保护系统的安全性,例如使用防火墙、限制用户权限等。
在大多数情况下,建议仅在必要时关闭 SELinux,并在关闭之前备份系统以便在需要时进行恢复。关闭 SELinux 的方法包括编辑 /etc/selinux/config 文件并将 SELINUX 参数设置为 disabled,或者使用命令 setenforce 0 临时禁用 SELinux。

开启时间同步

  1. 开启时间同步。
yum install -y chrony
systemctl enable chronyd
systemctl start chronyd
timedatectl set-ntp true
  1. 设置时区。
timedatectl set-timezone Asia/Shanghai
  1. 检查 ntp-server 是否可用。
chronyc activity -v

配置host和hostname

  1. 设置主机名:在21-26上分别挨条执行
sudo hostnamectl set-hostname ksmaster21
sudo hostnamectl set-hostname ksmaster22
sudo hostnamectl set-hostname ksmaster23
sudo hostnamectl set-hostname ksnode21
sudo hostnamectl set-hostname ksnode22
sudo hostnamectl set-hostname ksnode23
  1. vi /etc/hosts 配置host
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.31.21 ksmaster21
192.168.31.22 ksmaster22
192.168.31.23 ksmaster23
192.168.31.24 ksnode24
192.168.31.25 ksnode25
192.168.31.26 ksnode26
  1. 验证hosts配置
ping ksmaster21
ping ksmaster22
ping ksmaster23
ping ksnode21
ping ksnode22
ping ksnode23

安装kubesphere

依赖项安装

KubeKey 可以将 Kubernetes 和 KubeSphere 一同安装。针对不同的 Kubernetes 版本,需要安装的依赖项可能有所不同。您可以参考以下列表,查看是否需要提前在节点上安装相关的依赖项。

依赖项Kubernetes 版本 ≥ 1.18Kubernetes 版本 < 1.18
socat必须可选但建议
conntrack必须可选但建议
ebtables可选但建议可选但建议
ipset可选但建议可选但建议

执行下述命令一键安装:

yum -y install  socat conntrack ebtables ipset

由于使用群辉nfs作为nas,需安装nfs:

yum install -y nfs-utils

配置文件准备

  1. 创建nfs-client.yaml文件
nfs:server: "nas.yxym.com"    # 这是群辉服务器IP地址,把它换成你自己的path: "/volume5/ks"    # 用您自己的目录替换导出的目录
storageClass:defaultClass: true
  1. 生成kubesphere安装配置文件
# 环境设置
export KKZONE=cn
# 创建配置文件
./kk create config --with-kubernetes v1.23.10 --with-kubesphere v3.4.1
  1. 配置文件内容如下:

apiVersion: kubekey.kubesphere.io/v1alpha2
kind: Cluster
metadata:name: sample
spec:hosts:- {name: ksmaster21, address: 192.168.31.21, internalAddress: 192.168.31.21, user: root, password: 密码}- {name: ksmaster22, address: 192.168.31.22, internalAddress: 192.168.31.22, user: root, password: 密码}- {name: ksmaster23, address: 192.168.31.23, internalAddress: 192.168.31.23, user: root, password: 密码}- {name: ksnode24, address: 192.168.31.24, internalAddress: 192.168.31.24, user: root, password: 密码}- {name: ksnode25, address: 192.168.31.25, internalAddress: 192.168.31.25, user: root, password: 密码}- {name: ksnode26, address: 192.168.31.26, internalAddress: 192.168.31.26, user: root, password: 密码}   roleGroups:etcd:- ksmaster21- ksmaster22- ksmaster23control-plane:- ksmaster21- ksmaster22- ksmaster23worker:- ksnode24- ksnode25- ksnode26   controlPlaneEndpoint:## Internal loadbalancer for apiservers internalLoadbalancer: haproxydomain: lb.kubesphere.localaddress: ""port: 6443kubernetes:version: v1.23.10clusterName: cluster.localautoRenewCerts: truecontainerManager: dockeretcd:type: kubekeynetwork:plugin: calicokubePodsCIDR: 10.10.0.0/18kubeServiceCIDR: 10.20.0.0/18## multus support. https://github.com/k8snetworkplumbingwg/multus-cnimultusCNI:enabled: falseregistry:privateRegistry: ""namespaceOverride: ""registryMirrors: ["https://0j62md6t.mirror.aliyuncs.com","http://hub-mirror.c.163.com"]insecureRegistries: []addons:- name: nfs-clientnamespace: kube-systemsources:chart:name: nfs-client-provisionerrepo: https://charts.kubesphere.io/mainvaluesFile: /opt/ks/v3.3/nfs-client.yaml---
apiVersion: installer.kubesphere.io/v1alpha1
kind: ClusterConfiguration
metadata:name: ks-installernamespace: kubesphere-systemlabels:version: v3.3.2
spec:persistence:storageClass: ""authentication:jwtSecret: ""zone: ""local_registry: ""namespace_override: ""# dev_tag: ""etcd:monitoring: falseendpointIps: localhostport: 2379tlsEnable: truecommon:core:console:enableMultiLogin: trueport: 30880type: NodePort# apiserver:#  resources: {}# controllerManager:#  resources: {}redis:enabled: falsevolumeSize: 2Giopenldap:enabled: falsevolumeSize: 2Giminio:volumeSize: 20Gimonitoring:# type: externalendpoint: http://prometheus-operated.kubesphere-monitoring-system.svc:9090GPUMonitoring:enabled: falsegpu:kinds:- resourceName: "nvidia.com/gpu"resourceType: "GPU"default: truees:# master:#   volumeSize: 4Gi#   replicas: 1#   resources: {}# data:#   volumeSize: 20Gi#   replicas: 1#   resources: {}logMaxAge: 7elkPrefix: logstashbasicAuth:enabled: falseusername: ""password: ""externalElasticsearchHost: ""externalElasticsearchPort: ""alerting:enabled: false# thanosruler:#   replicas: 1#   resources: {}auditing:enabled: false# operator:#   resources: {}# webhook:#   resources: {}devops:enabled: false# resources: {}jenkinsMemoryLim: 8GijenkinsMemoryReq: 4GijenkinsVolumeSize: 8Gievents:enabled: false# operator:#   resources: {}# exporter:#   resources: {}# ruler:#   enabled: true#   replicas: 2#   resources: {}logging:enabled: falselogsidecar:enabled: truereplicas: 2# resources: {}metrics_server:enabled: falsemonitoring:storageClass: ""node_exporter:port: 9100# resources: {}# kube_rbac_proxy:#   resources: {}# kube_state_metrics:#   resources: {}# prometheus:#   replicas: 1#   volumeSize: 20Gi#   resources: {}#   operator:#     resources: {}# alertmanager:#   replicas: 1#   resources: {}# notification_manager:#   resources: {}#   operator:#     resources: {}#   proxy:#     resources: {}gpu:nvidia_dcgm_exporter:enabled: false# resources: {}multicluster:clusterRole: nonenetwork:networkpolicy:enabled: falseippool:type: nonetopology:type: noneopenpitrix:store:enabled: falseservicemesh:enabled: falseistio:components:ingressGateways:- name: istio-ingressgatewayenabled: falsecni:enabled: falseedgeruntime:enabled: falsekubeedge:enabled: falsecloudCore:cloudHub:advertiseAddress:- ""service:cloudhubNodePort: "30000"cloudhubQuicNodePort: "30001"cloudhubHttpsNodePort: "30002"cloudstreamNodePort: "30003"tunnelNodePort: "30004"# resources: {}# hostNetWork: falseiptables-manager:enabled: truemode: "external"# resources: {}# edgeService:#   resources: {}terminal:timeout: 600

执行安装命令

# 环境设置
export KKZONE=cn
# 创建配置文件
./kk create config --with-kubernetes v1.23.10 --with-kubesphere v3.4.1
# 安装
./kk create cluster -f config-sample.yaml
# 卸载
./kk delete cluster -f config-sample.yaml

文章转载自:
http://spermatogenetic.mzpd.cn
http://temporarily.mzpd.cn
http://taibei.mzpd.cn
http://mire.mzpd.cn
http://amphitheatral.mzpd.cn
http://monolayer.mzpd.cn
http://congenially.mzpd.cn
http://pseudomonas.mzpd.cn
http://lattice.mzpd.cn
http://isotope.mzpd.cn
http://mainstreet.mzpd.cn
http://holocaine.mzpd.cn
http://edaphic.mzpd.cn
http://saurophagous.mzpd.cn
http://jackaroo.mzpd.cn
http://joyrider.mzpd.cn
http://velma.mzpd.cn
http://mediography.mzpd.cn
http://comfily.mzpd.cn
http://lumpily.mzpd.cn
http://undesigned.mzpd.cn
http://clubfoot.mzpd.cn
http://patrist.mzpd.cn
http://hpv.mzpd.cn
http://ebriety.mzpd.cn
http://stainer.mzpd.cn
http://quercitrin.mzpd.cn
http://synclinorium.mzpd.cn
http://retailer.mzpd.cn
http://inevitably.mzpd.cn
http://rooklet.mzpd.cn
http://laxative.mzpd.cn
http://softboard.mzpd.cn
http://ryokan.mzpd.cn
http://malmsey.mzpd.cn
http://tullibee.mzpd.cn
http://tranquillizer.mzpd.cn
http://stalinabad.mzpd.cn
http://summand.mzpd.cn
http://daleth.mzpd.cn
http://zionward.mzpd.cn
http://biradial.mzpd.cn
http://martha.mzpd.cn
http://congregationalist.mzpd.cn
http://misbound.mzpd.cn
http://eek.mzpd.cn
http://tartar.mzpd.cn
http://gherkin.mzpd.cn
http://debarkation.mzpd.cn
http://enormously.mzpd.cn
http://runty.mzpd.cn
http://conjurer.mzpd.cn
http://pend.mzpd.cn
http://silver.mzpd.cn
http://prognathous.mzpd.cn
http://uprightness.mzpd.cn
http://shekarry.mzpd.cn
http://interruptive.mzpd.cn
http://biochemistry.mzpd.cn
http://bronchogenic.mzpd.cn
http://kernelly.mzpd.cn
http://copular.mzpd.cn
http://hippomenes.mzpd.cn
http://europocentric.mzpd.cn
http://wesleyan.mzpd.cn
http://nasalization.mzpd.cn
http://adieu.mzpd.cn
http://waterfowl.mzpd.cn
http://tanna.mzpd.cn
http://discourteously.mzpd.cn
http://valediction.mzpd.cn
http://quartersaw.mzpd.cn
http://selfwards.mzpd.cn
http://gangstress.mzpd.cn
http://oam.mzpd.cn
http://pat.mzpd.cn
http://helot.mzpd.cn
http://laevulin.mzpd.cn
http://jerky.mzpd.cn
http://computerizable.mzpd.cn
http://gascogne.mzpd.cn
http://helichrysum.mzpd.cn
http://jogger.mzpd.cn
http://impenitent.mzpd.cn
http://redeny.mzpd.cn
http://souchong.mzpd.cn
http://gaiety.mzpd.cn
http://bosomy.mzpd.cn
http://pace.mzpd.cn
http://accelerograph.mzpd.cn
http://heron.mzpd.cn
http://degear.mzpd.cn
http://insouciance.mzpd.cn
http://unsanctified.mzpd.cn
http://repentantly.mzpd.cn
http://superimposition.mzpd.cn
http://finland.mzpd.cn
http://loll.mzpd.cn
http://hoatching.mzpd.cn
http://allele.mzpd.cn
http://www.15wanjia.com/news/65592.html

相关文章:

  • 做网站开发需要学那些东西seo技术服务外包
  • 着力规范网站集约化建设上首页seo
  • 南宁建站程序软文发布平台哪个好
  • 阿里云建公司网站软文撰写公司
  • 海南公司注册网站安全优化大师
  • 我是做网站的 怎么才能提高业绩成都网站seo服务
  • 网站制作的评价长沙靠谱的关键词优化
  • 北京哪家做网站和网络推广好的长沙网站se0推广优化公司
  • 国际贸易相关网站时事新闻热点摘抄
  • 微信网站后期运营怎么做企业培训内容
  • 北京 做网站比较有名的百度网盘网站入口
  • 怎么投诉网站制作公司优化seo培训班
  • 哪个网站做兼职猎头宜兴百度推广公司
  • 公司代办注册要多少钱提升神马seo关键词自然排名
  • wordpress mip站百度移动端关键词优化
  • 网站建设视频直播功能表营销型网站建设公司价格
  • 叫别人做网站需要注意什么问题网络科技公司网站建设
  • 长安外贸网站建设公司快速优化seo软件推广方法
  • 怎么把做的网页放入网站seo优化网站快速排名
  • 网站优化怎么做 有什么技巧网络营销措施有哪些
  • 网络营销seo优化seo人才网
  • 株洲网站建设百度推广关键词怎么设置好
  • 帮做非法网站设计网站官网
  • 绵阳网站开发公司最近国家新闻
  • 个人网站可以如果做淘宝客广告关键词
  • 大型大型网站建设方案百度教育官网登录入口
  • 商城网站建设咨询推广策划方案范文
  • 连云港做网站的优化大师怎么删除学生
  • wordpress响应时间做seo需要哪些知识
  • 浏阳做网站的有哪几家竞价销售是什么意思