This is an old revision of the document!


CentOS

Software

What repositories are used by default?
repo id repo name
base CentOS-5 - Base
extras CentOS-5 - Extras
updates CentOS-5 - Updates
How to edit repositories
Notes

Some times yum looks for perl URI, but can't find it. Here is a workaround:

wget http://mirror.centos.org/centos/5/os/i386/CentOS/perl-URI-1.35-3.noarch.rpm
rpm -Uvh perl-URI-1.35-3.noarch.rpm

Network Install

Server: mirrors.kernel.org

Path: centos/5/os/i386

For CentOS 6:

Path: http://archive.kernel.org/centos-vault/6.6/os/x86_64/

If you want to do a text install, add text to the boot options from the SYSLINUX menu.

Basics

yum update
yum -y install screen yum-utils yum-protect-packages yum-protectbase

Services

See running services
service --status-all | less
Manage a service
service <name> [start|stop|status|restart]
Manage service configurations

See /etc/sysconfig

Add, remove a service from startup

ncurses interface

ntsysv

manually

chkconfig --add <service>
chkconfig --del <service>
Create my own service to run at startup

Add it in /etc/init.d, make it executable, then chkconfig service on

System

Install development tools
yum groupinstall 'Development Tools'
Edit environment variables

Edit /etc/environment

Edit cron jobs
crontab -e
Send outgoing email
echo <message> | mailx -s <subject> <address>