Red Hat specific
There is a free version of Satellite Server called Spacewalk that works for Fedora and Centos clients. Satellite requires Oracle (suck), but Red Hat is working on a mysql/postgres solution. Incidentally our instructor hinted that RHEL desktop might be dropped soon in favour of free Fedora desktops for enterprise customers.
Red Hat is looking at removing the --no-deps option from RPM because too many people break their install with it.
To update your yum repo with createrepo, you should delete the repodata directory. Since creating a repo is slow with many packages, you should separate out your corporate packages that require regular changes into a separate repo.
You can do a kickstart from GRUB directly by adding some kernel params (the ksdevice removes a prompt on devices with multiple interfaces, and noipv6 cuts out a long ipv6 timeout):
ks=http://my.kickstart/box.cfg ksdevice=eth0 noipv6The easy way to configure network services on Red Hat is to use the 'setup' ncurses UI, which calls out to the relevant Text User Interfaces (TUIs) such as 'system-config-network-tui'
Configure and manage LVM with system-config-lvm. It is an impressive GUI, and makes resizing partitions and file systems really easy.
Install the setroubleshoot server and use the GUI to find selinux problems (it usually gives you a sensible solution):
sealert -bTo change a selinux context to a reference context, ie. give the file the same context as /home:
chcon --reference=/home /home/newYou also can change selinux context by specifying a context from the many pre-built ones available from the targeted policy in the /etc/selinux directory:
chcon -t public_content_t /shared
chcon -t samba_share_t /windowsshareTo check selinux status (e.g is it enforcing?):
sestatusTo see the selinux status of files/processes, add 'Z' to the usual tools:
ps -auxZYou can also see status and change it with (also handles iptables):
system-config-securitylevel-tuiiptables rules are stored in /etc/sysconfig/iptables and can be edited directly, or rules applied and then saved with 'service iptables save'
If you have more than one mail agent installed (e.g. sendmail and postfix), you can switch between them with the 'system-switch-mail' ncurses gui, which is a frontend to the alternatives system.
Other Random Learnings
The kernel limits the number of partitions possible on IDE and SCSI/SATA disks in different ways (in addition to the MBR limitations of 3 primary and 1 extended). For IDE (/dev/hd*), the max number of partitions is 63, for SCSI/SATA (/dev/sd*) it is 15.
To view and set disk labels for ext2/3:
e2label /dev/sda1 labeldumpe2fs will also show you the mount defaults for the partition, which is handy to know when /etc/fstab just says 'defaults'. You can change these defaults with 'tune2fs', this adds the 'acl' option:
tune2fs -o acl /dev/sda1To get disk labels and UUIDs:
blkidThen if you want to know which device has that label or UUID:
fuser UUID="sdfkshdfkjshdkjshdf"Backup a disk partition table with:
sfdisk -d /dev/sda > sda.backupTo find out which process is holding a mount point:
fuser -m /mnt/pointand to kill all those processes (be careful):
fuser -km /mnt/pointTo get serial numbers and other information from the system management BIOS (handy when you are in a different location to a server):
dmidecodex86info has a nicer formatted version of the /proc/cpuinfo CPU information
To see if a NIC has a link I usually use ethtool, but that isn't installed by default, so if it is unavailable:
ip link show eth0You can get access to the bootloader of a xen machine with:
xm create -c xenname