45
Master on Free Software Systems Integration on Free Software Enrique Ocaña González (Block II)

Services: Nfs Smb Dns Ltsp Cups

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Systems Integration on Free Software

Enrique Ocaña González

(Block II)

Page 2: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Index (1/5)

● NFS– Introduction– Install– Exporting configuration at server– Mounting configuration at client

Page 3: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Index (2/5)

● SMB/CIFS– Introduction– Install– Server configuration– Client configuration

Page 4: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Index (3/5)

● DNS– Introduction– Client resolver– DNS server: bind

Page 5: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Index (4/5)

● Terminal services– VNC– LTSP– FreeNX

Page 6: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Index (5/5)

● CUPS– Introduction– Server configuration– Client configuration

Page 7: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Network File System (NFS)

Page 8: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Index

● Introduction● Install● Exporting configuration at server● Mounting configuration at client

Page 9: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Introduction

● Network File System– Traditional UNIX protocol used for volume

sharing between machines in a network in a transparent way

– Easy to set up– Unsafe!!: No authentication, ACL by IP,

unencrypted– Usually used with NIS+

Page 10: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Install

● Requirements– Kernel nfs support– Packages:

● nfs-kernel-server / nfs-user-server (server)● portmap● nfs-common

● Tip: check portmapper access control– /etc/hosts.allow, /etc/hosts.deny

Page 11: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Exporting

● Config file: /etc/exports

directory host1(option1,...) host2(...) 

● Example:

● Manual: man exports

/tmp 192.168.1.71(ro) 192.168.1.2(rw)/pub *.domain.org(ro,root,_squash,sync)/home/peter 192.168.1.* (rw,all_squash,anongid=512,anonuid=509)

Page 12: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Exporting

● Testing installation– showmount– nfsstat

iman exports, man showmount, man nfsstat

Page 13: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Mounting

● mount ­t nfs export mount_pointmount ­t nfs 192.168.1.1:/tmp/ /mnt/tmp

● Entries in /etc/fstab

● Mount options: man nfs

server.org:/var/nfs/public /mnt/nfsserver nfs auto,nosuid,rw,rsize=8192,wsize=8192,intr 0 0

Page 14: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Server Message Block Common Internet File

System Protocol(SMB/CIFS)

Page 15: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Index

● Introduction● Install● Server configuration● Client configuration

Page 16: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Introduction

● SMB is part of the NetBEUI protocol developed by Microsoft and IBM

● Allows disks and printers communication in Windows systems

● On Linux is called Samba, and allows interoperation with Windows hosts:– Filesystem and printer sharing– Client authentication– Network browsing helper, WINS

Page 17: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Install

● Requirements– Kernel SMB filesystem (smbfs) support (for

clients)– Packages:

● samba, swat (server)● smbfs, smbclient (client)

Page 18: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Server configuration

● Files– /etc/samba/lmhosts– /etc/samba/smb.conf

● [global]● [share_name], [printer_name]● [homes]● [printers]

● Helper utilities– swat http://localhost:901

Page 19: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Server configuration

● Helper utilities– smbpasswd All backends– pdbedit -vL Tdbsam backend– smbcacls– smbcquotas

Page 20: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Client configuration

● smbclient● mount -t smbfs //host/share /mount/point

Page 21: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Domain Name Server (DNS)

Page 22: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Index

● DNS– Introduction– Client resolver– DNS server: bind

Page 23: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Introduction

● Domain Name System– Translates domain names ↔ IP addresses– Domains, subdomains, authoritative domains– Primary, secondary name server– DNS records

● A, AAAA Address● CNAME Alias● MX Mail exchange● PTR Reverse lookup (IP name)

Page 24: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Introduction

– DNS records● NS Authoritative nameserver● SOA Start of authority● SRV Service location record● TXT Arbitrary info

Page 25: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Client resolver

● Client resolver: libc– /etc/nsswitch– /etc/host.conf– /etc/resolv.conf– /etc/hosts

Page 26: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

DNS server: bind

● Packages: bind9 bind9-doc dnsutils● Config files:

– /etc/named.conf● /etc/named.conf.options● /etc/named.conf.local

– Zone files

Page 27: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

DNS server: bind

● named.conf– Options

● forwarders● allow-recursion

– Zones● type● file● masters● allow-query● allow-transfer

Page 28: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

DNS server: bind

● Example: primary server for “mynet”

// FILE: /etc/bind/named.conf.local

zone "mynet" in { type master; file "/etc/bind/db.mynet";};

