Last active
December 12, 2019 20:27
-
-
Save SiddheshNan/6d0a233dcea4d90b7a6b3ba586f941c6 to your computer and use it in GitHub Desktop.
CentFreshStartScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo 'Updating Packages...' | |
sudo yum update -y | |
echo 'Adding EPEL...' | |
sudo yum install epel-release -y | |
echo 'Setting timezone...' | |
sudo timedatectl set-timezone Asia/Kolkata | |
echo 'Setting up firewall...' | |
sudo yum install firewalld -y | |
sudo systemctl start firewalld | |
sudo systemctl enable firewalld | |
sudo firewall-cmd --state | |
sudo firewall-cmd --permanent --zone=public --add-service=http | |
sudo firewall-cmd --permanent --zone=public --add-service=https | |
sudo firewall-cmd --permanent --zone=public --add-service=ssh | |
sudo firewall-cmd --reload | |
echo 'Installing essential packages...' | |
sudo yum install cmake gcc wget zip unzip curl rkhunter nano vim pv docker -y | |
echo 'Installing Nginx...' | |
sudo yum install nginx -y | |
sudo systemctl enable nginx | |
sudo systemctl start nginx | |
echo 'Please wait while Swapfile is Creating...' | |
sudo dd if=/dev/zero of=/swapfile count=4096 bs=1MiB | |
echo 'Setting up Swap...' | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
sudo sh -c 'echo "/swapfile none swap sw 0 0" >> /etc/fstab' | |
echo 'Done! Please Reboot the system manually' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment