Completando la instalación Debian GNU/LiNUX 5.0 (Lenny)
Posted on 14 March 2009
En el artículo anterior Instalando Debian GNU/LiNUX 5.0 (Lenny), terminamos la instalación de un servidor de pruebas en una máquina virtual pero como se habrán dado cuenta no están instalados todos los paquetes que necesitamos para jugar con el. Por eso, en este artículo les mostraré como instalar y configurar algunos paquetes que considero indispensables en todo GNU/LiNUX.
Nota: Asumo un conocimiento previo de Linux, VIM y BASH
Luego de finalizar la instalación de nuestro servidor de pruebas, podemos ingresar con el usuario administrador (root)

Usando el editor de texto vi o nano podemos editar el archivo /etc/apt/sources.list y eliminamos todas las líneas que contengan “deb-src” y “deb cdrom”. En mi caso el archivo queda así:
deb http://ftp2.de.debian.org/debian/ lenny main deb http://security.debian.org/ lenny/updates main deb http://volatile.debian.org/debian-volatile main
Antes de comenzar a instalar debemos actualizar la lista de paquetes disponibles:
ironhide:~# aptitude update
Usaremos el programa sudo para delegar accesos al usuario sin privilegios de administración, el que creamos durante la instalación de Debian Lenny. Para mayor información puede visitar el website de sudo:
ironhide:~# aptitude install sudo
Para configurar sudo ejecutamos:
ironhide:~# vi sudo
Se levantará un editor de textos (vi o nano) y modificamos la ultima línea:
# /etc/sudoers # # This file MUST be edited with the 'visudo' command as root. # # See the man page for details on how to write a sudoers file. # Defaults env_reset # Host alias specification # User alias specification # Cmnd alias specification # User privilege specification root ALL=(ALL) ALL # Uncomment to allow members of group sudo to not need a password # (Note that later entries override this, so you might need to move # it further down) %sudo ALL=NOPASSWD: ALL
Guardamos los cambios. Agregamos el usuario sin privilegios de administración al grupo sudo:
ironhide:~# adduser modlost sudo
Luego, instalaremos el servidor SSH ya que es más flexible (en mi opinión) usar un cliente SSH del sistema operativo host para administrar nuestro servidor de prueba que usar la consola en la maquina virtual.
ironhide:~# aptitude install ssh
Necesitamos obtener el IP del servidor de pruebas, para ello ejecutamos este comando:
ironhide:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0c:29:91:79:90
inet addr:172.16.234.128 Bcast:172.16.234.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe91:7990/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:11037 errors:0 dropped:0 overruns:0 frame:0
TX packets:6299 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:13688669 (13.0 MiB) TX bytes:519837 (507.6 KiB)
Interrupt:18 Base address:0x2000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:560 (560.0 B) TX bytes:560 (560.0 B)
Cerramos la sesión con el usuario root y usando el cliente SSH que prefieran (PuTTY en Windows o el comando ssh en GNU/LiNUX o Mac) nos conectamos al servidor de pruebas.
Finalmente, instalaremos los siguientes programas:
- Vi IMproved – enhanced vi editor: Esta variedad de VI tiene más funcionalidades que la versión instalada por defecto.
- Apache HTTP Server – traditional non-threaded model: El popular servidor web.
- PHP5: El popular lenguaje script.
- MySQL Database Server: El popular servidor de base de datos.
Con los comandos:
modlost@ironhide:~$ sudo aptitude install vim apache2-mpm-prefork php5 modlost@ironhide:~$ sudo aptitude install mysql-server php5-mysql
Durante la instalación de MySQL se solicitará ingresar la contraseña de usuario administrador (root) de la base de datos:
Confirmamos la contraseña
Todo esta instalado y solo falta configurar VIM un poco para que sobresalte con colores y que tome en cuenta que uso una consola con fondo negro. Estas y otras mejoras las obtenemos modificando el archivo de configuración:
modlost@ironhide:~$ sudo vi /etc/vim/vimrc
Quitamos los comentarios de las siguientes lineas resaltadas (en vimrc los comentarios comienzan con comillas dobles)
" All system-wide defaults are set in $VIMRUNTIME/debian.vim (usually just
" /usr/share/vim/vimcurrent/debian.vim) and sourced by the call to :runtime
" you can find below. If you wish to change any of those settings, you should
" do it in this file (/etc/vim/vimrc), since debian.vim will be overwritten
" everytime an upgrade of the vim packages is performed. It is recommended to
" make changes after sourcing debian.vim since it alters the value of the
" ‘compatible‘ option.
" This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages available in Debian.
runtime! debian.vim
" Uncomment the next line to make Vim more Vi-compatible
" NOTE: debian.vim sets ‘nocompatible‘. Setting ‘compatible‘ changes numerous
" options, so any other options should be set AFTER setting ‘compatible‘.
"set compatible
" Vim5 and later versions support syntax highlighting. Uncommenting the next
" line enables syntax highlighting by default.
syntax on
" If using a dark background within the editing area and syntax highlighting
" turn on this option as well
set background=dark
" Uncomment the following to have Vim jump to the last position when
" reopening a file
if has("autocmd")
au BufReadPost * if line("‘\"") > 0 && line("‘\"") <= line("$")
\| exe "normal! g‘\"" | endif
endif
" Uncomment the following to have Vim load indentation rules and plugins
" according to the detected filetype.
if has("autocmd")
filetype plugin indent on
endif
" The following are commented out as they cause vim to behave a lot
" differently from regular Vi. They are highly recommended though.
set showcmd " Show (partial) command in status line.
set showmatch " Show matching brackets.
set ignorecase " Do case insensitive matching
set smartcase " Do smart case matching
set incsearch " Incremental search
"set autowrite " Automatically save before commands like :next and :make
"set hidden " Hide buffers when they are abandoned
"set mouse=a " Enable mouse usage (all modes) in terminals
" Source a global configuration file if available
" XXX Deprecated, please move your changes here in /etc/vim/vimrc
if filereadable("/etc/vim/vimrc.local")
source /etc/vim/vimrc.local
endif
Guardamos los cambios y podemos continuar jugando con nuestro servidor de pruebas con Debian GNU/LiNUX 5.0 – Lenny
No responses yet. You could be the first!










