Tag Archives: Linux

Debian and build a package from source

I want to build pure-ftpd from source becurs my debian server dosent support capabilities.
So first i download the package:
host:/usr/local/src/# cd /usr/local/src
host:/usr/local/src/# apt-get -b source packagename

Then i change the debian/rules files in the package, so that pure-ftpd not support capabilities. (–without-capabilities)

host:/usr/local/src/# cd pure-ftpd-1.0.21/debian

host:/usr/local/src/#nano rules

Then i compile pure-ftpd.

host:/usr/local/src/# cd ..

host:/usr/local/src/# dpkg-buildpackage -rfakeroot -uc -b

Then I install the pure-ftpd-common and pure-ftpd-mysql

host:/usr/local/src/# cd ..

host:/usr/local/src/# dpkg -i pure-ftpd-common_1.0.21-11.1_all.deb

host:/usr/local/src/# dpkg -i pure-ftpd-mysql_1.0.21-11.1_i386.deb

Linux RAID og nye diske

Nå man vil komme en ny disk i sit raid og ens bootloader er grub, skal man huske efter man har tilføjet disken til raidet, at tilføje den nye disk til grup. (Installere grub på den), ellers kan man ikke boote sit system, hvis man står med en defekt disk lige pludseligt, dette gøres ved at man skriver:

Husk evt. at redigere /bot/grup/device.map, så den passer til dit nye setup.

#grub –device-map=/boot/grub/device.map

>> root (hd0,0)
>> setup (hd0)
>> root (hd1,0)
>> setup (hd1)
>> quit

#update-grub

Debian Unstabe NO_PUBKEY

When you run apt-get in Debian Unstable, you can get a error like this:

W: GPG error: ftp://ftp.se.debian.org unstable Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 010908312D230C5F
W: You may want to run apt-get update to correct these problems

It can be solved, this way:
gpg –keyserver wwwkeys.eu.pgp.net –recv-keys 010908312D230C5F
gpg –armor –export 010908312D230C5F | sudo apt-key add –
apt-get update

Byt keyid “010908312D230C5F”, med den nøgle du mangler.

Mini howto to install PHP5 on Debian from source

Mini howto to install PHP5 on Debian from source
Installation of PHP5, on Debian Sarge 3.1

apt-get install \
libxml2 \
libc-client-dev \
libgmp3-dev \
libgmp3-doc \
libmpfr-dev \
libpng2-dev \
libpng2 \
libjpeg62-dev \
libgdbmg1 \
libgdbm-dev \
libc6-dev \
libbz2-dev \
bzip2 \
zlib1g-dev \
zlib1g \
apache-dev \
g++ \
g++-2.95 \
gcc-2.95-doc \
stl-manual \
libc6-dev \
libstdc++2.10-dev \
make \
libdb1 \
libxml2-dev \
flex

‘./configure’ ‘–with-bz2’ ‘–with-gd’ ‘–with-mysql’ ‘–with-apxs=/usr/bin/apxs’ ‘–with-mod_charset’ ‘–enable-force-cgi-redirect’ ‘–enable-discard-path’ ‘–enable-safe-mode’ ‘–enable-bcmath’ ‘–enable-calendar’ ‘–with-gdbm’ ‘–enable-dbase’ ‘–enable-ftp’ ‘–enable-gd-imgstrttf’ ‘–with-gmp’ ‘–with-xml=shared’ ‘–enable-trans-sid’ ‘–enable-shmop’ ‘–enable-sockets’ ‘–with-regex=php’ ‘–enable-sysvsem’ ‘–enable-sysvshm’ ‘–enable-yp’ ‘–enable-memory-limit’ ‘–enable-shared’ ‘–with-zlib’ ‘–with-imap=usr/include/c-client’ ‘–prefix=/usr/local/php5’ ‘–with-jpeg-dir=/usr/lib/’ ‘–with-kerberos’ ‘–with-imap-ssl’

make && make install

Qmail: Vpopmail & SSL

Mini howto’s about putting ssl on Vpopmail.
My Qmail is running after this guide:
http://www.pipeline.com.au/staff/mbowe/isp/webmail-server.htm

apt-get install stunnel4
mkdir -p /var/log/qmail/pop3d-ssl/
chown -R qmaill.nofiles /var/log/qmail/pop3d-ssl/

mkdir -p /var/qmail/supervise/qmail-pop3d-ssl
mkdir -p /var/qmail/supervise/qmail-pop3d-ssl/log

/var/qmail/supervise/qmail-pop3-ssl/run

#!/bin/sh
exec /usr/local/bin/softlimit -m 4000000
/usr/local/bin/tcpserver -H -R -v -l annsofie.dumdidum.dk -c100 0 995
/usr/sbin/stunnel4 /var/qmail/control/pop3s.conf 2>&1

/var/qmail/supervise/qmail-pop3d-ssl/log/run

#!/bin/sh
# Keep 30 logs of max 10Mb each
# They will get rotated when they reach 10Mb in size,
# or at midnight when our crontab script fires (whichever event comes 1st)
exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t s10000000 n30 /var/log/qmail/pop3d-ssl

/var/qmail/control/pop3s.conf

debug = 1
output = /var/log/qmail/stunnel.log
cert = /var/qmail/control/servercert.pem
exec = /var/qmail/bin/qmail-popup
execargs = /var/qmail/bin/qmail-popup annsofie.dumdidum.dk /home/vpopmail/bin/vchkpw /var/qmail/bin/qmail-pop3d Maildir

cd /var/qmail/control/
openssl req -new -x509 -nodes -out servercert.pem -days 3650 -keyout servercert.pem

ln -s /var/qmail/supervise/qmail-pop3d-ssl/ /service/
svc -u /service//qmail-pop3d-ssl