»
S
I
D
E
B
A
R
«
Kernel Upgrade For Debian >= Etch
Mar 4th, 2010 by Evan

Upgrading the kernel to 2.6.31(couldn get 2.6.33 to work at all)  on Etch, I stumbled over this:

cc -m32 -Wall -Wmissing-declarations -Wmissing-prototypes -O3 -I../../include -I../../arch/x86/include -U_FORTIFY_SOURCE lguest.c -o lguest
lguest.c:21:25: error: sys/eventfd.h: No such file or directory
lguest.c: In function ‘create_thread’:
lguest.c:1021: warning: implicit declaration of function ‘eventfd’
make: *** [lguest] Error 1

This is apparenty due to the old libc-dev package that Lenny comes with. Since libc isn’t exactly a good candidate for a selective upgrade I helped myself with simply editing Documentation/lguest/Makefile and changing:

all: lguest

to

all:

OR

So lguest wont be build anymore. After that make-kpkg binary-arch worked as usual.

The tip below didn’t work for me but is another option:

“Below “Virtualization” unselect “Linux hypervisor example code” or if
you need lguest you can also fix the compilation error by removing
“#include <sys /eventfd.h>” (line 21) from lguest.c.”

via 2.6.31 for Debian 5/Lenny | Nagilum’s Cookie Jar.

Upgrading Iptables to 1.4 on Debian Etch
Feb 3rd, 2010 by Evan

I required the module connlimit to limit the number of connections on one of our Debian firewall boxes. First download the iptables-1.4.2.tar.bz2version from Netfilter.

Unpack the tarball

tar -xjvf iptables-1.4.2.tar.bz2

Change directory

cd iptables-1.4.2

configure iptables

./configure –prefix=/

if you just use ./configure then everything will be installed to /usr/local

make and install iptables

make install

After that you can check your new iptables version

iptables -v

The only problem i encountered is apps which need iptables as dependency beacuse aptitude will try and install the old version of iptables again as a dependency. Either you install those apps from source as well. Or you can install two versions of iptables one under /usr/local and one under /sbin which can be confusing.

via Gentoo Blog » Upgrading Iptables to 1.4 on Debian Etch.

How To Compile A Kernel – Debian Etch | HowtoForge – Linux Howtos and Tutorials
Feb 3rd, 2010 by Evan

How To Compile A Kernel – Debian Etch | HowtoForge – Linux Howtos and Tutorials.

cd /usr/src
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.21.3.tar.bz2
tar xjf linux-2.6.21.3.tar.bz2
ln -s linux-2.6.21.3 linux
cd /usr/src/linux
make clean && make mrproper
cp /boot/config-`uname -r` ./.config
make menuconfig.

Go to Load an Alternate Configuration File and choose .config

make-kpkg clean
fakeroot make-kpkg –initrd –append-to-version=-custom kernel_image kernel_headers
dpkg -i linux-image-2.6.21.3-custom_2.6.21.3-custom-10.00.Custom_i386.deb
dpkg -i linux-headers-2.6.21.3-custom_2.6.21.3-custom-10.00.Custom_i386.deb
shutdown -r now
uname -r

Gentoo Blog » iptables
Jan 7th, 2010 by Evan

Upgrading Iptables to 1.4 on Debian Etch

Simon | January 28, 2009

I required the module connlimit to limit the number of connections on one of our Debian firewall boxes. After a while of try and error i found out that the iptables version shipped with debian 1.3.6 doesn’t support the new module format used in 2.6.23+ kernels. So i looked for a backported version of iptables which i did not find :( So i thought i would try and install iptables from source. First download the latest iptables version from Netfilter.

Unpack the tarball

tar -xjvf iptables-1.4.2.tar.bz2

Change directory

cd iptables-1.4.2

configure iptables

./configure –prefix=/usr libdir=/lib bindir=/sbin mandir=/usr/share/man

if you just use ./configure then everything will be installed to /usr/local

make and install iptables

make prefix=/usr libdir=/lib bindir=/sbin mandir=/usr/share/man install

I don’t know why but a few binaries landed in /usr/sbin instead of /sbin so i copied them to the desired location

After that you can check your new iptables version

iptables -v

The only problem i encountered is apps which need iptables as dependency beacuse aptitude will try and install the old version of iptables again as a dependency. Either you install those apps from source as well. Or you can install two versions of iptables one under /usr/local and one under /sbin which can be confusing.

via Gentoo Blog » iptables.

Linux Kernel 2.6.24 with iptables 1.4.0, ipp2p -0.8.2 and L7-filter 2.17
Jul 29th, 2009 by Evan

Linux Kernel 2.6.24 with iptables 1.4.0, ipp2p -0.8.2 and L7-filter 2.17.

The described process below works for Kernel 2.6.24 and has been tested on Debian Etch 4.0

Please note the the ipp2p project is no longer supported – Added 25/11/2009

Read the rest of this entry »

Debian Cheatsheet
Jul 6th, 2009 by Evan

Use full for VMWare install:
apt-get install linux-headers-`uname -r` libx11-6 libx11-dev xspecs libxtst6 psmisc build-essential

Fix GPG Errors:

NEW_KEY=XXXXXXXXXXXXXX
gpg –keyserver wwwkeys.eu.pgp.net –recv-keys $NEW_KEY
apt-key add /root/.gnupg/pubring.gpg
apt-get update

How to Install Sun Java on Debian
Jun 2nd, 2009 by Evan

Quick Guide

If you are fairly confident and don’t want to read the whole document the following summary should probably be enough to get java working on your system. Lines 1 and 3 are preformed as root line 2 as a standard user.

apt-get install java-package
fakeroot make-jpkg <java-binary-package-name>.bin
dpkg -i <created-package-name>.deb

 Read the rest of this entry »
Various Tricks
Dec 13th, 2008 by Evan
dpkg-reconfigure -phigh xserver-xorg -> reconfigures the xorg server

http://www.realvnc.com/products/free/4.1/x0.html

http://wiki.debian.org/FluxBox

Remove files in a directory when rm won't work:
find /home/$u/tmp/ -name '*.wrk' -print0 | xargs -0 rm -f
find . -name 'spam-*' -print0 | xargs -0 rm
find /some/directory -name ‘*.wrk’ -print0 | xargs -n1000 -0 rm -f
ls | xargs -n1000 -0 rm -f
Cacti and Debian
Jul 22nd, 2008 by Evan

The patch can fix the issue

sudo pico /usr/share/cacti/site/include/config.php

replace what is under

/* Sanity Check on “Corrupt” PHP_SELF */

with

if ((!is_file($_SERVER["PHP_SELF"])) && (!is_file($config["base_path"] . ‘/’ . $_SERVER["PHP_SELF"]))) {
if (!is_file($_SERVER["DOCUMENT_ROOT"] . $_SERVER["PHP_SELF"])) {
if (!((is_file($_SERVER["SCRIPT_FILENAME"])) && (substr_count($_SERVER["SCRIPT_FILENAME"], $_SERVER["PHP_SELF"])))) {
if (!((is_file($_SERVER["SCRIPT_FILENAME"])))) {
echo “\nInvalid PHP_SELF Path\n”;
exit;
}

»  Substance: WordPress   »  Style: Ahren Ahimsa