Archive for the ‘Debian’ Category

If you get the error “/dev/zero: No space left on device” in the apache error.log on a OpenVZ virtual machine, then the shared memory size in the xcache.ini is too high or the xcache.mm_path is set wrong.

Edit the file /etc/php5/conf.d/xcache.ini

vi /etc/php5/conf.d/xcache.ini


and check the mm_path. On a OpenVZ virtual machine it should be set to “/tmp/xcache” as /dev/zero might not work correctly in a virtual machine:

xcache.mmap_path = "/tmp/xcache"


Then restart apache2:

/etc/init.d/apache2 restart


and check if the error has been resolved.

If the roor still occurs after some time, you will have to reduce the xcache.size.

Edite the xcache.ini file:

vi /etc/php5/conf.d/xcache.ini


and set xcache.size to e.g. 8 MB

xcache.size  =                8M


Then restart apache2:

/etc/init.d/apache2 restart

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Twitter
  • FriendFeed
  • MisterWong
  • StumbleUpon

If you use a mailserver wil very low ram (< 500 MB) and a slow CPU then it might be nescessary to disable the spam- and antivirus filter functions in ISPConfig 3 as amavisd and clamav might be too heavy for your server hardware. The steps to disable clamav and amavisd are:

Edit postfix main.cf file

vi /etc/postfix/main.cf


and comment out these lines by adding a “#” in front of them:

# content_filter = amavis:[127.0.0.1]:10024 # receive_override_options = no_address_mappings


Then restart postfix:

/etc/init.d/postfix restart


Now stop and disable the services. The following commands are for Debian and Ubuntu, the commands for other Linux distributions may vary

/etc/init.d/clamav-daemon stop /etc/init.d/clamav-freshclam stop /etc/init.d/amavis stop


update-rc.d -f clamav-daemon remove update-rc.d -f clamav-freshclam remove update-rc.d -f amavis remove


P The normal mail receive and send functions will still work after this modification. But please be aware that disabling amavisd and clamav will disable all spam- and antivirus filtering so that the spamfiltering options that can be configured in the ispconfig interface will have any effect on mail delivery and no spam and viruses will get filtered.

The changes in postfix main.cf will get overwitten by a ispconfig software update when you select to reconfigure services during upadte, so you should comment out the lines again after you install a ispconfig update.

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Twitter
  • FriendFeed
  • MisterWong
  • StumbleUpon

The pure-ftpd package that comes with Debian 5.0 (Lenny) does not start in a OpenVZ virtual machine as it is compiled with “capabilities”. This tutorial describes the steps to build a pure-ftpd Debian package with capabilities disabled:

Make a temporary directory

mkdir /usr/src/pure-ftpd cd /usr/src/pure-ftpd


Download the source package for pure-ftpd

apt-get source pure-ftpd apt-get build-dep pure-ftpd


Edit the rules file and add the switch “–without-capabilities”

cd pure-ftpd-1.0.21/debian nano rules


Change the line:

optflags=--with-everything --with-largefile --with-pam --with-privsep --with-tls


to (one Line!):

optflags=--with-everything --with-largefile --with-pam --with-privsep --with-tls --without-capabilities


Build the Debian (.deb) package

cd .. dpkg-buildpackage -uc -b


and install it

cd .. dpkg -i pure-ftpd-common_1.0.21-11.4_all.deb pure-ftpd-mysql_1.0.21-11.4_i386.deb /etc/init.d/pure-ftpd-mysql restart


To prevent that apt overwrites these manually compiled packages with the default packages from the Debian repositorys, execute these commands:

echo 'pure-ftpd-common hold' | dpkg --set-selections echo 'pure-ftpd-mysql hold' | dpkg --set-selections


This tutorial is based on the german tutorial from planet_fox

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Twitter
  • FriendFeed
  • MisterWong
  • StumbleUpon

How to update Spamassassin on ISPConfig 2

Thursday, May 27, 2010 posted by Till

The spamassassin installation on a ISPConfig 2 server is normally updated together with ISPConfig. Here are the steps iIf you want to update spamassassin manually without updating ISPConfig 2:

Download the latest Spamassassin sources and unpack the tar.gz file

cd /tmp wget http://ftp.fernuni-hagen.de/ftp-dir/pub/mirrors/\ www.apache.org/spamassassin/source/Mail-SpamAssassin-3.3.1.tar.gz tar xfz Mail-SpamAssassin-3.3.1.tar.gz


Configure, make and install spamassassin

cd Mail-SpamAssassin-3.3.1 perl Makefile.PL PREFIX=/home/admispconfig/ispconfig/tools/\ spamassassin/usr SYSCONFDIR=/home/admispconfig/ispconfig/\ tools/spamassassin/etc make make install


Cleanup

cd .. rm -f Mail-SpamAssassin-3.3.1.tar.gz rm -rf Mail-SpamAssassin-3.3.1

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Twitter
  • FriendFeed
  • MisterWong
  • StumbleUpon

How to enable port 587 (submission) in postfix

Monday, April 26, 2010 posted by Till

Some internet access providers have port 25 disabled in their routers to prevent spam. If you run your own mailserver in a datacenter, you might have to enable the submission port (587) in postfix to be able to send emails from your local email client to your own mailserver.

To enable port 587, edit the file /etc/postfix/master.cf

vi /etc/postfix/master.cf


and remove the # in front of the line:

#submission inet n      -       n       -       -       smtpd


so that it looks like this:

submission inet n      -       n       -       -       smtpd


