更新 'cg_init_machine.sh'
This commit is contained in:
parent
48bbecbd86
commit
ed9fe0919b
|
|
@ -12,3 +12,16 @@ mkdir -p /home/cg_maintain_user/.ssh
|
|||
touch /home/cg_maintain_user/.ssh/authorized_keys
|
||||
chown -R cg_maintain_user:cg_maintain_user /home/cg_maintain_user
|
||||
chmod 600 /home/cg_maintain_user/.ssh/authorized_keys
|
||||
|
||||
if command -v yum &> /dev/null
|
||||
then
|
||||
yum install -y net-snmp
|
||||
else
|
||||
apt-get install -y snmpd
|
||||
fi
|
||||
|
||||
sudo cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.bak
|
||||
sudo curl -L -o /etc/snmp/snmpd.conf https://git.tobyliu.com/toby/common-tools/raw/branch/main/snmpd.conf
|
||||
sudo systemctl restart snmpd
|
||||
sudo firewall-cmd --zone=public --add-service=snmp --permanent
|
||||
sudo firewall-cmd --reload
|
||||
|
|
|
|||
Loading…
Reference in New Issue