!/bin/bash

sudo yum -y install epel-release
sudo yum -y install wget
sudo yum -y install psmisc
sudo yum -y install net-tools
sudo yum -y install tar
sudo yum -y install vim*
sudo yum -y install htop
sudo yum -y install python-pip
sudo pip install pystun
sudo yum -y install nload

echo 49.234.47.74 download.openfogos.com >> /etc/hosts
echo 49.234.47.74 updatetencent.webrtc.win >> /etc/hosts
echo 49.234.47.74 docker.webrtc.win >> /etc/hosts

setenforce 0
systemctl stop firewalld.service
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
systemctl disable firewalld.service

chmod 777 /etc/rc.local
chmod 777 /etc/rc.d/rc.local

wget http://download.openfogos.com/test/kernel-5.4.119-19.0006.tl2.x86_64.rpm
rpm -ivh --force kernel-5.4.119-19.0006.tl2.x86_64.rpm

wget http://download.openfogos.com/test/grub -P /etc/default/
grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg

wget http://download.openfogos.com/test/centos_init.tar.gz
tar -zxvf centos_init.tar.gz -C /

reboot
