2. TABLA DE CONTENIDO
Políticas de redistribución ...................................................................................................................................... 3
Introducción.......................................................................................................................................................................... 4
Acerca de CentOs ................................................................................................................................................................ 4
1. Deshabilitar el firewall ................................................................................................................................. 5
2. Deshabilitar el SELinux ................................................................................................................................... 5
3. Deshabilitar soporte para IP V.6. ........................................................................................................... 5
4. Deshabilitar todos los servicos ................................................................................................................ 5
5. Habilitar servicios indispensables ......................................................................................................... 5
6. Crear los directorios de trabajo .............................................................................................................. 6
7. Crear scripst básicos ........................................................................................................................................ 6
a. Script tailm.............................................................................................................................................................. 6
b. Alias “l” (ele) ...................................................................................................................................................... 6
8. Modificar arranque del sistema................................................................................................................... 7
9. Configuraciones de red ...................................................................................................................................... 7
10. Configuración de resolución local ........................................................................................................... 8
11. Sacar una imagen del DVD instalador ........................................................................................... 8
12. Modificar el nivel de arranque................................................................................................................... 9
13. Descargar e Instalar Repositorios ........................................................................................................... 9
a. Paquete EPEL.............................................................................................................................................................. 9
b. Paquete RPMFORGE .................................................................................................................................................. 10
14. Reiniciado de equipo ........................................................................................................................................ 10
4. Introducción
Este Manual es mi pequeña contribución para la comunidad de usuarios Linux. En él
encontraran los pasos básicos para aplicarse post-instalación nueva, en el manual se
asume que el usuario sabe manejar mínimamente el programa de edición de texto “vim”.
Autor: José Miguel Cabrera Dalence
Santa Cruz – Bolivia
Noviembre de 2012
Acerca de CentOs
CentOS (Community ENTerprise Operating System) es una bifurcación a nivel binario de
la distribución Linux Red Hat Enterprise Linux RHEL, compilado por voluntarios a
partir del código fuente liberado por Red Hat.
Red Hat Enterprise Linux se compone de software libre y código abierto, pero se
publica en formato binario usable (CD-ROM o DVD-ROM) solamente a suscriptores
pagados. Como es requerido, Red Hat libera todo el código fuente del producto de
forma pública bajo los términos de la Licencia pública general de GNU y otras
licencias. Los desarrolladores de CentOS usan ese código fuente para crear un
producto final que es muy similar al Red Hat Enterprise Linux y está libremente
disponible para ser bajado y usado por el público, pero no es mantenido ni asistido
por Red Hat. Existen otras distribuciones también derivadas de los fuentes de Red
Hat.
CentOS usa yum para bajar e instalar las actualizaciones, herramienta también
utilizada por Fedora.
Fuente: http://es.wikipedia.org/wiki/CentOS
5. 1. Deshabilitar el firewall
Escriba los siguients comandos:
chkconfig iptables off
service iptables stop
2. Deshabilitar el SELinux
Modificar el archivo lo siguiente.
vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection. SELINUXTYPE=targeted
3. Deshabilitar soporte para IP V.6.
Adicionar al final del archivo lo siguiente.
vi /etc/sysctl.conf
## Desahbilitar IPv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
4. Deshabilitar todos los servicos
Ejecutar los siguientes comandos
chkconfig --list | grep 5:activo | awk '{ print $1 }' > servicios.txt
for i in $(cat servicios.txt); do chkconfig $i off; done
5. Habilitar servicios indispensables
chkconfig network on
chkconfig sshd on
chkconfig crond on
chkconfig haldaemon on
chkconfig messagebus on
chkconfig rsyslog on
6. 6. Crear los directorios de trabajo
Escribir el siguiente comando
cd
mkdir -p {bin,conf,targz,rpms}
7. Crear scripst básicos
a. Script tailm
cd /root/bin
vi tailm
##Contenido archivo tailm
tail -n 50 -f /var/log/messages
chmod +x /root/bin/tailm
b. Alias “l” (ele)
Adicionar al final del archivo (shift + g)
vi /etc/bashrc
alias l='ls -lhF'
7. 8. Modificar arranque del sistema
Modificar el archivo, eliminar la palabra “rhgb”
vi /etc/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/mapper/vg_jmcabrera-lv_root
# initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=3
splashimage=(hd0,0)/grub/splash.xpm.gz hiddenmenu
title CentOS (2.6.32-220.el6.i686)
root (hd0,0)
kernel /vmlinuz-2.6.32-220.el6.i686 ro root=/dev/mapper/vg_jmcabrera-lv_root
rd_NO_LUKS
LANG=es_ES.UTF-8 rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb
crashkernel=auto KEYBOARDTYPE=pc
KEYTABLE=la-lat
in1 rd_LVM_LV=vg_jmcabrera/lv_swap rd_LVM_LV=vg_jmcabrera/lv_root rd_NO_DM
initrd /initramfs-2.6.32-220.el6.i686.img
9. Configuraciones de red
Adicionar lo siguiente
vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=jmcabrera
NETWORKING_IPV6=no
NOZEROCONF=yes
VLAN=yes
8. 10. Configuración de resolución local
Modificar el archivo de manera que sea similar al siguiente:
(reemplazar jmcabrera por el nombre de su equipo)
vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost jmcabrera
11. Sacar una imagen del DVD instalador
Esto con la finalidad de poder utilizarlo cuando deseemos instalar paquetes
adicionales (si esta trabajando en una Maquina virtual omitir este paso)
mkdir /media/CentOS mkdir /isos
umount /dev/cdrom
dd if=/dev/sr0 of=/isos/CentOS-6.3-x86_64-bin-DVD1.iso
Este proceso demora aproximadamente 30 minutos
9. 12. Modificar el nivel de arranque
Modificamos el archivo para configurar el arranque de consola como el
predeterminado
vi /etc/inittab
# inittab is only used by upstart for the default runlevel.
#
# ADDING OTHER CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
#
# System initialization is started by /etc/init/rcS.conf
#
# Individual runlevels are started by /etc/init/rc.conf
#
# Ctrl-Alt-Delete is handled by /etc/init/control-alt-delete.conf
#
# Terminal gettys are handled by /etc/init/tty.conf and /etc/init/serial.conf,
# with configuration in /etc/sysconfig/init.
#
# For information on how to write upstart event handlers, or how
# upstart works, see init(5), init(8), and initctl(8).
#
# Default runlevel. The runlevels used are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
id:3:initdefault:
Aplicar el cambio anterior
init q
13. Descargar e Instalar Repositorios
a. Paquete EPEL
Descargar el paquete de Internet (debe tener acceso a internet)
wget http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/i386/epel-release-6-
7.noarch.rpm
Instalar el repositorio EPEL
rpm -ivh epel-release*.rpm
10. b. Paquete RPMFORGE
Descargar el paquete de Internet (debe tener acceso a internet)
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-
2.el6.rf.i686.rpm
Instalar el repositorio RPMFORGE
rpm -ivh rpmforge-release-*.rpm
14. Reiniciado de equipo
Para terminar y que todo se aplique reiniciamos el equipo
reboot