Stefano Sangalli 29 marzo 2007



Documenti analoghi
Laboratorio di Amministrazione di Sistema (CT0157) parte A : domande a risposta multipla

Introduzione all ambiente di sviluppo

Debtags. Dare un senso a pacchetti. 16 settembre slides Enrico Zini enrico@debian.org

Copyright 2012 Binary System srl Piacenza ITALIA Via Coppalati, 6 P.IVA info@binarysystem.eu

Protocolli di Sessione TCP/IP: una panoramica

CONFIGURATION MANUAL

GstarCAD 2010 Features

Indice. Indice V. Introduzione... XI

Posta elettronica per gli studenti for the students

TNCguide OEM Informativa sull introduzione di documentazione aggiuntiva nella TNCguide

Java. Traditional portability (ideal)

Aggiornamento dispositivo di firma digitale

Introduzione Kerberos. Orazio Battaglia

API e socket per lo sviluppo di applicazioni Web Based

Le Reti Informatiche

INSTALLARE PALLADIO USB DATA CABLE IN WINDOWS XP/ME/2000/98

Guida alla configurazione Configuration Guide

Creare connessioni cifrate con stunnel

DICHIARAZIONE DI RESPONSABILITÀ

! S/Key! Descrizione esercitazione! Alcuni sistemi S/Key-aware. " Windows " Linux. ! Inizializzazione del sistema. " S = prepare(passphrase, seed)

Hard Disk Drive Duplicator Dock USB 3.0 to SATA HDD Duplicator. StarTech ID: SATDOCK22RU3

WELCOME. Go to the link of the official University of Palermo web site Click on the box on the right side Login unico

-Fig.1-

Reti di Telecomunicazione Lezione 7

Customer Centric/Inquiry/E-bill. Tanya Enzminger

Configurazione modalità autenticazione utenti sui firewall D-Link Serie NetDefend (DFL-200, DFL-700, DFL-1100)

Meccanismi di autenticazione sicura. Paolo Amendola GARR-CERT

Architetture software

STATO IMPLEMENTAZIONE ONVIF SU TELECAMERE MUNDUS SECURUS

Applicazioni web centrati sui dati (Data-centric web applications)

Esercitazione 05. Sommario. Packet Filtering [ ICMP ] Esercitazione Descrizione generale. Angelo Di Iorio (Paolo Marinelli)

SHAREPOINT INCOMING . Configurazione base

Il Web Server e il protocollo HTTP

Shell di Linux e Comandi Utente

Siti web centrati sui dati (Data-centric web applications)

Lesson #6. Miscellaneous. Roberto De Virgilio

User Guide Guglielmo SmartClient

Portale Materiali Grafiche Tamburini. Grafiche Tamburini Materials Portal

GNU/Linux Concetti di base

Cosa e come installare (Definire cosa si vuole fare - Sapere cosa si può installare - Selezione dei pacchetti)

Telefonia Aziendale. FaxServer

Puppy Linux : semplice e fantastico... Paolo Faeti Linux Day PLUG PARMA 26 Ottobre 2013

Code: GW-IMP-WEB-1. Datalogger web pulses counter. Version 6 inputs with Ethernet. MarCom

Downloading and Installing Software Socio TIS

Compatibilità del Portale Piaggio con Internet Explorer 10 e 11. Internet Explorer 10

Add workstations to domain. Adjust memory quotas for a process. Bypass traverse checking. Change the system time. Create a token object

MS WINDOWS SERVER AUTOMATING ADMINISTRATION WITH WINDOWS POWERSHELL

Controllo di processi


SBSAfg.exe nella cartella Tools del DVD Opzioni avanzate: Migration Mode Unattend Mode Attended Mode con dati pre-caricati


How to use the WPA2 encrypted connection

Terminologia per gli ipertesti sul web

Iptables. Mauro Piccolo

Qui u ck c k PE P R E L

Programma corsi LogX S.r.l.

