Debian/Ubuntu aggiungere delle rotte statiche allo startup

Per aggiungere delle rotte statiche allo startup occorre andare a modificare il file /etc/network/interfaces Ed aggiungere le direttive post-up e post-down alla direttiva iface ethX. Ecco un esempio: auto eth0 iface eth0 inet static address 10.9.38.76 netmask 255.255.255.240 network 10.9.38.64 broadcast 10.9.38.79 ### static routing ### post-up route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.9.38.65 pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 10.9.38.65
Read more...Installare PostgreSQL 9.1 in Ubuntu 10.04

Per prima cosa installare il pacchetto python-software-properties : sudo apt-get install python-software-properties Poi aggiungere il repository backports ed aggiornare apt sudo add-apt-repository ppa:pitti/postgresql sudo apt-get update Poi installare PostgreSQL Server 9.1 sudo apt-get install postgresql-9.1 libpq-dev
Read more...Linux visualizzare la dimensione delle cartelle/file

Un comando molto comodo in linux per visualizzare lo spazio occupato delle cartelle e/o file è il seguente du -h –max-dept=1
Read more...Debian iptables startup script

Per prima cosa occorre salvare la configurazione del firewall con il comando iptables-save > /etc/firewall.conf Poi occorre andare creare un file in /etc/network/if-up.d cd /etc/network/if-up.d touch iptables chmod 755 iptables e al suo interno occorre scrivere #!/bin/sh iptables-restore < /etc/firewall.conf
Read more...Installare un server Rsync in debian

Per prima cosa installiamo i pacchetti necessari apt-get install rsync openbsd-inetd Poi creiamo il file /etc/rsyncd.conf (in questo esempio andremo a sincronizzare l cartella /home/prova per l’utente pippo) max connections = 10 log file = /var/log/rsync.log timeout = 300 pid file=/var/run/rsyncd.pid [prova] comment = Rsync prova path = /home/prova read only = no list = yes uid = pippo gid = root auth users=pippo list = yes hosts allow =…
Read more...