CentOS 7/FineTune

Uit WaaaghPedia


Helaas ben ik overgestapt naar Ubuntu als linux platform, CentOS wordt niet meer bijgehouden!

Maak nieuwe gebruiker en voeg deze in de sudoers groep

https://plusbryan.com/my-first-5-minutes-on-a-server-or-essential-security-for-linux-servers

Importeer SSH Sleutels

SSH Keys

Update CentOS


Helaas ben ik overgestapt naar Ubuntu als linux platform, CentOS wordt niet meer bijgehouden!
yum clean all
yum check-update
yum update -y --disableplugin=fastestmirror

Auto Update

https://linuxaria.com/howto/enabling-automatic-updates-in-centos-7-and-rhel-7

Install packages

yum install -y nano wget net-tools NetworkManager-tui curl unzip tar git gcc screen ntp yum-utils epel-release
yum install -y htop deltarpm
yum updateinfo list security all
yum update --security
yum -y install yum-cron
systemctl start yum-cron
systemctl enable yum-cron
systemctl enable ntpd
systemctl start ntpd
ntpdate -s pool.ntp.org
date
echo 'alias vi="nano"' >> ~/.bashrc
echo 'alias ll="ls -ls"' >> ~/.bashrc
echo 'export PS1="\[\033[38;5;11m\]\u\[$(tput sgr0)\]\[\033[38;5;15m\]@\h\[$(tput sgr0)\]\[\033[38;5;6m\][\w]:\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]"' >> ~/.bashrc

Draait u deze machine op en virtueel platform? Installeer dan de juiste Guest tools

SELinux Uitschakelen

sed -i /etc/selinux/config -r -e 's/^SELINUX=.*/SELINUX=disabled/g'

Webmin

nano /etc/yum.repos.d/webmin.repo
[Webmin]
name=Webmin Distribution Neutral
#baseurl=http://download.webmin.com/download/yum
mirrorlist=http://download.webmin.com/download/yum/mirrorlist
enabled=1
wget http://www.webmin.com/jcameron-key.asc
rpm --import jcameron-key.asc
yum install webmin -y
systemctl start webmin
systemctl enable webmin
firewall-cmd --zone=public --permanent --add-port=10000/tcp
firewall-cmd --reload