Setup Tomcat. Installare Java SDK * ( ad es. in c:\programmi\j2sdk1.4.2_08

introduzione al corso di sistemi operativi a.a maurizio pizzonia

Contenuto del pacchetto

RenderCAD S.r.l. Formazione

Lorenzo Sarti Materiale didattico sarti

Drupal. E vai con un po' di Drupal for Dummies... :D. Copyright by hachreak

Nautilus Installazione Aggiornato a versione

Replica di Active Directory. Orazio Battaglia

Corso base GNU/Linux Latina Linux Group. Sito web: Mailing list:

RenderCAD S.r.l. Formazione

Hardware di un Computer

Guida di installazione per Fedora 7

Avvio di UNIX. Lettura GRUB (Grand Unified Boot loader) in genere risiede nel MBR (stage1) e legge le informazioni nel file /boot/grub.

Apache Webserver. Piccola introduzione all'installazione ed alla configurazione, a cura di: Alessandro Gervaso

Zeroshell: access point

Il File System di Linux

Capitolo 1. Introduzione. Cay S. Horstmann Concetti di informatica e fondamenti di Java

MOC10982 Supporting and Troubleshooting Windows 10

01/05/2013 Istruzioni per l installazione

Il sistema operativo UNIX/Linux. Gli script di shell

Software di gestione della stampante

Servizio di backup dei dati mediante sincronizzazione

(1) Network Camera

By E.M. note sull'uso di GAMBAS

Dal protocollo IP ai livelli superiori


Architettura del. Sintesi dei livelli di rete. Livelli di trasporto e inferiori (Livelli 1-4)

Obiettivi. Al termine del webinar sarete in grado di:

INTERNET e RETI di CALCOLATORI A.A. 2014/2015 Capitolo 4 DHCP Dynamic Host Configuration Protocol Fausto Marcantoni fausto.marcantoni@unicam.

PROGRAMMAZIONE CONSUNTIVA Codice Mod. RQ 23.2 Pag 1/5. Sistemi e Reti (articolazione Telecomunicazione) Classe

$OFXQLVWUXPHQWLGLXVRFRPXQH SHUO DQDOLVLGHOORVWDWRGHOVLVWHPD

Guida di installazione per Fedora core 4

Esercitazione 04. Sommario. Un po di background: One-time password. Un po di background. Angelo Di Iorio

Installazione interfaccia e software di controllo mediante PC Installing the PC communication interface and control software

Data Base. Master "Bio Info" Reti e Basi di Dati Lezione 6

Istruzioni per utilizzare la BCD 2000 con Traktor 3 e 2

Bozza Guida ufficiale vs 1.0

Quando mi collego ad alcuni servizi hosting ricevo un messaggio relativo al certificato di protezione del sito SSL, come mai?

The world s most advanced class on PostgreSQL o quasi! 4 Marzo 8 Aprile L'Antipasto 11 Marzo

Attuatore a relè Manuale di istruzioni

Secure Socket Layer (SSL) Transport Layer Security (TLS)

COMP6218 Web Architecture

Database support Prerequisites Architecture Driver features Setup Stored procedures Where to use. Contents

Attuatore a relè Manuale di istruzioni

Transcript:

mylinux Stefano Sangalli 29 marzo 2007 mylinux è una raccolta di appunti personali redatti da Stefano Sangalli. Il presente manuale sarà diviso nei vari corsi e tipologie di how-to, per facilitare la ricerca degli argomenti. Scarica la VERSIONE PDF di questo documento. Contents 1 Corso di Installazione e Manutenzione Server Linux 7 1.1 Installazione di Linux........................................ 7 1.1.1 Scelta della distribuzione.................................. 7 1.1.2 Creazione delle partizioni.................................. 8 1.1.3 Avvio e spegnimento.................................... 8 1.1.4 Documentazione....................................... 8 1.2 Utilizzo della Shell.......................................... 8 1.3 Utilizzo di VI............................................. 9 1.4 Gestione Utenti........................................... 9 1.5 Gestione File System........................................ 9 1.5.1 Montare dispositivi USB.................................. 9 1.6 DNS e DHCP............................................ 9 1.7 FTP, HTTP e SSL.......................................... 9 1.7.1 FTP............................................. 9 1.7.2 HTTP............................................ 9 1.7.3 SSL Certificate Generation................................. 9 1.8 Ricompilazione del kernel...................................... 10 1.9 Firewall (iptables).......................................... 10 2 Corso di amministrazione Server LAMP 10 2.1 I giorno................................................ 10 2.1.1 Comando ps......................................... 10 2.1.2 Comando kill......................................... 10 2.1.3 Compressori......................................... 10 2.1.4 Variabili d ambiente..................................... 10 2.1.5 Installazione trustix..................................... 10 2.2 II giorno............................................... 10 2.2.1 Routing............................................ 10

CONTENTS 2 2.3 III giorno............................................... 11 2.3.1 Compilazione sorgenti.................................... 11 2.3.2 httpd............................................. 11 2.3.3 mysql............................................. 11 3 Masterizzazione 11 3.1 CD AUDIO.............................................. 11 3.2 CD DATI............................................... 11 3.3 CD AVVIABILI........................................... 11 4 linuxdoc 12 4.1 Sintassi sorgente........................................... 12 5 Postgres 12 5.1 Avvio demone in ascolto...................................... 12 5.2 Connessione client (psql)...................................... 12 5.3 Creazione database......................................... 12 6 php scripts 12 6.1 Upload files.............................................. 12 7 Integrazione con MSSQL-SERVER 13 7.1 freetds................................................ 13 8 SSL/TLS 13 8.1 SSL.................................................. 14 8.2 TLS.................................................. 14 9 Comandi utili 15 9.1 Ricerca file.............................................. 15 10 RPM: descrizione pacchetti 15 10.1 a.................................................... 15 10.1.1 agetty............................................. 15 10.1.2 anonftp............................................ 15 10.1.3 ash............................................... 15 10.1.4 authconfig........................................... 15 10.2 b................................................... 15 10.2.1 bash.............................................. 15 10.2.2 bash-static.......................................... 16

CONTENTS 3 10.2.3 binutils............................................ 16 10.2.4 bison.............................................. 16 10.2.5 bzip2............................................. 16 10.3 c.................................................... 16 10.3.1 chkconfig........................................... 16 10.3.2 console............................................ 17 10.3.3 coreutils............................................ 17 10.3.4 cracklib............................................ 17 10.3.5 cracklib-dicts......................................... 17 10.3.6 crontabs............................................ 17 10.4 d................................................... 18 10.4.1 db1.............................................. 18 10.4.2 db4.............................................. 18 10.4.3 dev............................................... 18 10.4.4 diffutils............................................ 18 10.5 e.................................................... 18 10.5.1 e2fsprogs........................................... 18 10.5.2 ed............................................... 18 10.5.3 etcskel............................................. 18 10.5.4 expat............................................. 19 10.5.5 expat-libs........................................... 19 10.6 f.................................................... 19 10.6.1 fcron.............................................. 19 10.6.2 file............................................... 19 10.6.3 filesystem........................................... 19 10.6.4 findutils............................................ 19 10.6.5 flex............................................... 19 10.6.6 fp-linux-ws.......................................... 20 10.6.7 freetype............................................ 20 10.6.8 ftp............................................... 20 10.7 g.................................................... 20 10.7.1 gawk.............................................. 20 10.7.2 gcc............................................... 20 10.7.3 gcc-c++-runtime....................................... 20 10.7.4 gcc-cpp............................................ 20 10.7.5 gcc-runtime.......................................... 20 10.7.6 gd............................................... 21

CONTENTS 4 10.7.7 gdbm............................................. 21 10.7.8 gettext............................................. 21 10.7.9 glib.............................................. 21 10.7.10 glibc.............................................. 21 10.7.11 glibc-devel........................................... 21 10.7.12 gmp.............................................. 22 10.7.13 gnupg............................................. 22 10.7.14 grep.............................................. 22 10.7.15 groff.............................................. 22 10.7.16 grub.............................................. 22 10.7.17 gzip.............................................. 22 10.8 h................................................... 23 10.8.1 htmlinfo............................................ 23 10.8.2 hwdata............................................ 23 10.9 i.................................................... 23 10.9.1 initscripts........................................... 23 10.9.2 initscripts-inittab....................................... 23 10.9.3 iproute............................................ 23 10.9.4 iptables............................................ 23 10.9.5 iputils............................................. 23 10.10k................................................... 23 10.10.1 kernel-source......................................... 23 10.10.2 kudzu............................................. 24 10.11l.................................................... 24 10.11.1 less............................................... 24 10.11.2 libacl............................................. 24 10.11.3 libattr............................................. 24 10.11.4 libcap............................................. 24 10.11.5 libcap-devel.......................................... 24 10.11.6 libcom err........................................... 24 10.11.7 libjpeg............................................. 24 10.11.8 libpng............................................. 24 10.11.9 libpng............................................. 25 10.11.10libtermcap.......................................... 25 10.11.11lilo............................................... 25 10.11.12linux-headers......................................... 25 10.11.13login.............................................. 25

CONTENTS 5 10.11.14logrotate........................................... 25 10.11.15logwatch............................................ 25 10.11.16losetup............................................ 26 10.11.17lynx.............................................. 26 10.12m................................................... 26 10.12.1 m4............................................... 26 10.12.2 mailx............................................. 26 10.12.3 make.............................................. 26 10.12.4 man.............................................. 26 10.12.5 mhash............................................. 27 10.12.6 mhash-devel.......................................... 27 10.12.7 mkbootdisk.......................................... 27 10.12.8 mkinitrd............................................ 27 10.12.9 mktemp............................................ 27 10.12.10module-init-tools....................................... 27 10.12.11modutils............................................ 27 10.12.12mount............................................. 28 10.12.13mysql............................................. 28 10.12.14mysql-client.......................................... 28 10.12.15mysql-libs........................................... 28 10.12.16mysql-shared......................................... 28 10.13n................................................... 28 10.13.1 ncurses............................................ 28 10.13.2 net-snmp........................................... 28 10.13.3 net-tools............................................ 29 10.13.4 newt.............................................. 29 10.13.5 nmap............................................. 29 10.13.6 ntp............................................... 29 10.14o.................................................... 29 10.14.1 openssh............................................ 29 10.14.2 openssh-clients........................................ 29 10.14.3 openssh-server........................................ 30 10.14.4 openssh-server-config..................................... 30 10.14.5 openssl............................................ 30 10.14.6 openssl-devel......................................... 30 10.15p................................................... 30 10.15.1 pam.............................................. 30

CONTENTS 6 10.15.2 passwd............................................ 30 10.15.3 pciutils............................................ 30 10.15.4 pcre.............................................. 30 10.15.5 perl.............................................. 31 10.15.6 perl-libwww-perl....................................... 31 10.15.7 perl-uri............................................ 31 10.15.8 popt.............................................. 31 10.15.9 portmap............................................ 31 10.15.10procps............................................. 31 10.15.11psacct............................................. 32 10.15.12psmisc............................................. 32 10.15.13pump............................................. 32 10.15.14pwdb............................................. 32 10.15.15python............................................. 32 10.15.16python-modules........................................ 33 10.16r.................................................... 33 10.16.1 readline............................................ 33 10.16.2 release............................................. 33 10.16.3 rootfiles............................................ 33 10.16.4 rpm.............................................. 33 10.16.5 rpm-python.......................................... 33 10.16.6 rsync.............................................. 33 10.16.7 rsync-server.......................................... 33 10.17s.................................................... 34 10.17.1 sash.............................................. 34 10.17.2 sed............................................... 34 10.17.3 setup............................................. 34 10.17.4 shadow-utils.......................................... 34 10.17.5 slang.............................................. 34 10.17.6 swup.............................................. 34 10.17.7 swup-conf........................................... 35 10.17.8 sysklogd............................................ 35 10.17.9 sysklogd-conf......................................... 35 10.17.10sysstat............................................. 35 10.17.11sysvinit............................................ 35 10.18t.................................................... 35 10.18.1 tar............................................... 35

1. Corso di Installazione e Manutenzione Server Linux 7 10.18.2 tcl............................................... 35 10.18.3 termcap............................................ 36 10.18.4 texinfo............................................. 36 10.18.5 tmpwatch........................................... 36 10.18.6 tsl-gpgkeys-sunchild..................................... 36 10.18.7 tsl-utils............................................ 36 10.19u................................................... 36 10.19.1 unzip............................................. 36 10.19.2 util-linux........................................... 36 10.20v................................................... 37 10.20.1 vim.............................................. 37 10.20.2 vsftpd............................................. 37 10.21w................................................... 37 10.21.1 which............................................. 37 10.21.2 words............................................. 37 10.22x................................................... 37 10.22.1 xinetd............................................. 37 10.23z.................................................... 37 10.23.1 zlib.............................................. 37 10.23.2 zlib-devel........................................... 37 1 Corso di Installazione e Manutenzione Server Linux Corso tenuto presso Ass.Sistemi Formativi Aziendali dell Unione Industriali di Bergamo in ottobre, novembre e dicembre 2003. 1.1 Installazione di Linux 1.1.1 Scelta della distribuzione La scelta della distribuzione va naturalmente effettuata in base a COSA DEVE FARE il calcolatore sulla quale abbiamo deciso di installare Linux. Il Kernel (nocciolo del sistema operativo) è identico per tutte le distribuzioni, e l ultima versione stabile è la 2.6.11. Se il computer deve svolgere mansioni di Server di Rete(DHCP, File Server, HTTP Server, FTP Server ecc.) il miglior compromesso tra stabilità, semplicità ed efficienza è la distribuzione Red Hat (ultima versione stabile 7.2). Se il computer deve essere un normalissimo PC per utente normale la versione più semplice è Mandrake, anche se conosciuta come instabile. Per applicazioni più professionali, esistono distribuzioni più ostiche ad un pubblico poco preparato, ma MOLTO POTENTI e SICURE, come SUSE, freebsd, openbsd.

1. Corso di Installazione e Manutenzione Server Linux 8 1.1.2 Creazione delle partizioni E opportuno non utilizzare Tool di facilitazione per la creazione delle partizioni, ma manualmente creare le seguenti partizioni: /- Partizione di root /var- Contiene tutti i file che variano in fase di esecuzione (Log, Spool, ecc) /usr- Contiene tutti i file eseguibili, i packages (*.rpm), ecc /home- Contiene tutte le cartelle riservate ai vari utenti creati sul sistema /swap- Creare una partizione di SWAP aiuterà la RAM nel suo lavoro. Se la RAM è inferiore ai 256 MB creare la partizione di swap grande il doppio, se la RAM è 256 MB o superiore creare una partizione della stessa dimensione (Data la grandezza sarebbe inopportuno sprecare troppo spazio disco che probabilmente non verrebbe mai utilizzato) /boot- Partizione riservata al boot loader 1.1.3 Avvio e spegnimento La sequenza di Boot è stabilita in fase di installazione del sistema, e non vi è nulla di particolare da segnalare, mentre per lo spegnimento è opportuno seguire la seguente procedura: Controllare la chiusura di tutte le shell tranne una; Lanciare il comando di spegnimento:...] # shutdown -h now A questo punto il computer (o il server), arresterà tutti i servizi dopodichè interverrà direttamente sull interruttore del PC spegnendolo. 1.1.4 Documentazione E possibile trovare documentazione a riguardo sui seguenti siti: http://www.kernel.org http://www.redhat.org 1.2 Utilizzo della Shell Esempio: #!/bin/bash function dirname () { local dir="$1" local tdir="$ { dir%/ }" // Strip trailing / characters from dir (unusual that this should # ever occur, but dirname(1) s while [ "${tdir}"!= "${dir}" ]; do tdir="${dir}" dir="${tdir%/}" done echo "${dir%/*}" }

