[ITA] Guida indirizzo IP fisso con Debian Squeeze da console ssh

headMolto facile e veloce:

Apri il file /etc/network/interfaces con

su -

per diventare root
e

nano /etc/network/interfaces

per editare il file con nano.

Una volta modificato,
salvare con +”o” + invio
e
chiudere con
+”x”

Ovviamente occorre adattare il seguente contenuto alla propria sottorete (è ovvio che può essere anche un indirizzo ip pubblico…). In questo esempio viene utilizzato l’ indirizzo IP 192.168.0.100/24, la subnet 192.168.0.0, il router 192.168.0.1, l’ interfaccia di rete ETH0
Continue reading “[ITA] Guida indirizzo IP fisso con Debian Squeeze da console ssh”

Free SSL Certificate to Ispconfig websites with Startssl – How to

ispconfiglogostartssl_logo
This article will go through the complete process in order to obtain, install and run an SSL Webserver Certificate for free with ISPConfig3 and Startssl dot com.
Some years ago i discovered this useful service for generating Class 2 webserver certificates, very useful to offer your user a secure, encrypted connection over wich they can send their data reducing the risks of being sniffed (i’ll write something about sniffing).
Continue reading “Free SSL Certificate to Ispconfig websites with Startssl – How to”

Incoming search terms:

  • ispconfig startssl (32)
  • ispconfig ssl certificate (23)
  • ispconfig website ssl Certificate (22)
  • instalar ssl in ispconfig (17)
  • where is folder www https ispconfig (16)
  • shared ssl ispconfig (15)

Backup Shell script: each Mysql database to a separated dump

MySql LogoAnother life-saver script for a sysadmin.
Run with root mysql user privileges, so.

Use this script at your own risk. The -h option provides a short usage line. If you notice any bug or if you have a useful addition please post your feedback as a comment. Continue reading “Backup Shell script: each Mysql database to a separated dump”

Incoming search terms:

  • mail esac pt (48)

Using rsync, ssh and cronjob – automatic secured backup

One of My favourite technical article EVER!

I don’t usually produce redundancy copying articles from other’s websites, but after happened to a website (cannot mention, but it was suddenly closed), i decided to keep it (until its license grants me to keep it).

source: http://troy.jdmz.net/rsync/index.html

Using Rsync and SSH
Keys, Validating, and Automation
This document covers using cron, ssh, and rsync to backup files over
a local network or the Internet. Part of my goal is to ensure no user
intervention is required when the computer is restarted (for passwords,
keys, or key managers).

Incoming search terms:

  • raspberry pi rsync (18)
  • rsync raspberry pi (11)

Automating Moodle: basic cronjob solution

If you navigate your moodle administration side and click on “Notifications” you will probably see this statement:
The cron.php maintenance script has not been run for at least 24 hours.

just like this one:

Unless you have already setup an automated way to accomplish this, you want to Continue reading “Automating Moodle: basic cronjob solution”

Debian: How to run scripts at boot time

Personal notes to be always available for debian installations.

secure-coding-php

Here’s a very simple script which is divided into two parts, code which always runs, and code which runs when called with “start” or “stop”.

If you need something like a service to start at boot time, you need this.
Debian stores script needed to usually start, stop and restart in /etc/init.d/
Scripts contained have to be able to manage at least the start and stop parameters. Continue reading “Debian: How to run scripts at boot time”

[Ita] Come installare XBMC su Raspberry Pi con Raspbian Wheezy

Xbmb on top of raspbian: how to

Questo articolo illustrerà la procedura per installare correttamente XBMC su un Raspberry Pi che utilizza Raspbian Wheezy, ovvero Debian. Continue reading “[Ita] Come installare XBMC su Raspberry Pi con Raspbian Wheezy”

Incoming search terms:

  • raspbian xbmc (104)
  • installare xbmc su raspbian (43)
  • xbmc raspbian (26)
  • raspbian wheezy (23)
  • installare xbmc su raspberry (20)
  • portakalsepeti com (19)
  • raspbian wheezy static ip (18)
  • raspbian wheezy xbmc (18)
  • come installare xbmc su raspberry pi (14)
  • installare xbmc su raspberry pi (13)