and restart postfix:

/etc/init.d/postfix restart

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Twitter
  • FriendFeed
  • MisterWong
  • StumbleUpon

With Saidar you can display and view all your system statistics.

For an installation in Ubuntu or Debian you can install this with following command:

sudo apt-get install saidar


After having installed it, you can type in the command saidar:

saidar


Now you see in the following screen a complete view of your CPU, processes, load, memory, swap network I/O and disks I/O along with their free space.

The following options are supported:

-d    (Wait DELAY seconds between updates (default 3))

-v   (Prints the version number)

-h   (Display help and exits)

That’s it! Thanks to Planetfox for this tipp.

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Twitter
  • FriendFeed
  • MisterWong
  • StumbleUpon

As of today, all ClamAV 0.94 or older installs will stop working. The Debian project has not released updates for their current stable release (5.0) yet to solve this, but there is a workaround. The Debain volatile project provides newer clamav versions. The installation steps to install ClamAV 0.95.3 on Debian lenny are:

1) Add the debian volatile repository to the sources list:

echo "deb http://volatile.debian.org/debian-volatile lenny/volatile main contrib non-free" >> /etc/apt/sources.list


2) Update the sources and install the new clamav package:

apt-get update apt-get install clamav apt-get -u upgrade


3) If you use amavisd-new (e.g. if you use a ISPConfig 3 server) then restart amavisd:

/etc/init.d/amavis restart

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Twitter
  • FriendFeed
  • MisterWong
  • StumbleUpon

Have you ever searched where the virtual host of a website is defined in the apache config files? There is a handy option of the apache2ctl script which might help then. When you run the command:

apache2ctl -S


on the shell, you will get a list of all virtual hosts and default servers incl. the line number where it is defined. Example:

~# apache2ctl -S VirtualHost configuration: wildcard NameVirtualHosts and _default_ servers: *:8080                 is a NameVirtualHost default server ispconfig.local (/etc/apache2/sites-enabled/000-ispconfig.vhost:10) port 8080 namevhost ispconfig.local (/etc/apache2/sites-enabled/000-ispconfig.vhost:10) *:8081                 is a NameVirtualHost default server ispconfig.local (/etc/apache2/sites-enabled/000-apps.vhost:10) port 8081 namevhost ispconfig.local (/etc/apache2/sites-enabled/000-apps.vhost:10) *:80                   is a NameVirtualHost default server ispconfig.local (/etc/apache2/sites-enabled/000-default:1) port 80 namevhost ispconfig.local (/etc/apache2/sites-enabled/000-default:1) port 80 namevhost example.com (/etc/apache2/sites-enabled/example.com.vhost:7) Syntax OK


Thanks to Planetfox for this tipp.

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Twitter
  • FriendFeed
  • MisterWong
  • StumbleUpon

How to convert RPM software packages to Debian (.deb)

Thursday, March 4, 2010 posted by Till

Maybe you had this problem already: you use Debian or Ubuntu Linux and a software package that you like to install is only available in RPM format. The solution is a handy tool called alien, which converts .rpm files to .deb.  Installing alien:


apt-get install alien


Converting a rpm package to debian format:


alien --to-deb /tmp/mysoftwarefile.rpm


Conversions from .deb to rpm are also possible:


alien --to-rpm /tmp/mysoftwarefile.deb

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Twitter
  • FriendFeed
  • MisterWong
  • StumbleUpon

How to Update ISPConfig 3

Friday, February 19, 2010 posted by Till

The ISPConfig update script is a easy way to update a ISPConfig 3 installation. If you want to backup the installation before, take a look at the instructions at the end of the article.

To update ISPConfig 3, login as root user on the shell of your server and run the command:

ispconfig_update.sh


>> Update

Please choose the update method. For production systems select 'stable'. The update from svn is only for development systems and may break your current setup.


Select update method (stable,svn) [stable]:


You should always select “stable” on a production system. The “svn” version is only suitable for ISPConfig 3 development.

The updater will then check the version of your system, download the latest update and starts the update process. In the next step, enter the mysql root password:

This application will update ISPConfig 3 on your server. MySQL root password []:


Then you were asked if the services shall be reconfigured:

Reconfigure Services? (yes,no) [yes]:


You should choose “yes” here, only if you modified your system configuration manually, it might be better to choose no. But in this case, new features in ISPConfig might not work or functions might stop working until you adjusted the config files manually. So its always a good choice to select ‘yes’ here. In the next step, select the ispconfig port:

ISPConfig Port [8080]:


Port 8080 is the default, if you have not changed it, press enter. Otherwise enter the port number and then press enter. As the last step, you wre asked if the crontab shall get reconfigured, you can select yes here by just pressing return.

Reconfigure Crontab? (yes,no) [yes]:


The ISPConfig updater will then update the ispconfig files and restart services, if the configuration has been changed.

Backup before updates

Before you update a software, it is always a good idea to backup all relevant data. This enables you to restore the software version that you had before in case of an error. The steps to create a backup of the ispconfig software and settings are:

Create a backup folder:

mkdir /home/backup chmod 700 /home/backup cd /home/backup


Backup the database

mysqldump -u root -p dbispconfig > dbispconfig.sql


Backup the ISPConfig software

tar pcfz ispconfig_software.tar.gz /usr/local/ispconfig


Backup the configuration files in /etc

tar pcfz etc.tar.gz /etc


This backup does not include the emails and website data.

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Twitter
  • FriendFeed
  • MisterWong
  • StumbleUpon