freenx server + nxclient

Configurazione di base

Installazione di Ubuntu 9.04

  • installazione
  • localizzazione in italiano
  • upgrade dei pacchetti di sistema
  • riavvio secondo richiesta (eventuale upgrade del kernel)

Installazione del server freeNX

Liberamente tratta da questa pagina https://help.ubuntu.com/community/FreeNX

  • aprire un terminale e digitare quanto segue:
sudo -s
VERSION=$(lsb_release -cs)
echo deb http://ppa.launchpad.net/freenx-team/ppa/ubuntu $VERSION main >>/etc/apt/sources.list
echo deb-src http://ppa.launchpad.net/freenx-team/ppa/ubuntu $VERSION main >>/etc/apt/sources.list
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 2a8e3034d018a4ce
aptitude update
aptitude install freenx-server
exit

Creazione degli utenti di prova

sudo -s
yes "" | adduser --disabled-password lugge
yes "" | for i in $(seq 0 9); do adduser --disabled-password lugge0$i; done
yes "" | for i in $(seq 1 9); do adduser --disabled-password lugge1$i; done
yes "lugge" | for i in $(seq 1 9); do passwd lugge0$i; done
yes "lugge" | for i in $(seq 0 9); do passwd lugge1$i; done
yes "lugge" | passwd lugge
exit

Ottimizzazione degli utenti

Per ogni utente andare nel menu:

sudo apt-get remove compiz mesa-utils
  • Sistema -> Preferenze -> Aspetto -> Effetti Visivi -> Nessuno
  • Sistema -> Preferenze -> Applicazioni d'avvio -> Programmi d'avvio -> disattivare tutti quelli non strettamente necessari

Installazione degli nxclient

  • scaricare nclient per linux dal sito http://www.nomachine.com
  • installare il pacchetto nxclient su tutti le postazioni
  • provare a disabilitare la cifratura se si vogliono diminuire il carico del server (non sempre funziona senza cifratura dipende dalle impostazioni del firewall)
  • provare ad abilitare la gestione del multimedia se si vuole remotizzare anche il suono
  • provare a disabilitare la compressione zlib per diminuire il carico del server (ma aumentare il traffico di rete, quindi solo in LAN)

ATTENZIONE ALLA LICENZA

http://www.nomachine.com/ar/view.php?ar_id=AR12B0011

Is the NX Client software open-source?
The NoMachine NX Client is closed-source software, developed under a proprietary license (EULA). NoMachine makes the software available in binary form under a free for commercial and non-commercial use license similar to the Adobe Acrobat reader software that you find in all the Linux distributions (ie. users do not have to pay to install the client software, plus you can download it as many times as you want. Please see the EULA for further details: www.nomachine.com/licensing)

http://www.nomachine.com/licensing

4.1 Commercial NoMachine Software

[… omissis …]

NoMachine owns the copyrights and intellectual property in and to each item of NoMachine Commercial Software. [… omissis …] Redistribution of NX Client software, including commercial Closed Source packages, is allowed, free of charge, for commercial and non-commercial use providing any copyright notices that pertain to the origins of the Software are not altered in any way or removed.

No modification, adaptation, translation of the software is permitted, including modification to the graphical contents, without specific and prior permission from NoMachine.

http://www.nomachine.com/ar/view.php?ar_id=AR10B00022

Why doesn’t NoMachine release clients and servers as Open Source?
NX Servers and NX Clients represent the "value added" to NX software released as Open Source. They are intended to be our main source of revenues, followed by support contracts subscribed to by corporate customers. Software development is expensive. Past experiences have demonstrated that it’s very difficult for "pure" Open Source companies to remain in the business.

The FreeNX project was launched in order to provide the community with the core technology of NX Server. NoMachine’s aim is to create an open marketplace where companies and individuals develop on top of the same standards to build the network computing of tomorrow. For more information about FreeNX please go to the Freshmeat website where the project is hosted or visit the Berlios website.

Verifica sperimentale

In questa sezione si analizza la capacità del sistema di reggere lo stress o utilizzare hardware non aggiornatissimo

Carico del server

Il server è uno IBM ThinkCentre 8198-74G con 2Gb di RAM, HD IDE (ST340014A) da 40Gb e CPU P4 @ 2.8GHz
Il server è stato installato con Ubuntu Linux 9.04 in versione desktop (impostazioni di sicurezza desktop)
Facendo il reboot con memtest riporta che la velocità di trasferimento della RAM è di 835Mb/s.