1. Corso di Installazione e Manutenzione Server Linux 9 1.3 Utilizzo di VI xxx Vedere vim... 1.4 Gestione Utenti xxx 1.5 Gestione File System Per controllare la dimensione delle partizioni: # df -H // Per controllare la dimensione delle cartelle: # du -H --max-depth=n // dove n è il numero di directory da esaminare in profondità 1.5.1 Montare dispositivi USB Per montare dispositivi USB, fare riferimento al seguente documento: usb strg.htm Nel caso di una chiavetta USB, basta eseguire il comando: # mount -t auto /dev/sda1 /mnt/usb //dove sda1 è il device inserito (controllare nel file /var/log/me 1.6 DNS e DHCP xxx 1.7 FTP, HTTP e SSL 1.7.1 FTP xxx 1.7.2 HTTP xxx 1.7.3 SSL Certificate Generation SSL richiede l uso dei certificati. La distribuzione TAS non include i certificati perchè essi richiedono informazioni specifiche sul sito che possono essere ottenute attraverso il completamento di due procedure. Il primo step prevede la creazione di una chiave privata e il secondo step è ottenere un certificato. Esistono due tipi di certificati SSL accettabili: certificati firmati dalla Certificate Authority (CA) e certificati auto-firmati. Prima di generare il certificato, decidi qual è il migliore per il tuo ambiente. Per maggiori informazioni su OpenSSL, vai al sito: http://www.openssl.org

