Posts Tagged ‘Debian’

How to find the Debian version

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.

(more…)

Get sizes of directories in Debian

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

Completely remove MySQL server including all the data from Debian

I just tried to uninstall MySQL on Debian via

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.

Note:

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.

Completely remove MySQL server and MySQL client in Debian

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

Running Apache Archiva on Debian Linux 64bit causes errors

I had some problems running Apache Archiva – the Maven repository management tool – on my Debian Linux 64bit system. The error I got when starting the standalone version via

(more…)

SugarCRM Inbound E-mail problem

I’ve just got the following error message while accessing the Inbound E-mail feature in SugarCRM:

Inbound Email cannot function without the IMAP c-client libraries enabled/compiled with the PHP module

To fix this error on my Debian server I’ve had to install the PHP IMAP module via

apt-get install php5-imap

Enable crontab logging in Debian Linux

By default the logging for the cron demon is not active in Debian Linux. To activate it, please open the file /etc/rsyslog.conf via

vi /etc/rsyslog.conf

and uncomment the line

# cron.*                          /var/log/cron.log

After that you need to restart rsyslog via

/etc/init.d/rsyslog restart

and you will find the cron logs in /var/log/cron.log

Backup data on a FTP server using rsync and curlftpfs

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 /dumps

To connect to the FTP server I used curlftpfs and mounted the FTP server to the directory /mnt/ftp via

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.

Installing Post-Commit-Hook for Subversion and Trac 0.11

If you have a Subversion running including a Trac connection, it’s nice to have the post-commit-hook running, too.

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 /trac.

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

ImportError: No module named trac.web.modpython_frontend

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

Python.h: No such file or directory

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

The following signatures couldn’t be verified because the public key is not available

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 -

or

gpg --keyserver pgpkeys.mit.edu --recv-key 9AA38DCD55BE303B
gpg -a --export 9AA38DCD55BE302B | apt-key add -

if you are already root.

Next Page »" class="small button">older posts