检查主机

检查主机的资源是否符合 使用限制 章节中 硬件要求 的最低要求。

cat /proc/cpuinfo | grep processor | wc -l;
free -g;
uname -a;
df -h;

检查端口

通过 telnet , nc 或者 netstat 命令检查运行 TEM 服务需要的监听端口是否被其他进程占用,具体检查项参见 组件监听端口列表

# 通过 telnet 命令检查,如果被占用会出现 '>' 提示,如果没被占用,返回 telnet: connect to address xxx.xxx.xxx.xxx: Connection refused telnet xxx.xxx.xxx.xxx $PORT # 通过 nc 命令检查端口, 如果被占用返回值为 0, 如果没被占用返回值不等于 0 echo hi | nc xxx.xxx.xxx.xxx $PORT -w 2 > /dev/null 2>&1 echo $? # 通过 netstat 命令查看端口 sudo netstat -anp | grep -w $PORT

检查软件版本

通过主机系统上的包管理命令检查 使用限制 章节中 软件要求 列举的软件包是否都已经满足要求。

检查时间

  • 如果配置了 ntp 服务,可以通过 ntpstat 命令检查。
  • 如果没有 ntp 服务,可以通过 date 命令检查主机上的时间,对比各个主机的时间差。