Template-ready RHEL7 post-installation

Last-minute

yum update
uname -r
rpm -qa | grep kernel
sync && reboot

uname -r
yum install wget
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -ivh epel-release-latest-7.noarch.rpm

https://fedoraproject.org/wiki/EPEL

eventually get ELRepo (DRBD9)

#rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
#wget https://www.elrepo.org/elrepo-release-7.el7.elrepo.noarch.rpm
#rpm -ivh elrepo-release-7.el7.elrepo.noarch.rpm

http://elrepo.org/tiki/tiki-index.php

Quick shot

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


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun