RPM for SEACloud

## add htop 
## Cent7
rpm -Uvh https://jason.163-8.com/files/htop-2.0.2-1.el7.x86_64.rpm

## Cent8
rpm -Uvh https://jason.163-8.com/files/cent8/htop-3.2.1-1.el8.x86_64.rpm
## add screen 
## Cent7
rpm -Uvh https://jason.163-8.com/files/screen-4.1.0-0.19.20120314git3c2946.el7.x86_64.rpm
## Cent8
rpm -Uvh https://jason.163-8.com/files/cent8/screen-4.6.2-12.el8.x86_64.rpm
## add snmpd and community 
wget --no-check-certificate https://jason.163-8.com/files/net-snmp-libs-5.7.2-38.el7_6.2.x86_64.rpm
wget --no-check-certificate https://jason.163-8.com/files/net-snmp-agent-libs-5.7.2-38.el7_6.2.x86_64.rpm
wget --no-check-certificate https://jason.163-8.com/files/net-snmp-5.7.2-38.el7_6.2.x86_64.rpm

rpm -Uvh net-snmp-libs-5.7.2-38.el7_6.2.x86_64.rpm
rpm -Uvh net-snmp-agent-libs-5.7.2-38.el7_6.2.x86_64.rpm
rpm -Uvh net-snmp-5.7.2-38.el7_6.2.x86_64.rpm

rm -rf net-snmp-*


cat << EOF > /etc/snmp/snmpd.conf
com2sec mynetwork 0.0.0.0/0 zstackrom
group MyROGroup any mynetwork
view all included .1 80
access MyROGroup "" any noauth 0 all none none
syslocation Thailand
syscontact IT <[email protected]>
EOF
#
systemctl enable snmpd
systemctl restart snmpd


## add lm_sensors

wget --no-check-certificate https://jason.163-8.com/files/lm_sensors-3.4.0-8.20160601gitf9185e5.el7.x86_64.rpm
wget --no-check-certificate https://jason.163-8.com/files/lm_sensors-libs-3.4.0-8.20160601gitf9185e5.el7.x86_64.rpm

rpm -Uvh lm_sensors*

rm -rf lm_sensors*


sed -i '/server 0.centos.pool.ntp.org iburst/c server 202.170.119.19' /etc/chrony.conf
sed -i '/server 1.centos.pool.ntp.org iburst/c server 202.170.119.9' /etc/chrony.conf
sed -i '/server 2.centos.pool.ntp.org iburst/c server 103.246.188.99' /etc/chrony.conf
sed -i '/server 3.centos.pool.ntp.org iburst/c #' /etc/chrony.conf
systemctl enable chronyd
systemctl restart chronyd
#
## add lm_sensors
wget --no-check-certificate https://jason.163-8.com/files/lm_sensors-3.4.0-8.20160601gitf9185e5.el7.x86_64.rpm
wget --no-check-certificate https://jason.163-8.com/files/lm_sensors-libs-3.4.0-8.20160601gitf9185e5.el7.x86_64.rpm
rpm -Uvh lm_sensors*
rm -rf lm_sensors*

Set Firewall toAccept all

echo '#!/bin/bash' > /root/firewall.sh
echo "" >> /root/firewall.sh
echo "IPT=/sbin/iptables" >> /root/firewall.sh
echo "" >> /root/firewall.sh
echo "\$IPT --flush" >> /root/firewall.sh
echo "\$IPT --delete-chain" >> /root/firewall.sh
echo "" >> /root/firewall.sh
echo "\$IPT -P INPUT ACCEPT" >> /root/firewall.sh
echo "\$IPT -P FORWARD ACCEPT" >> /root/firewall.sh
echo "\$IPT -P OUTPUT ACCEPT" >> /root/firewall.sh
echo "" >> /root/firewall.sh

chmod +x /root/firewall.sh
#
chmod +x /etc/rc.d/rc.local
#

echo "/root/firewall.sh" >> /etc/rc.d/rc.local