zone "5.168.192.in­addr.arpa" { type master; file "/etc/bind/db.192.168.5";};

Page 29: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

DNS server: bind

● Example: primary server for “mynet”// FILE: /etc/bind/db.mynet$TTL    604800@       IN      SOA     mynet. mydns.mynet. (                       20080217   ; Serial                         604800   ; Refresh                          86400   ; Retry                        2419200   ; Expire                         604800 ) ; Negative Cache TTL

                NS      mydns.mynet.

                MX      0       mydns.mynet.

mydns           A       192.168.5.1myweb           CNAME   mydnsdiskserver      A       192.168.5.2

Page 30: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

DNS server: bind

● Example: primary server for “mynet”// FILE: /etc/bind/db.192.168.5

$TTL    604800@       IN      SOA     mynet. mydns.mynet. (                       20080217         ; Serial                         604800         ; Refresh                          86400         ; Retry                        2419200         ; Expire                         604800 )       ; Negative Cache 

TTL

                NS      mydns.mynet.

1               PTR     mydns.2               PTR     diskserver.

Page 31: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

DNS server: bind

● Example: secondary server// FILE: /etc/bind/named.conf.localzone "mynet" { type slave; masters { 192.168.5.1; }; file "db.mynet";};

zone "5.168.192.in­addr.arpa" { type slave; masters { 192.168.5.1; }; file "db.192.168.5";};

Page 32: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Terminal Services

Page 33: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Index

● Terminal services– VNC– LTSP– FreeNX

Page 34: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

VNC

● One to one connections– Native X-Window

● ssh -X● export DISPLAY, X Display Manager

– Virtual Network Computing● Server

– x11vnc (existing desktop)– vncserver, tightvncserver (new in-memory X server)

● Client– xvncviewer, xtightvncviewer, svncviewer

Page 35: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

LTSP

● Packages:– ltsp-server-standalone ltsp-manager thin-

client-manager-backend thin-client-manager-gnome openssh-server

● Dependencies: debconf-utils debootstrap dhcp3-server libasound2-plugins libgstreamer-plugins-pulse0.10-0 ltsp-server nbd-server openbsd-inetd tftpd-hpa pessulus python-crypto python-gconf python-glade2 python-gnome2 python-gnomecanvas python-imaging python-pyorbit python-tcm

Page 36: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

LTSP

● Install– Prepare PXE booting on clients– Tune dhcp:

● network at /etc/ltsp/dhcpd.conf● interfaces at /etc/default/dhcp3-server

– ltsp-build-client– ltsp-update-sshkeys

Page 37: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

LTSP

● Install– /etc/exports:

● /opt/ltsp *(ro,no_root_squash,async)

– Restart services:● nfs-kernel-server● dhcp3-server● tftpd-hpa● openbsd-inetd

Page 38: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

LTSP

● Configuration– /opt/ltsp/i386/etc/lts.conf

● http://www.ltsp.org/twiki/bin/view/Ltsp/LtsConf

Page 39: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

FreeNX

● Install– Repositories: /etc/sources.list

– Packages● Server: freenx (expect libxcomp2 libxcompext2

nxagent nxlibs)● Client: nxclient (libstdc++2.10-glibc2.2)

● Usage: nxclient server

# FreeNX (https://help.ubuntu.com/community/FreeNX)# wget http://mirror.ubuntulinux.nl/seveas.gpg ­O­ | sudo apt­key add ­deb http://mirror.ubuntulinux.nl feisty­seveas freenxdeb­src http://mirror.ubuntulinux.nl feisty­seveas freenx

Page 40: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Common Unix Printing System

(CUPS)

Page 41: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Index

● CUPS– Introduction– Server configuration– Client configuration

Page 42: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Introduction

● Common Unix Printing System– Jobs– Printers, Classes: Printer group. First free

printer attends the job.– Filters: PDF, JPG, ... to PostScript– Backends: Parallel, USB, JetDirect, IPP, SMB...– Printer drivers: PPD, Gutenprint/Gimp-print,

Foomatic– Networking: IPP protocol

Page 43: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Install

● Packages: cupsys cupsys-client cupsys-bsd

● Drivers:– cupsys-driver-gutenprint / cupsys-driver-

gimpprint– foomatic-filters, foomatic-db-engine

Page 44: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Server config

● https://localhost:631● /etc/cups/cupsd.conf● /etc/cups/printers.conf

Page 45: Services: Nfs Smb Dns Ltsp Cups

Master on Free Software

Client config

● /etc/cups/client.conf