Sometimes it’s good to know which kind of Debian version you are running on your system. This small article shows you how to check for the version.
Get the sizes of directories nicely formated via the following command. This can take some while to execute, because it sums up the file sizes in the directories.
du --max-depth=1 -h
apt-get remove --purge mysql-server apt-get remove --purge mysql-client apt-get autoremove
and wondered that the directories /var/lib/mysql /etc/mysql still existed after the commands. Then I recognized, that a
apt-get remove --purge 'mysql-server.*'
is doing better and removes everything.
if you get a
/etc/init.d/mysql: WARNING: /etc/mysql/my.cnf cannot be read.
error when you try to re-install MySQL, try a
apt-get purge mysql-common
and try to re-install again.
Sometimes it is necessary to remove MySQL completely from your Debian system. E.g. after a complete misconfiguration. I had this problem and found this commands to get rid of MySQL server and client (in this case in version 5.1). Both commands need to be executed as root:
# apt-get autoremove --purge mysql-server mysql-server-5.0 # apt-get autoremove --purge mysql-client mysql-client-5.1
I’ve just got the following error message while accessing the Inbound E-mail feature in SugarCRM:
To fix this error on my Debian server I’ve had to install the PHP IMAP module via
apt-get install php5-imap
and uncomment the line
# cron.* /var/log/cron.log
After that you need to restart rsyslog via
and you will find the cron logs in /var/log/cron.log
Sometimes it’s smart to backup data. :) For example database data. And it’s even smarter to save this backup data on a different server and not on the production machine. In my case I needed to save database dumps to a FTP server. To do this I used the tools curlftpfs and rsync.
sudo apt-get install curlftpfs rsync
I then created a little script which dumped me the database data via mysqldump to a directory called
To connect to the FTP server I used curlftpfs and mounted the FTP server to the directory
sudo curlftpfs -o allow_other ftp://USERNAME:PASSWORD@MYBACKUPSERVER.COM /mnt/ftp
After all my data is dumped using my mysqldump script I synchronize the data using rsync
rsync -avz --no-owner --no-group /dumps /mnt/ftp
I put my dump script into the cronjob lists and that’s it.
With this hook, you can include additional keywords (closes, fixes) in commit-comments which then allow to close, fix etc. tickets.
I installed it in the following way.
My Subversion directory is in this case
/svn and my Trac directory is
mkdir -p /usr/share/trac/contrib cd /usr/share/trac/contrib wget http://trac-hacks.org/export/7848/timingandestimationplugin/branches/trac0.11/scripts/trac-post-commit.py
Now the SVN settings
cd /svn/hooks vim post-commit
Add this content to the
post-commit file (via http://trac-hacks.org/wiki/TimingAndEstimationSVNPostCommitHook):
#!/bin/sh REPOS="$1" REV="$2" LOG=`svnlook log -r $REV $REPOS` AUTHOR=`svnlook author -r $REV $REPOS` TRAC_ENV='/trac' /usr/bin/python /usr/share/trac/contrib/trac-post-commit.py \ -p "$TRAC_ENV" \ -r "$REV" \ -u "$AUTHOR" \ -m "$LOG"
Change some privileges and owner-ships:
chown www-data:www-data post-commit chmod 755 post-commit
I just updated my Debian Etch installation to Lenny. I am using Trac on this system and got the following error, when I tried to access it:
ImportError: No module named trac.web.modpython_frontend
I struggled around a lot and the easy solution was to update the Trac system via
easy_install --upgrade Trac
I just tried to install some Python package with easy_install and got the following error:
Python.h: No such file or directory
Installing of the Python development headers solved the problem. I just executed:
sudo apt-get install python2.6-dev
To get the best version of the apt-package search for it using e.g.
sudo apt-cache search python
I wanted to update my Debian packages via
sudo apt-get update
and what I got was the following error:
GPG error: ftp://mirror.hetzner.de etch Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 9AA38DCD55BE303B
To fix this, I just had to add the keys via
gpg --keyserver pgpkeys.mit.edu --recv-key 9AA38DCD55BE303B gpg -a --export 9AA38DCD55BE302B | sudo apt-key add -
gpg --keyserver pgpkeys.mit.edu --recv-key 9AA38DCD55BE303B gpg -a --export 9AA38DCD55BE302B | apt-key add -
if you are already root.