-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcentos-inicial.sh
38 lines (26 loc) · 1.01 KB
/
centos-inicial.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# /bin/bash
# /bin/bash
#Get script path
SCRIPT=$(readlink -f "$0")
echo -e "Disable selinux"
sudo sed -i 's/enforcing/disabled/g' /etc/selinux/config /etc/selinux/config
sudo sestatus
echo -e "Disable firewall"
systemctl stop firewalld
systemctl disable firewalld
echo -e "Change SSH port to 9001"
echo "Port 9001" >> /etc/ssh/sshd_config
echo -e "Change root color"
bashrc='/etc/bashrc'
script64='IyBDb2xvcnMgaW4gVGVybWluYWwKaWYgWyAkVVNFUiA9IHJvb3QgXTsgdGhlbgogICAgICAgIFBTMT0nXFtcMDMzWzE7MzFtXF1bXHVAXGggXFddXCRcW1wwMzNbMG1cXSAnCmVsc2UKICAgICAgICBQUzE9J1xbXDAzM1swMTszMm1cXVx1QFxoXFtcMDMzWzAwbVxdIFxbXDAzM1swMTszNG1cXVxXXFtcMDMzWzAwbVxdXFtcMDMzWzE7MzJtXF1cJFxbXDAzM1ttXF0gJwpmaQo='
echo $script64 | base64 -d >> $bashrc
echo -e "Change timezone to Europe/Zagreb"
timedatectl set-timezone Europe/Zagreb
echo -e "EPEL"
yum install epel-release -y
echo -e "HTOP & VNSTAT & FTP & NANO & SCREEN"
yum install htop vnstat ftp nano screen wget -y
echo -e "Done for now \nPlease reboot"
echo -e "Clean up"
rm -rf "$SCRIPT"
bash