2. Corso di amministrazione Server LAMP 10 1.8 Ricompilazione del kernel xxx 1.9 Firewall (iptables) xxx 2 Corso di amministrazione Server LAMP Corso tenuto da M.Sciabarrà sull amministrazione di un server LAMP (Linux-Apache-Mysql-Php). 2.1 I giorno 2.1.1 Comando ps # ps -lx: lista tutti i processi in esecuzione # ps -lx grep httpd: lista tutti i processi in esecuzione che contengono nel nome la stringa httpd 2.1.2 Comando kill # kill 1234: uccide il processo con pid 1234 2.1.3 Compressori # zip -r archivio cartella1/ cartella2/: crea il file archivio.zip contenente cartella1 e cartella2 m Per creare un archivio tar.gz inserire il comando: tar -czf nome-0.0.0.tar.gz nome/ 2.1.4 Variabili d ambiente XXX 2.1.5 Installazione trustix XXX 2.2 II giorno 2.2.1 Routing XXX

3. Masterizzazione 11 2.3 III giorno 2.3.1 Compilazione sorgenti XXX 2.3.2 httpd A seconda della versione di Apache che utilizziamo (httpd), è necessario compilare php in modo diverso: 1. Apache 1 2. Apache 2 2.3.3 mysql XXX 3 Masterizzazione Visualizza questo documento html per maggiori informazioni. Prendiamo in esame due tipologie di CD: 3.1 CD AUDIO Inserire il CD sorgente nel lettore e creare l immagine iso dei dati richiesti: # cdparanoia -B // -B --batch => batch mode (saves ogni traccia in un file diverso) Inserire il CD # cdrecord -v -audio -pad -dao *.wav 3.2 CD DATI Inserire il CD sorgente nel lettore: # mkisofs -v -R -J -D -T -o./immagine.iso /dati/cartella1 /dati/cartella2 /dati/cartella3 Inserire i # cdrecord -data./immagine.iso 3.3 CD AVVIABILI Per copiare un cd paro paro, in raw format (formato grezzo, byte per byte): # readcd dev=0,0,0 f=cdimage.raw poi scrivere il file ottenuto sul CD # nice --18 cdrecord -eject -v speed=2 dev=0,0,0 -data -pad --cdimage.raw dev=0,0,0 deve essere in base al device utilizzato per masterizzare, e il CD ottenuto è avviabile al boot.