La configurazione dei client era con cifratura e compressione zlib abilitata e risoluzione a scermo intero variabile da 1024x768 (15") a 1440x900 (17" wide):

  • aperte 5 sessioni remote + una locale utilizzate come desktop appaino una configurazione sostenibile per questo server:
lugge@lugge:~$ grep "model name" /proc/cpuinfo 
model name    : Intel(R) Pentium(R) 4 CPU 2.80GHz

lugge@lugge:~$ sudo fdisk -l /dev/sda | grep sda:
Disco /dev/sda: 40.0 GB, 40016019456 byte

ugge@lugge:~$ sudo hdparm -t /dev/sda | egrep .
/dev/sda:
 Timing buffered disk reads:  166 MB in  3.00 seconds =  55.25 MB/sec

lugge@lugge:~$ top

top - 12:10:12 up  1:53,  5 users,  load average: 5.20, 5.45, 4.01
Tasks: 276 total,   6 running, 270 sleeping,   0 stopped,   0 zombie
Cpu(s): 74.1%us, 24.6%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.3%hi,  1.0%si,  0.0%st
Mem:   2053324k total,  1333576k used,   719748k free,   100908k buffers
Swap:   827308k total,        0k used,   827308k free,   615404k cached

Requisiti minimi del client

Utilizzando tinycore linux 1.4.2 con nxclient 3.3.0-6 installato è possibile ottenere un'ottima interattività con P3 @450MHz, 128 Mb RAM, boot da CDROM 40x.

  • tempo di boot dal bootloader alla visualizzazione dello nxclient: 25 secondi
  • memoria utilizzata prima dell'avvio della connessione con nxclient già lanciato: 58 Mb
  • memoria utilizzata durante l'uso della connessione remota: 74 Mb
  • picco massimo utilizzo CPU durante la connessione remota: 88.1%
  • carico di sistema massimo durante la connessione remota: 0.61
  • carico di sistema medio durante la connessione remota: 0.23
  • memoria utilizzata dopo aver chiuso la sessione e nxclient: 64Mb

Abbiamo provato con soli 64Mb di RAM ma questa configurazione non pare essere accettabile si blocca durante l'uso della sessione remota e bisogna abbattere nxclient per riprendere il controllo del sistema (anche con soli 4Mb di cache in RAM e 0Mb di cache su disco che in questo caso sono comunque allocati in RAM perchè usa tmpfs per le parti R/W). E' ragionevole pensare che il sistema possa funzionare su un P2 @300MHz con 96Mb di RAM.

top -d1 | grep -e "^[CPULoad]" > top.txt
grep CPU top.txt | cut -d\: -f2 | cut -d\u -f1 | sort -g | tail -n1
 88.1%
grep Load top.txt  | cut -d\: -f2 | sort -g | tail -n1
 0.61 0.23 0.09 3/38 1829

Il file da cui sono state tratte le statistiche è disponibile qui: top.txt

Screenshoot

screenshoot-02.png

Esempio di configurazione per implementare il sistema al di fuori del Meucci

Installazione del server dhcp e del proxy dns

  • aprire un terminale e digitare quanto segue:
sudo apt-get install dhcp3-server
sudo apt-get install dnsproxy
  • file di configurazione del dhcp server /etc/dhcp/dhcpd.conf:
ddns-update-style ad-hoc; 
default-lease-time 600;
max-lease-time 7200;
authoritative;
log-facility local7;

option domain-name-servers 192.168.0.1;

subnet 192.168.0.0 netmask 255.255.255.0 {
    range 192.168.0.100 192.168.0.199;
    option routers 192.168.0.1;
}
  • file di configurazione del dns proxy /etc/dnsproxy.conf:
authoritative 192.168.0.1
authoritative-port 53        
authoritative-timeout 10
recursive 192.168.0.1
recursive-port 53        
recursive-timeout 90        
listen 192.168.0.1
port 53
chroot /var/spool/dnsproxy
user dnsproxy
internal 192.168.0.0/24    
internal 127.0.0.1
  • aprire un terminale e digitare quanto segue:
sudo /etc/init.d/dnsproxy restart
sudo /etc/init.d/dhcp3-server restart
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.