List
代码语言:javascript复制CentOS7.3
alertmanager-0.19.0.linux-amd64.tar.gz
mysql-5.7.23-1.el7.x86_64.rpm-bundle.tar
mysqld_exporter-0.12.1.linux-amd64.tar.gz
prometheus-2.13.0.linux-amd64.tar.gz
节点名 | IP | 软件版本 | 说明 |
---|---|---|---|
prometheus-master | 172.19.0.55 | alertmanager-0.19/prometheus-2.13.0 | Prometheus联邦集群Master节点 |
prometheus-slave | 172.19.0.56192.168.50.10 | prometheus-2.13 | Prometheus联邦集群slave节点(proxy) |
prometheus_mysql | 192.168.50.5 | mysqld_exporter-0.10/mysql-5.7.23.rpm-bundle.tar | Prometheus的Mysql_Test节点 |
初始化系统环境
代码语言:javascript复制1.初始化
init_security() {
systemctl stop firewalld
systemctl disable firewalld &>/dev/null
setenforce 0
sed -i '/^SELINUX=/ s/enforcing/disabled/' /etc/selinux/config
sed -i '/^GSSAPIAu/ s/yes/no/' /etc/ssh/sshd_config
sed -i '/^#UseDNS/ {s/^#//;s/yes/no/}' /etc/ssh/sshd_config
systemctl enable sshd crond &> /dev/null
rpm -e postfix --nodeps
echo -e "