Sep 27, 07 by Juan Lebrijo about Debian, operating systems, blog
Quiero mostraros como es el proceso de instalación de una distribución Debian-Etch en su versión instalación desde la red.
Esta instalación es de Servidor, por tanto la voy a dejar con lo mínimo pero operativa para seguir instalándole más componentes.
Esta distro se puede instalar muy bien desde un CD de 100 MB, y una buena conexión de Banda Ancha.
El CD lo podeis descargar desde la página oficial de Debian, aquí.
Instalación
Primero el hardware sobre el que lo vamos a instalar:
Micro: Pentium III a 667 MHz
RAM: 384 MB
Red: Realtek 8139 a 10/100 Mbps.
HD: 20GB IDE
SO: Debian-4.0 (Etch) Netinst
Arrancamos el equipo desde el CD conectado a una boca de red ethernet. La instalación consistirá en unos pocos pasos y, dependiendo de la velocidad de tu conexión, un buen tiempo de descarga e instalación de los paquetes básicos:
Nombre: elite. Dominio: lebrijo.com.
Distribuimos las particiones en el disco. Mi ejemplo se trata de un servidor web, así que más o menos hice esto:
hda1
5.9 GB
ext3
/
hda2
784 MB
swap
**
hda3
512 MB
ext3
/var/log
hda4
12.9 GB
ext3
/var/www
Ponemos la contraseña de root (ya sabeis, que sea robusta). Y creamos un usario no-administrador.
Añadir fuentes para la descarga de paquetes cercanas (yo resido en España): ftp.rediris.es,es.debian.org.
Instalamos GRUB por defecto, como Gestor de Arranque.
Para volver esta configuración inicial ejecutar: base-config.
Puesta a punto
Actualizamos las listas de software:
elite:/etc/apt# apt-get update
Des:1 http://security.debian.org stable/updates/main Packages [413kB]
Des:2 ftp://ftp.es.debian.org stable/main Packages [4535kB]
Des:3 http://security.debian.org stable/updates/main Release [110B]
Obj http://security.debian.org stable/updates/contrib Packages
Des:4 http://security.debian.org stable/updates/contrib Release [113B]
Des:5 ftp://ftp.de.debian.org stable/main Packages [4535kB]
Des:6 ftp://ftp.es.debian.org stable/main Release [95B]
Des:7 ftp://ftp.es.debian.org stable/main Sources [1322kB]
Des:8 ftp://ftp.es.debian.org stable/main Release [97B]
Des:9 ftp://ftp.de.debian.org stable/main Release [95B]
Des:10 ftp://ftp.de.debian.org stable/main Sources [1322kB]
Des:11 ftp://ftp.de.debian.org stable/main Release [97B]
Descargados 12,1MB en 5m51s (34,5kB/s)
Leyendo lista de paquetes... Hecho
La instalación anterior es mínima, por lo que yo instalo además algún paquete necesario para la administración e instalación del sistema y futuros componenetes a instalar.
Servicios instalados:
SSH: Servidor de consola para administrar de forma remota el servidor.
zip/unzip: compresores para abrir paquetes de instalación.
apt-get install openssh-server
apt-get install zip unzip
Configuración de idioma
Una dificultad que me he encontrado en esta versión de Debian (la etch), y que puede ser que encontreis vosotros, es que no configuraba bien en las variables de entorno el lenguaje. Yo lo he solucionado como sigue.
Declara mos en /etc/enviroment las siguientes variables:
En el fichero de resolución /etc/resolv.conf, debe estar vuestra configuración DNS. 192.168.0.1 será vuestro servidor de nombres de dominio:
nameserver 192.168.0.1;
I want to show you how you can install the distro Debian-Etch in the network installation version.
This installation is for a Server, then we going to make a minium installation, but operating to install all our systems.
This is installed with a CD(100 MB ocupation), and a good Wide Band connection.
You can download the CD ISO from the official Debian page, here.
Instalación
First of all, the details of the hardware:
Micro: Pentium III a 667 MHz
RAM: 384 MB
Red: Realtek 8139 a 10/100 Mbps.
HD: 20GB IDE
SO: Debian-4.0 (Etch) Netinst
Boot from the CD the machine to a ethernet connected. The installation consists in a few steps and, depends of the connection speed, a long time to download and intalling the basic packages:
Name: elite. Domain: lebrijo.com.
Distribute the partitions in the Hard disc. The example is a web server, then I made this ditribution:
hda1
5.9 GB
ext3
/
hda2
784 MB
swap
**
hda3
512 MB
ext3
/var/log
hda4
12.9 GB
ext3
/var/www
Fill root password (you know, secure password). And create a non-administrator user.
Add download servers near your town as possible (I am livin in Spain): ftp.rediris.es,es.debian.org.
Install GRUB as boot manager.
To retur the initial configuration, type in the bash: base-config.
Tunning our installation
Upgrade the software lists:
elite:/etc/apt# apt-get update
Des:1 http://security.debian.org stable/updates/main Packages [413kB]
Des:2 ftp://ftp.es.debian.org stable/main Packages [4535kB]
Des:3 http://security.debian.org stable/updates/main Release [110B]
Obj http://security.debian.org stable/updates/contrib Packages
Des:4 http://security.debian.org stable/updates/contrib Release [113B]
Des:5 ftp://ftp.de.debian.org stable/main Packages [4535kB]
Des:6 ftp://ftp.es.debian.org stable/main Release [95B]
Des:7 ftp://ftp.es.debian.org stable/main Sources [1322kB]
Des:8 ftp://ftp.es.debian.org stable/main Release [97B]
Des:9 ftp://ftp.de.debian.org stable/main Release [95B]
Des:10 ftp://ftp.de.debian.org stable/main Sources [1322kB]
Des:11 ftp://ftp.de.debian.org stable/main Release [97B]
Descargados 12,1MB en 5m51s (34,5kB/s)
Leyendo lista de paquetes... Hecho
Previous installation is minium, then I will installa some packages needed for the installation an administration of future systems an components:
SSH: Secure terminal server for remote server administration.
zip/unzip: usualli compressors.
apt-get install openssh-server
apt-get install zip unzip
Language configuration
A dificult that I found in this Debian version (etch), and you can find, is the un configuration of the language enviroment variables. I have solved as follow.
Domain Name System, is the service which we due the prety domain names in the actual internet, instead of the uglies IP numbers.
Bind is the software more used too implement this service, and we sil show how We intall it in a Debian Etch distro.Our initial conditions:
Fixed IP provided by the ISP (ej. 85.48.162.99). In Spain, in the post date I recomend Orange as the ISP whith the Fixed IP Service cheapest (2 €/mes).
Domain name (ej. lebrijo.com) brought to a Register Company. I recomend http://www.domiteca.com, in this post date they give me a very efficient service, but they are not the cheapest in Spain.
If we are going to mount a serve rin that direction, we have to ask the register to meke a zone delegation (lebrijo.com) into our fixed IP (85.48.162.99). Then everybody who ask for something.lebrijo.com comes to our server to ask; or, at least, all the super-servers take the information from our sone file in our server, and they reply good to de question ¿Where is something.lebrijo.com?.
The register must know where is managing the zone zona lebrijo.com. We write our DNS.
domiteca.PNG104 KB
We can see four names refered to the same machine, The perfect action is having primary and secondary servers, they can fall down....., but we have a poor budget, and we have an alone server.
The second action is opening our firewall, and/or NATing our router to deflect the petitions to the port 85.48.162.99:53 to our server with private IP 192.168.1.23:53.
Instalation
Installing, quickly on Debian
elite:~# apt-get install bind9
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias... Hecho
dnsutils ya está en su versión más reciente.
Paquetes sugeridos:
bind9-doc
Se instalarán los siguientes paquetes NUEVOS:
bind9
0 actualizados, 1 se instalarán, 0 para eliminar y 6 no actualizados.
Necesito descargar 441kB de archivos.
Se utilizarán 901kB de espacio de disco adicional después de desempaquetar.
Add your zones to the file /etc/bind/named.conf
zone "lebrijo.com" {
type master;
file "/etc/bind/db.lebrijo.com";
};
zone "0.168.192.in-addr.arpa" {
type master;
file "/etc/bind/db.192.168.0";
};
Create a file to direct zone db.lebrijo.com:
;
; BIND data file for zone lebrijo.com
;
$TTL 3600 ; 1 hour
@ IN SOA ns1.lebrijo.com. root.lebrijo.com. (
2007083001 ; Serial
10800 ; Refresh
3600 ; Retry
604800 ; Expire
86400 ; Minimum TTL
)
; Servidores DNS
IN NS ns1.lebrijo.com.
IN NS ns2.lebrijo.com.
IN NS ns3.lebrijo.com.
IN NS ns4.lebrijo.com.
; Servidores de correo
IN MX 0 correo.lebrijo.com.
IN A 85.48.162.99
; Nombres de Máquina
localhost IN A 127.0.0.1
ns1 IN A 85.48.162.99
ns2 IN A 85.48.162.99
ns3 IN A 85.48.162.99
ns4 IN A 85.48.162.99
correo IN A 85.48.162.99
ntp IN A 85.48.162.99
; Webs servidas
www IN A 85.48.162.99
blog IN A 85.48.162.99
curriculum IN CNAME www
We can see various things:
Four DNS servers to the same machine.
MX is the tag for email servers. We must put any relay, but we are poor.
We must redirect to our own IP. All machines and services.
At least we put our published webs.
Operation
The server (or every one acts as client) we must add the first line on /etc/resolv.conf:
When you want to push the zones on the root servers, because you are adding regiters or changing configurations:
Change the Serial tag in zone file (db.lebrijo.com), this is the fiel which the root server use to know the last version. The number is (in convention) date an version, but it can be an incremental number.