Template-ready RHEL7 post-installation

less /usr/share/centos-release/EULA

systemctl stop firewalld
systemctl disable firewalld

setenforce 0
#DO NOT MOVE THAT FILE - IT IS A SYMLINK TO ../selinux/config
ls -lF /etc/sysconfig/selinux*
ls -lF /etc/selinux/config*
cp -pi /etc/selinux/config /etc/selinux/config.dist
echo SELINUX=disabled > /etc/selinux/config

systemctl list-unit-files | grep -i manager
systemctl stop NetworkManager.service
systemctl stop NetworkManager-wait-online.service
systemctl stop NetworkManager-dispatcher.service
systemctl disable NetworkManager.service
systemctl disable NetworkManager-wait-online.service
systemctl disable NetworkManager-dispatcher.service

cp -pi /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ANACONDA.ifcfg-eth0
vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE="eth0"
IPADDR="x.x.x.x"
PREFIX="24"
GATEWAY="x.x.x.x"
DNS1="x.x.x.x"

#echo GATEWAY=x.x.x.x > /etc/sysconfig/network
service network restart
hostname

yum update
yum install net-tools

systemctl stop sshd
rm -f /etc/ssh/ssh_host_*
poweroff

New guest

vi /etc/hostname
vi /etc/sysconfig/network-scripts/ifcfg-eth0
vi /etc/hosts
#systemctl stop sshd
#rm -f /etc/ssh/ssh_host_*
reboot

xl console $guest

Further setup

yum install ksh mlocate
updatedb

usermod -aG wheel root

setup sshd


Nethence | Pub | Lab | Pbraun | SNE Russia | xhtml