Files
oceanbase/docs/docs-cn/4.installation-and-deployment/4.optional-check-the-operating-system.md
2022-02-10 14:51:49 +08:00

3.8 KiB

(可选)查看资源

如果您是企业用户,建议您在部署 OceanBase 集群时,所有的机器使用相同的软硬件配置。如果您部署的是单机版 OceanBase 数据库,您可以跳过此步骤。OceanBase 数据库支持 Red Hat Enterprise Linux Server 7.X、CentOS 7.X 和 Anolis OS 8.X 等操作系统。详细信息,参考 资源准备说明

本文中的配置文件指使用 OBD 部署 OceanBase 数据库时需要配置的文件。更多配置文件信息,参考 配置文件示例

查看操作系统

Red Hat Enterprise Linux Server 7.X

运行以下命令,查看操作系统信息:

cat /etc/redhat-release

返回结果如下:

 Red Hat Enterprise Linux Server release 7.2 (Maipo)

CentOS 7.X

运行以下命令,查看操作系统信息:

cat /etc/redhat-release

返回结果如下:

CentOS Linux release 7.2.1511 (Core)

Anolis OS 8.X

运行以下命令,查看操作系统信息:

cat /etc/os-release

返回结果如下:

NAME="Anolis OS"
VERSION="8.2"
ID="anolis"
ID_LIKE="rhel fedora centos"
VERSION_ID="8.2"
PLATFORM_ID="platform:an8"
PRETTY_NAME="Anolis OS 8.2"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.org/"

Unbutu

运行以下命令,查看操作系统信息:

cat /etc/os-release

返回结果如下:

NAME="Ubuntu"
VERSION="20.04.2 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.2 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

Debian9

运行以下命令,查看操作系统信息:

cat /etc/os-release

返回结果如下:

PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_CODENAME=stretch
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

查看内核

运行以下命令,查看内核信息:

uname -r 

OceanBase 数据库要求操作系统为 3.10.0 及以上。

查看内存

运行以下命令,查看内存:

free -g

如果可用内存小于配置文件中的 memory_limit 值,请清理缓存或者修改配置 memory_limit,将 memory_limit 修改为小于可以内存的值。

执行以下命令,清理缓存:

echo 3 > /proc/sys/vm/drop_caches

查看磁盘

运行以下命令,查看磁盘:

df -h

确保配置文件中的 data_dirredo_dirhome_path 对应的磁盘已经完成挂载。data_dirredo_dir 对应目录为空,data_dir 对应目录的磁盘已经使用率必须低于 4%。

查看网卡名称

您需要为配置文件中的 devname 配置项指定网卡。示例配置文件如下:

# Please set devname as the network adaptor's name whose ip is  in the setting of severs.
# if set severs as "127.0.0.1", please set devname as "lo"
# if current ip is 192.168.1.10, and the ip's network adaptor's name is "eth0", please use "eth0"
devname: eth0

执行以下命令,查看网卡名称:

ifconfig

注意

要执行 ifconfig 命令,您必须安装 net-tools 依赖。