Administrar

Anotacions de linux terminal server

xunilung | 26 Setembre, 2006 18:07

Fa temps, uns 4 anys? vaig fer unes proves amb Linux Terminal Server. La distribució emprada era una mdke9.1

La finalitat era aprofitar PCs antics. Ho poso aquí per si pot servir a qualqú. Les meves anotacions començaven així:


La cosa no ha estat gens dificil...pareix quasi un miracle.

1.- Introducció

  • Davallar els següent paquets,(després ja els instal·larem) Aquests són els que m'han funcionat...i a la primera!!

ltsp_core-3.0.9-0.i386.rpm
ltsp_x_core-3.0.4-0.i386.rpm

ltsp_kernel-3.0.10-0.i386.rpm
ltsp_x_fonts-3.0.0-0.i386.rpm

Els he davallat de: http://sourceforge.net/project/showfiles.php?group_id=17723

  • Instal·lar els dimonis: dhcpd, xinetd, portmap, nfs,

  • Instal·lar els ltsp* (m'he creat una font d'instal·lació, i ho he fet des d'aquí)

  • Anar al directori /opt/ltsp/templates executar l'script ./ltsp_initialize. A les preguntes "Apply".


2.- Editar els arxius

  • /etc/xinetd.d/tftp
  • /opt/ltsp/i386/etc/lts.conf
  • /etc/dhcpd.conf.example (alerta que n'hi ha un que és ..sample aquest l'hem de deixar fer)

Així és com m'han quedat....hem de tenir en compte que:

Servidor: IP: 192.168.0.149 MAC:

Estació: IP: 192.168.0.123 MAC:

/etc/xinetd.d/tftp



# default: off

# description: The tftp server serves files using the trivial file transfer

# protocol. The tftp protocol is often used to boot diskless

# workstations, download configuration files to network-aware printers,

# and to start the installation process for some operating systems.

service tftp

{

disable = no

socket_type = dgram

protocol = udp

wait = yes

user = root

server = /usr/sbin/in.tftpd

# server_args = -s /var/lib/tftpboot

server_args = -s /tftpboot

per_source = 11

cps = 100 2

flags = IPv4

}


/opt/ltsp/i386/etc/lts.conf

# Config file for the Linux Terminal Server Project (www.ltsp.org)

#

[Default]

SERVER = 192.168.0.149

XSERVER = auto

X_MOUSE_PROTOCOL = "PS/2"

X_MOUSE_DEVICE = "/dev/psaux"

X_MOUSE_RESOLUTION = 400

X_MOUSE_BUTTONS = 3

USE_XFS = N

LOCAL_APPS = N

RUNLEVEL = 5

#------------------------------------------------------------------------------

#

# Example of specifying X settings for a workstation

#

[ws001]

XSERVER = auto

LOCAL_APPS = N

USE_NFS_SWAP = N

SWAPFILE_SIZE = 48m

RUNLEVEL = 5


[ws002]

XSERVER = XF86_SVGA

LOCAL_APPS = N

USE_NFS_SWAP = N

SWAPFILE_SIZE = 64m

RUNLEVEL = 3

#

# ws004 is my virtual workstation running in a VMware session

#

[ws004]

DNS_SERVER = 192.168.0.254

XSERVER = auto

X4_BUSID = "PCI:0:15:0"

X_MODE_0 = 800x600

LOCAL_APPS = N

USE_NFS_SWAP = N

SWAPFILE_SIZE = 64m

RUNLEVEL = 5

#-----------------------------------------------------------------------------

#

# Example of a workstation configured to load some modules

#

#[ws001]

# MODULE_01 = agpgart.o # This is for i810 video

# MODULE_02 = uart401.o

# MODULE_03 = sb.o io=0x220 irq=5 dma=1

# MODULE_04 = opl3.o

#------------------------------------------------------------------------------

#

# Example of ws001 configured for local apps

#

#[ws001]

# LOCAL_APPS = Y

# LOCAL_WM = Y

# NIS_DOMAIN = ltsp

# NIS_SERVER = 192.168.0.254

#------------------------------------------------------------------------------

#

# Example of a serial printer attached to /dev/ttyS1 on workstation ws001

#

#[ws001]

# PRINTER_0_DEVICE = /dev/ttyS1

# PRINTER_0_TYPE = S # P-Parallel, S-Serial

# PRINTER_0_PORT = 9100 # tcp/ip port: defaults to 9100

# PRINTER_0_SPEED = 9600 # baud rate: defaults to 9600

# PRINTER_0_FLOWCTRL = S # Flow control: S-Software (XON/XOFF),

# # H-Hardware (CTS/RTS)

# PRINTER_0_PARITY = N # Parity: N-None, E-Even, O-Odd

# # (defaults to 'N')

# PRINTER_0_DATABITS = 8 # Databits: 5,6,7,8 (defaults to 8)


# Sample configuration file for ISCD dhcpd

#

# Don't forget to set run_dhcpd=1 in /etc/init.d/dhcpd

# once you adjusted this file and copied it to /etc/dhcpd.conf.

/etc/dhcpd.conf.example

ddns-update-style none;

default-lease-time 21600;

max-lease-time 21600;

option subnet-mask 255.255.255.0;

option broadcast-address 192.168.0.255;

option routers 192.168.0.1;

option domain-name-servers 192.168.0.1;

option domain-name "yourdomain.com";

option root-path "192.168.0.149:/opt/ltsp/i386";

option option-128 code 128 = string;

option option-129 code 129 = text;

shared-network WORKSTATIONS {

subnet 192.168.0.0 netmask 255.255.255.0 {

}

}


group {

use-host-decl-names on;

option log-servers 192.168.0.149;

host ws001 {

hardware ethernet 00:50:BA:C5:F0:3C;

fixed-address 192.168.0.123;

filename "/lts/vmlinuz-2.4.21-ltsp-1";

##ALERTA per defecte ve el 2.4.19, i l'hem de canviar al 2.4.21

## option option-128 e4:45:74:68:00:00;

## option option-129 "NIC=eepro100";

}

host ws002 {

hardware ethernet 00:D0:09:30:6A:1C;

fixed-address 192.168.0.2;

filename "/lts/vmlinuz-2.4.19-ltsp-1";

## option option-128 e4:45:74:68:00:00;

## option option-129 "NIC=tulip";

}

}


Aquest host ws002, en principi no el tinc(és el que ve per defecte amb l'arxiu). Si vull afegir una estació (p.e el portatil) només he de fer canviar la IP, la MAC Adress i pensar a canviar el 2.4.19 per el 2.4.21. AH! I pensar a guardar aquest arxiu com a dhcpd.conf

Evidentment, també (en cas d'afegir estacions) hauré de modificar també el /opt/ltsp/i386/etc/lts.conf

Així, una vegada afegit el portatil com a segona estació, el lts.conf ha quedat de la següent forma

/opt/ltsp/i386/etc/lts.conf

#

# Config file for the Linux Terminal Server Project (www.ltsp.org)

#

[Default]

SERVER = 192.168.0.149

XSERVER = auto

X_MOUSE_PROTOCOL = "PS/2"

X_MOUSE_DEVICE = "/dev/psaux"

X_MOUSE_RESOLUTION = 400

X_MOUSE_BUTTONS = 3

USE_XFS = N

LOCAL_APPS = N

RUNLEVEL = 5

#------------------------------------------------------------------------------

#

# Example of specifying X settings for a workstation

#

[ws001]

XSERVER = auto

LOCAL_APPS = N

USE_NFS_SWAP = N

SWAPFILE_SIZE = 48m

RUNLEVEL = 5

[ws002]

XSERVER = auto

LOCAL_APPS = N

USE_NFS_SWAP = N

SWAPFILE_SIZE = 64m

RUNLEVEL = 5

#

# ws004 is my virtual workstation running in a VMware session

#

[ws004]

DNS_SERVER = 192.168.0.254

XSERVER = auto

X4_BUSID = "PCI:0:15:0"

X_MODE_0 = 800x600

LOCAL_APPS = N

USE_NFS_SWAP = N

SWAPFILE_SIZE = 64m

RUNLEVEL = 5

#------------------------------------------------------------------------------

#

# Example of a workstation configured to load some modules

#

#[ws001]

# MODULE_01 = agpgart.o # This is for i810 video

# MODULE_02 = uart401.o

# MODULE_03 = sb.o io=0x220 irq=5 dma=1

# MODULE_04 = opl3.o

#------------------------------------------------------------------------------

#

# Example of ws001 configured for local apps

#

#[ws001]

# LOCAL_APPS = Y

# LOCAL_WM = Y

# NIS_DOMAIN = ltsp

# NIS_SERVER = 192.168.0.254

#------------------------------------------------------------------------------

#

# Example of a serial printer attached to /dev/ttyS1 on workstation ws001

#

#[ws001]

# PRINTER_0_DEVICE = /dev/ttyS1

# PRINTER_0_TYPE = S # P-Parallel, S-Serial

# PRINTER_0_PORT = 9100 # tcp/ip port: defaults to 9100

# PRINTER_0_SPEED = 9600 # baud rate: defaults to 9600

# PRINTER_0_FLOWCTRL = S # Flow control: S-Software (XON/XOFF),

# # H-Hardware (CTS/RTS)

# PRINTER_0_PARITY = N # Parity: N-None, E-Even, O-Odd

# # (defaults to 'N')

# PRINTER_0_DATABITS = 8 # Databits: 5,6,7,8 (defaults to 8)



Una vegada fets tots aquest canvis hem de reiniciar els serveis: dhcpd, xinetd, portmap, nfs

Jo els reinicio tots 4 ...per si decàs


3.-PC Client

Ara hem d'arrencar l'estació. Per això ens farà falta un disket d'arrencada amb una rom. Això ho podem trobar a: http://www.rom-o-matic.net/

En el meu cas en concret he anat a http://www.rom-o-matic.net/5.3.7/

A Choose NIC/ROM type he triat la rtl8139:rtl8139

A Choose ROM output format: Floopy bootable ROM Image(.zdsk)

Donar-li a To generate and download a ROM image press: botó GetRom

Guardam la imatge a qualsevol lloc del disc dur i després la passam al disket:

cat eb-5.2.4-rtl8139.zdsk > /dev/fd0


Ara anem a l'estació...arrencam amb el disket i veurem el "miracle"

Per conéixer la T. xarxa que tenim:  less /proc/pci | grep Ethernet

Comentaris

Afegeix un comentari
Amb suport per a Gravatars
 
Powered by Life Type - Design by BalearWeb - Accessible and Valid XHTML 1.0 Strict and CSS