VPS: Debian squeeze apt-get update returned an error code (1)

Also known as “E: Sub-process /usr/bin/dpkg returned an error code (1)“.
Well you are trying to run apt-get upgrade on a virtual private server running Debian squeeze (it can happen on Lenny too) hosted on several Xen based platforms.
It happens because grub cannot find your disk in order to rewrite your initrd image.

Since Xen kernel management is transparent to your machine itself, and it is all you need in order to boot your machine, you can remove grub with no fear, typing:

root@apple.com:~#apt-get remove grub-legacy grub-common

And yes, finally you will go to the end of your apt-get upgrade process.

Hope this can help out there!

 

Output of my machine follows:

Setting up linux-image-2.6.32-5-amd64 (2.6.32-39squeeze1) ...
Running depmod.
Running update-initramfs.
update-initramfs: Generating /boot/initrd.img-2.6.32-5-amd64
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 2.6.32-5-amd64 /boot/vmlinuz-2.6.32-5-amd64
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 2.6.32-5-amd64 /boot/vmlinuz-2.6.32-5-amd64
Searching for GRUB installation directory ... found: /boot/grub
warning: grub-probe can't find drive for /dev/xvda1.
grub-probe: error: cannot find a GRUB drive for /dev/xvda1.  Check your device.map.
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-2.6.32-5-amd64.postinst line 799.
dpkg: error processing linux-image-2.6.32-5-amd64 (--configure):
subprocess installed post-installation script returned error exit status 2
Setting up linux-image-2.6.32-5-xen-amd64 (2.6.32-39squeeze1) ...
configured to not write apport reports
Running depmod.
Running update-initramfs.
update-initramfs: Generating /boot/initrd.img-2.6.32-5-xen-amd64
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 2.6.32-5-xen-amd64 /boot/vmlinuz-2.6.32-5-xen-amd64
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 2.6.32-5-xen-amd64 /boot/vmlinuz-2.6.32-5-xen-amd64
Searching for GRUB installation directory ... found: /boot/grub
warning: grub-probe can't find drive for /dev/xvda1.
grub-probe: error: cannot find a GRUB drive for /dev/xvda1.  Check your device.map.
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-2.6.32-5-xen-amd64.postinst line 799.
dpkg: error processing linux-image-2.6.32-5-xen-amd64 (--configure):
subprocess installed post-installation script returned error exit status 2
configured to not write apport reports
Errors were encountered while processing:
linux-image-2.6.32-5-amd64
linux-image-2.6.32-5-xen-amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)

After the cure, finally:

root@apple.com:~# apt-get remove grub-legacy grub-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
gettext-base libfreetype6 ucf os-prober
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
grub-common grub-legacy
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 5,931 kB disk space will be freed.
Do you want to continue [Y/n]? Y
(Reading database ... 17063 files and directories currently installed.)
Removing grub-legacy ...
Removing grub-common ...
Processing triggers for man-db ...
Processing triggers for install-info ...
Setting up linux-image-2.6.32-5-amd64 (2.6.32-39squeeze1) ...
Running depmod.
Running update-initramfs.
update-initramfs: Generating /boot/initrd.img-2.6.32-5-amd64
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 2.6.32-5-amd64 /boot/vmlinuz-2.6.32-5-amd64
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 2.6.32-5-amd64 /boot/vmlinuz-2.6.32-5-amd64
Setting up linux-image-2.6.32-5-xen-amd64 (2.6.32-39squeeze1) ...
Running depmod.
Running update-initramfs.
update-initramfs: Generating /boot/initrd.img-2.6.32-5-xen-amd64
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 2.6.32-5-xen-amd64 /boot/vmlinuz-2.6.32-5-xen-amd64
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 2.6.32-5-xen-amd64 /boot/vmlinuz-2.6.32-5-xen-amd64

et voilà

And now

Some music

Incoming search terms:

  • raspbmc dpkg: error processing network-manager (--configure): (10)