NSAS Wiki

Network System Access Solutions

User Tools

Site Tools


Sidebar

Contact

linux:rhel

redhat

RHEL wird als Basis fuer zukuenftige Oracle Installationen genutzt.

Redhat update service

Um den Update Service zu nutzen muss folgendes eingetragen sein.

Lekker Update Server

hostname ip
rhel-update172.20.0.110

Mirror script auf rhel-update

/root/scripts/mirror.sh
#!/bin/bash
#===============================================================================
#
#          FILE:  mirror.sh
#
#         USAGE:  ./mirror.sh
#
#   DESCRIPTION: This script will mirror the yum Redhat Enterprice repos
#                and generats a local repository.
#
#       OPTIONS:  ---
#  REQUIREMENTS:  ---
#          BUGS:  ---
#         NOTES:  ---
#        AUTHOR: Michèl Pelzer (mp), michel.pelzer@lekker-energie.de
#       COMPANY: Lekker Energie GmbH
#       CREATED: 06/28/2012 12:08:43 PM CEST
#      REVISION:  ---
#     COPYRIGHT: Copyright (c) 2012, Michèl Pelzer 
#
#===============================================================================
#set -x         # Display commands and their arguments as they are executed.
#set -v         # Display shell input lines as they are read.
#set -n         # Read commands but do not execute them. This may be used to check a shell script for syntax errors.
set -o nounset  # Treat unset variables as an error
 
echo Updating Lekker RHEL Mirror
MIRRORPATH="/export/updates/rhel6/x86_64"
 
#Mirror Redhat
echo -en "-> Updating Redhat Packages\t\t"
reposync -n -q -p /export/updates --repoid=rhel-x86_64-server-6 -l >/dev/null 2>&1 && echo done || echo failed
 
#Mirror VMware
echo -en "-> Updating VMware Packages\t\t"
cd /tmp
wget -l 1 -r http://packages.vmware.com/tools/esx/4.1latest/rhel6/x86_64 >/dev/null 2>&1
find . -type f -name "*.rpm" -exec mv {} ${MIRRORPATH}/ \; >/dev/null 2>&1 && echo done || echo failed
 
#Update Mirror
echo -en "-> Updating Mirror\t\t\t"
cd ${MIRRORPATH}
createrepo . >/dev/null 2>&1 && echo done || echo failed
 
#Generating gpg signature
echo -en "-> Updating gpg signature\t\t"
cd ${MIRRORPATH}/repodata
test -f repomd.xml.asc && rm repomd.xml.asc >/dev/null 2>&1
echo 'passwd' | gpg --passphrase-fd 0 --passphrase passwd --detach-sign --armor repomd.xml >/dev/null 2>&1 && echo done || echo failed
 
echo -en "-> clean up\t\t\t\t"
rm -rf /tmp/packages.vmware.com >/dev/null 2>&1 && echo done || echo failed

Repos Quelle anlegen

Hier erfolgt die Konfiguration, das unten genannte File muss eventuell erstellt werden.

/etc/yum.repos.d/lekker.repo
[lekker]
name=Lekker Energie
baseurl=http://rhel-update.intern.local/rhel6/$basearch
enabled=1
gpgcheck=1

Lekker GPG importieren

rpm --import http://rhel-update.intern.local/keys/LEKKER-GPG.pub

Einrichtung pruefen

yum repolist

Register your Redhat Installation ist nur noetige, sofern man Redhat Support nutzen moechte.

rhn_register --nox

Install Vmware tools

yum -y install vmware-open-vm-tools-nox

Update

yum update

SELinux

Test if running.

selinuxenabled && echo enabled || echo disabled

Disable

echo 0 > /selinux/enforce

Enable

echo 1 > /selinux/enforce

Permanent disable

/etc/sysconfig/selinux
SELINUX=disabled
SELINUXTYPE=targeted 

Network configuration

system-config-network-tui

GPG KEY

Erstellen des LEKKER-GPG.pub

gpg --armor --export admin@lekker-energie.de > keys/LEKKER-GPG.pub
linux/rhel.txt · Last modified: 2013/05/23 11:36 (external edit)