4. linuxdoc 12 4 linuxdoc Preso filename come file SGML, eseguire i seguenti comandi: # linuxdoc --backend=html --language=it --charset=latin filename //per creare il documento html # linuxdoc --backend=latex --output=pdf --language=it --charset=latin filename //per creare il docu 4.1 Sintassi sorgente Per le regole basilare della sintassi da utilizzare, fare riferimento al file SGMLtools1.0-LinuxDoc.htm 5 Postgres Motore database open source. ( http://www.postgresql.org/ ) Lavora di default sulla porta 5432. 5.1 Avvio demone in ascolto # su postgres // utilizzare un utente riservato al motore db, no root # /usr/bin/postmaster -D /var/lib/pgsql/test -S // avvia il servente per postgres nel database test 5.2 Connessione client (psql) Dopo aver verificato l avvio del demone in ascolto, lanciare il client psql da console: # psql test // avvia il client per la connessione al database test 5.3 Creazione database Dopo aver verificato l avvio del demone in ascolto, inizializzare il database: # initdb -D /var/lib/pgsql/test -U postgres --locale=it_it.iso88591 // inizializza il database test # /usr/bin/postmaster -D /var/lib/pgsql/test -S // avvia il servente per postgres nel database indic # createdb test // crea il database test 6 php scripts 6.1 Upload files switch (true) { case ($_FILES): $my_data = $_FILES; break; case ($HTTP_POST_FILES): $my_data = $HTTP_POST_FILES; break; } // what to do with the uploaded file.. if (isset($my_data[ file ]) && $my_data[ file ][ size ] <= FTP_MAX_SIZE) { # Connessione ftp

