Update 'update.sh'
This commit is contained in:
24
update.sh
24
update.sh
@@ -65,17 +65,25 @@ elif [ ${OS} == 'CentOS' ]; then
|
||||
# clean the yum cache
|
||||
yum clean all
|
||||
|
||||
# install the packages
|
||||
yum install -y pbis-open sudo nano htop nload iperf iperf3 bind-utils open-vm-tools yum-cron unzip nfs-utils git wget uptimed net-tools make
|
||||
|
||||
# remove unneeded packages
|
||||
yum autoremove -y
|
||||
|
||||
# Centos 7
|
||||
if [[ ${OS_VER} =~ ^7.* ]]; then
|
||||
# install the packages
|
||||
yum install -y pbis-open sudo nano htop nload iperf iperf3 bind-utils open-vm-tools yum-cron unzip nfs-utils git wget uptimed net-tools make
|
||||
|
||||
# modify yum-cron config to auto install security updates and enable/start the service
|
||||
sed --in-place "s/^update_cmd\ =\ security/update_cmd\ =\ default/" /etc/yum/yum-cron.conf
|
||||
sed --in-place "s/^apply_updates\ =\ no/apply_updates\ =\ yes/" /etc/yum/yum-cron.conf
|
||||
systemctl enable yum-cron
|
||||
systemctl restart yum-cron
|
||||
# modify yum-cron config to auto install security updates and enable/start the service
|
||||
sed --in-place "s/^update_cmd\ =\ security/update_cmd\ =\ default/" /etc/yum/yum-cron.conf
|
||||
sed --in-place "s/^apply_updates\ =\ no/apply_updates\ =\ yes/" /etc/yum/yum-cron.conf
|
||||
systemctl enable yum-cron
|
||||
systemctl restart yum-cron
|
||||
fi
|
||||
# Centos 7
|
||||
if [[ ${OS_VER} =~ ^8.* ]]; then
|
||||
# install the packages
|
||||
yum install -y pbis-open sudo nano htop iperf3 bind-utils open-vm-tools dnf-cron unzip nfs-utils git wget net-tools make
|
||||
fi
|
||||
|
||||
# modify ssh to allow root login and then restart the service
|
||||
sed --in-place "s/^#PermitRootLogin\ yes/PermitRootLogin\ yes/" /etc/ssh/sshd_config
|
||||
|
||||
Reference in New Issue
Block a user