页面树结构
转至元数据结尾
转至元数据起始


安装高性能版本前的服务器相关环境配置。

由于Kubernetes的规定,主机名只支持包含-和.(中横线和点)两种特殊字符,其他字符不支持,并且主机名不能重复。

如果主机名包含其他特殊字符,请修改主机名:hostnamectl set-hostname 新主机名 (主机名修改前,请确认是否会影响服务器中已有的服务)

每台主机要在/etc/hosts中增加主机名和ip的映射关系。

系统环境准备

防火墙配置

为了便于安装,建议在安装前关闭防火墙。使用过程中,为了系统安全可以选择启用防火墙,但必须启用Smartbi使用到的相关端口。

1.关闭防火墙

临时关闭防火墙

systemctl stop firewalld

永久关闭防火墙

systemctl disable firewalld

查看防火墙状态

systemctl status firewalld

2.开启防火墙

如果确实需要打开防火墙安装,需要给防火墙放开以下需要使用到的端口

服务名

对内端口

对外端口

smartbi-tomcat

18080

31080

smartbi-mysql

3306

30306

smartbi-engine

4040,8899,8900

31003

smartbi-infobright

5029

30029

smartbi-export

3003

32003

harbor

5000

5000



Rancher


Rancher 节点

8088,8443,22,2376

Etcd节点

2379-2380,6443,443,9099,8472/udp

Control Plane 节点

443,2379-2380,6443,10250,9099,10254,8472/udp

Worker节点

443,9099,10254,8472/udp

开放相关端口:

firewall-cmd --permanent --add-port=8088/tcp
firewall-cmd --permanent --add-port=8443/tcp
firewall-cmd --permanent --add-port=2376/tcp
firewall-cmd --permanent --add-port=31080/tcp
firewall-cmd --permanent --add-port=30306/tcp
firewall-cmd --permanent --add-port=31003/tcp
firewall-cmd --permanent --add-port=30029/tcp
firewall-cmd --permanent --add-port=32003/tcp
firewall-cmd --permanent --add-port=5000/tcp

Ps:多台机器部署集群时,需要额外开启Rancher中Etcd节点,Control Plane 节点,Worker节点中的端口。

配置完以后重新加载firewalld,使配置生效

firewall-cmd --reload

查看防火墙的配置信息

firewall-cmd --list-all

3.关闭selinux

临时关闭selinux,立即生效,不需要重启服务器。

setenforce 0

永久关闭selinux,修改完配置后需要重启服务器才能生效

sed -i 's/=enforcing/=disabled/g'  /etc/selinux/config

系统相关设置

转发配置ipv4转发

centos系统下使用root账号在命令行执行

echo 'net.ipv4.ip_forward=1' >> /etc/sysctl.conf && service network restart 

禁用Swap

swapoff -a

取消打开文件数限制

在/etc/security/limits.conf 文件的末尾加入以下内容:

* soft nofile 65536
* hard nofile 65536
* soft nproc 131072
* hard nproc 131072

在/etc/sysctl.conf中,添加以下内容:

fs.inotify.max_user_watches=524288 
fs.inotify.max_user_instances=8192 

  保存后,执行以下命令让设置生效

sudo sysctl -p /etc/sysctl.conf

系统环境准备完成,可以开始安装docker以及rancher控制台:简版--安装配置Rancher控制台


  • 无标签