7. Integrazione con MSSQL-SERVER 13 $locale_file=$my_data[ file ][ tmp_name ]; $remote_file=$my_data[ file ][ name ]; $conn_id =ftp_connect(ftp_host,ftp_port,ftp_timeout); $conn=ftp_login($conn_id,ftp_user,ftp_pass); if (ftp_put($conn_id,$remote_file,$locale_file,ftp_ascii)) { // ok, succesfully uploaded $success = true; $error_message="ftp upload in progress... Done!<BR>"; ftp_close($conn_id); } else { // ops, problems.. $success = false; $error_message="ftp Upload problems..."; } } else { // nothing to upload $success = false; $error_message="nothing to upload"; } echo "<HR>".$error_message."<HR>"; 7 Integrazione con MSSQL-SERVER 7.1 freetds Compilare librerie FreeTDS ( www.freetds.org ) per mssql(php ext) Installazione su nessuno@sys-com.it nella directory /sw/ Download da freetds.org dell ultima versione stabile /sw/freetds-stable.tgz Scompattare # tar -zxvf freetds-stable.tgz # cd freetds-0.62.4 # mkdir bin #./configure --enable-msdblib --prefix=/sw/bin # make # make install Ricompilare php con il supporto per Microsoft SQL Server (mssql) # cd /sw/php-4.3.9 #./configure --with-gd --with-apxs2=/www/bin/apxs --with-zlib-dir=/sw/php-4.3.9/ext --with-mssql=/sw/ NOTE: CONTROLLARE DI AVERE CARICATO il pacchetto glibc-locales 8 SSL/TLS Ogni protocollo pensato specificatamente per le connessioni cifrate, ha le sue particolarità, dettate dalle esigenze iniziali per le quali è stato realizzato. In linea di massima si possono individuare le fasi seguenti:

8. SSL/TLS 14 il cliente negozia con il servente le caratteristiche del protocollo cifrato da adottare; il servente invia al cliente la propria chiave pubblica all interno di un certificato, che il cliente può verificare se ne è in grado e se lo ritiene necessario; il servente può pretendere dal cliente un certificato che possa verificare, oppure può pretendere di essere già in possesso della chiave pubblica del cliente (naturalmente già verificata); una volta che il cliente dispone della chiave pubblica del servente, può iniziare una prima fase di comunicazione cifrata, in cui solitamente ci si scambia una chiave simmetrica generata in modo casuale, per rendere più sicura la comunicazione. La verifica dei certificati serve a garantire l identità dei nodi e delle utenze coinvolte, ovvero, un servente può garantire l identità del servizio, mentre un cliente può garantire l identità dell utente che lo richiede. La situazione tipica in cui si richiede una connessione cifrata è quella in cui una persona qualunque voglia fare un acquisto presso un negozio telematico, utilizzando il proprio navigatore. Dovendo fornire i propri dati personali, compresi quelli della carta di credito, questa persona vuole essere sicura di trasmettere le informazioni alla controparte giusta. Per questo, il suo navigatore che instaura la comunicazione cifrata, deve garantire al suo utilizzatore l identità della controparte attraverso la verifica della chiave pubblica del servizio, che deve essere già in suo possesso, all interno di un certificato ritenuto valido. Quando l accesso a un servizio che presuppone una connessione cifrata è soggetto a una forma di registrazione, l autenticazione dell accesso da parte del cliente può avvenire attraverso l uso di un certificato depositato in precedenza. In pratica, in questo modo il servente può chiedere al cliente di iniziare subito una connessione cifrata che da parte sua può decifrare usando la chiave pubblica del cliente stesso, a garanzia della sua identità, senza bisogno di richiedere l inserimento della solita parola d ordine. In tutti i casi, questo tipo di connessioni non dovrebbe tornare mai a trasmettere dati in chiaro. Infatti, anche se lo scopo della procedura fosse solo quello di garantire l identità delle parti, resta comunque necessario mantenere la connessione cifrata per garantire anche che una delle parti non venga sostitl articolo estratto da swliberouita durante la comunicazione. Per ulteriori informazioni consultare l articolo estratto da swlibero 8.1 SSL Secure Socket Layer, algoritmo di crittografia usato anche dai browser web; 8.2 TLS Trasmission Layer Security: è l evoluzione del protocollo SSL, sviluppato inizialmente da Netscape, e viene comunemente indicato come SSL/TLS con le seguenti caratteristiche: cifratura dei dati nelle connessioni client/server autenticazione del server (il client può verificare l autenticità del server) integrità dei messaggi (i dati non sono modificati durante la trasmissione per evitare attacchi del tipo man in the middle ) autenticazione del client (il server può verificare l autenticità del client).

9. Comandi utili 15 9 Comandi utili 9.1 Ricerca file # grep -HR "stringa" * // Ricerca di una stringa all interno dei file: # ls -lri /... grep "25\ dec" // Ricerca dei file modificati in un determinato giorno 10 RPM: descrizione pacchetti 10.1 a 10.1.1 agetty agetty è un getty alternativo. Esso vuole tutti i parametri nella linea di comando, senza l utilizzo di /etc/gettydefs o qualsiasi altro file di configurazione. La documentazione relativa è nella man page agetty(8). 10.1.2 anonftp Il pacchetto anonftp contiene i file necessari per abilitare accessi anonimi FTP sulla vostra macchina. L accesso anonimo FTP abilita chiunque a scaricare files senza avere un account: è la via più popolare per diffondere software via Internet. E NECESSARIO installare anonftp se voleste abilitare il download anonimo dalla vostra macchina. 10.1.3 ash Almquist shell è un clone della Berkeley s Bourne shell. Ash supporta tutti gli standard sh ed è considerabile come più piccola di bash. Ad Ash mancano alcune features (per esempio lo storico dei comandi), ma necessita di molta meno memoria. Questo pacchetto contiene una piccola versione di ash utile per il system recovery o come modalità di ripristino per root. 10.1.4 authconfig Authconfig is a terminal mode program for setting up Network Information Service (NIS) and shadow (more secure) passwords on your system. Authconfig also configures the system to automatically turn on NIS at system startup. 10.2 b 10.2.1 bash Bash is an sh-compatible command interpreter that executes commands read from standard input or from a file. Bash incorporates useful features from the Korn and C shells (ksh and csh). Bash is intended to be a conformant implementation of the IEEE Posix Shell and Tools specification (IEEE Working Group 1003.2).

10. RPM: descrizione pacchetti 16 10.2.2 bash-static Bash is a GNU project sh-compatible shell or command language interpreter. Bash (Bourne Again shell) incorporates useful features from the Korn shell (ksh) and the C shell (csh). Most sh scripts can be run by bash without modification. Bash offers several improvements over sh, including command line editing, unlimited size command history, job control, shell functions and aliases, indexed arrays of unlimited size and integer arithmetic in any base from two to 64. Bash is ultimately intended to conform to the IEEE POSIX P1003.2/ISO 9945.2 Shell and Tools standard. Bash is the default shell for Linux Mandrake. You should install bash because of its popularity and power. You ll probably end up using it. This package contains statically linked version of bash. 10.2.3 binutils Binutils is a collection of binary utilities, including ar (for creating, modifying and extracting from archives), nm (for listing symbols from object files), objcopy (for copying and translating object files), objdump (for displaying information from object files), ranlib (for generating an index for the contents of an archive), size (for listing the section sizes of an object or archive file), strings (for listing printable strings from files), strip (for discarding symbols), c++filt (a filter for demangling encoded C++ symbols), addr2line (for converting addresses to file and line), and nlmconv (for converting object code into an NLM). Install binutils if you need to perform any of these types of actions on binary files. Most programmers will want to install binutils. 10.2.4 bison Bison is a general purpose parser generator that converts a grammar description for an LALR(1) context-free grammar into a C program to parse that grammar. Bison can be used to develop a wide range of language parsers, from ones used in simple desk calculators to complex programming languages. Bison is upwardly compatible with Yacc, so any correctly written Yacc grammar should work with Bison without any changes. If you know Yacc, you shouldn t have any trouble using Bison. You do need to be very proficient in C programming to be able to use Bison. Bison is only needed on systems that are used for development. If your system will be used for C development, you should install Bison. 10.2.5 bzip2 Bzip2 compresses files using the Burrows-Wheeler block-sorting text compression algorithm, and Huffman coding. Compression is generally considerably better than that achieved by more conventional LZ77/LZ78- based compressors, and approaches the performance of the PPM family of statistical compressors. The command-line options are deliberately very similar to those of GNU Gzip, but they are not identical. 10.3 c 10.3.1 chkconfig Chkconfig is a basic system utility. It updates and queries runlevel information for system services. Chkconfig manipulates the numerous symbolic links in /etc/rc.d, to relieve system administrators of some of the drudgery of manually editing the symbolic links.

10. RPM: descrizione pacchetti 17 10.3.2 console This package contains static libraries for console tools. 10.3.3 coreutils Basic file, shell and text manipulation utilities. The package contains the following programs: basename cat chgrp chmod chown chroot cksum comm cp csplit cut date dd df dir dircolors dirname du echo env expand expr factor false fmt fold install groups head id join kill link ln logname ls md5sum mkdir mkfifo mknod mv nice nl nohup od paste pathchk pinky pr printenv printf ptx pwd readlink rm rmdir seq sha1sum shred sleep sort split stat stty su sum sync tac tail tee test touch tr true tsort tty uname unexpand uniq unlink uptime users vdir wc who whoami yes 10.3.4 cracklib CrackLib tests passwords to determine whether they match certain security-oriented characteristics. You can use CrackLib to stop users from choosing passwords which would be easy to guess. CrackLib performs certain tests: It tries to generate words from a username and gecos entry and checks those words against the password; It checks for simplistic patterns in passwords; It checks for the password in a dictionary. CrackLib is actually a library containing a particular C function which is used to check the password, as well as other C functions. CrackLib is not a replacement for a passwd program; it must be used in conjunction with an existing passwd program. Install the cracklib package if you need a program to check users passwords to see if they are at least minimally secure. If you install CrackLib, you ll also want to install the cracklib-dicts package. 10.3.5 cracklib-dicts The cracklib-dicts package includes the CrackLib dictionaries. CrackLib will need to use the dictionary appropriate to your system, which is normally put in /usr/share/dict/words. Cracklib-dicts also contains the utilities necessary for the creation of new dictionaries. If you are installing CrackLib, you should also install cracklib-dicts. 10.3.6 crontabs The crontabs package contains root crontab files. Crontab is the program used to install, uninstall or list the tables used to drive the cron daemon. The cron daemon checks the crontab files to see when particular commands are scheduled to be executed. If commands are scheduled, it executes them. Crontabs handles a basic system function, so it should be installed on your system.

10. RPM: descrizione pacchetti 18 10.4 d 10.4.1 db1 The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides embedded database support for both traditional and client/server applications. It should be installed if compatibility is needed with databases created with db1. This library used to be part of the glibc package. 10.4.2 db4 The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides embedded database support for both traditional and client/server applications. The Berkeley DB includes B+tree, Extended Linear Hashing, Fixed and Variable-length record access methods, transactions, locking, logging, shared memory caching, and database recovery. The Berkeley DB supports C, C++, Java, and Perl APIs. It is used by many applications, including Python and Perl, so this should be installed on all systems. 10.4.3 dev The Red Hat Linux operating system uses file system entries to represent devices (CD-ROMs, floppy drives, etc.) attached to the machine. All of these entries are in the /dev tree (although they don t have to be). This package contains the most commonly used /dev entries. The dev package is a basic part of your Red Hat Linux system and it needs to be installed. 10.4.4 diffutils The GNU diff utilities find differences between files; diff is used to make source code patches, for instance. 10.5 e 10.5.1 e2fsprogs The e2fsprogs package contains a number of utilities for creating, checking, modifying, and correcting any inconsistencies in second extended (ext2) filesystems. E2fsprogs contains e2fsck (used to repair filesystem inconsistencies after an unclean shutdown), mke2fs (used to initialize a partition to contain an empty ext2 filesystem), debugfs (used to examine the internal structure of a filesystem, to manually repair a corrupted filesystem, or to create test cases for e2fsck), tune2fs (used to modify filesystem parameters), and most of the other core ext2fs filesystem utilities. You should install the e2fsprogs package if you need to manage the performance of an ext2 filesystem. 10.5.2 ed The standard, old Unix line editor. 10.5.3 etcskel The etcskel package is part of the basic Trustix system. Etcskel provides the /etc/skel directory s files. These files (.bash logout,.bash profile,.bashrc) are then placed in every new user s home directory when new accounts are created.

10. RPM: descrizione pacchetti 19 10.5.4 expat This is expat, the C library for parsing XML, written by James Clark. Expat is a stream oriented XML parser. This means that you register handlers with the parser prior to starting the parse. These handlers are called when the parser discovers the associated structures in the document being parsed. A start tag is an example of the kind of structures for which you may register handlers. 10.5.5 expat-libs The runtime XML libraries for expat 10.6 f 10.6.1 fcron Fcron is a scheduler. It is used to run specified tasks at specified times. 10.6.2 file The file command is used to identify a particular file according to the type of data contained by the file. File can identify many different file types, including ELF binaries, system libraries, RPM packages, and different graphics formats. You should install the file package, since the file command is such a useful utility. 10.6.3 filesystem This package installs the basic directory structure. It also includes the home directories of system users. 10.6.4 findutils The findutils package contains programs which will help you locate files on your system. The find utility searches through a hierarchy of directories looking for files which match a certain set of criteria (such as a filename pattern). The xargs utility builds and executes command lines from standard input arguments (usually lists of file names generated by the find command). You should install findutils because it includes tools that are very useful for finding things on your system. 10.6.5 flex The flex program generates scanners. Scanners are programs which can recognize lexical patterns in text. Flex takes pairs of regular expressions and C code as input and generates a C source file as output. The output file is compiled and linked with a library to produce an executable. The executable searches through its input for occurrences of the regular expressions. When a match is found, it executes the corresponding C code. Flex was designed to work with both Yacc and Bison, and is used by many programs as part of their build process. You should install flex if you are going to use your system for application development.

10. RPM: descrizione pacchetti 20 10.6.6 fp-linux-ws ieee utility 10.6.7 freetype The FreeType engine is a free and portable TrueType font rendering engine, developed to provide TrueType support for a variety of platforms and environments. FreeType is a library which can open and manages font files as well as efficiently load, hint and render individual glyphs. FreeType is not a font server or a complete text-rendering library. 10.6.8 ftp The ftp package provides the standard UNIX command-line FTP (File Transfer Protocol) client. FTP is a widely used protocol for transferring files over the Internet and for archiving files. If your system is on a network, you should install ftp in order to do file transfers. 10.7 g 10.7.1 gawk The gawk packages contains the GNU version of awk, a text processing utility. Awk interprets a specialpurpose programming language to do quick and easy text pattern matching and reformatting jobs. Gawk should be upwardly compatible with the Bell Labs research version of awk and is almost completely compliant with the 1993 POSIX 1003.2 standard for awk. Install the gawk package if you need a text processing utility. Gawk is considered to be a standard Linux tool for processing text. 10.7.2 gcc The gcc package contains the GNU Compiler Collection version 4.1. You ll need this package in order to compile C code. 10.7.3 gcc-c++-runtime This is the C++ runtime part of the GNU Compiler Collection. programs linked against libstdc++. You ll need this package to run C++ 10.7.4 gcc-cpp This is the C Pre Processor. Needed to compile. 10.7.5 gcc-runtime This is the C runtime part of the GNU Compiler Collection. There may be a few C programs linked against this library.