Sep 14 2014

Install and chroot bind9 on debian 7.6

by admin

Installation

Start with installing bind9.

apt-get install bind9

Stop bind and prepare to chroot it.

/etc/init.d/bind9 stop

Edit /etc/default/bind9

# run resolvconf?
RESOLVCONF=no

# startup options for the server
OPTIONS="-u bind -t /var/lib/named"

Create the new directories under /var/lib.
Move the bind-files and creating symbolic-links to them.


mkdir -p /etc/bind/zones
mkdir -p /var/lib/named/etc
mkdir /var/lib/named/dev
mkdir -p /var/lib/named/var/cache/bind
mkdir -p /var/lib/named/var/run/bind/run
mv /etc/bind /var/lib/named/etc
ln -s /var/lib/named/etc/bind /etc/bind

Make null and random devices and set permissions

mknod /var/lib/named/dev/null c 1 3
mknod /var/lib/named/dev/random c 1 8
chmod 666 /var/lib/named/dev/null /var/lib/named/dev/random
chown -R bind:bind /var/lib/named/var/*
chown -R bind:bind /var/lib/named/etc/bind

Make bind able to report to syslog.
Create and edit /etc/rsyslog.d/bind-chroot.conf


$AddUnixListenSocket /var/lib/named/dev/log

Restart syslog

/etc/init.d/rsyslog restart

Start bind

/etc/init.d/bind9 start


Aug 15 2014

Debian 7.6

by admin

Keep getting mail and error logs thats say:

PHP Deprecated: Comments starting with ‘#’ are deprecated in /etc/php5/cli/conf.d/ming.ini on line 1 in Unknown on line 0

Solution:

Edit the file /etc/php5/apache2/conf.d/ming.ini
remove the first line: “#” so its only contains: “extension=ming.so” and nothing more.


May 31 2013

apt-get update – release file expired

by Zylr

I was goin to update the server today when i walked up on this problem:

E: Release file expired, ignoring http://debian.lth.se/debian/dists/squeeze-updates/Release (invalid since 3d 1h 22min 1s)

Howto fix:

You can use this command to pass the errors:
apt-get -o Acquire::Check-Valid-Until=false update

or remove the complain source from: /etc/apt/sources.list


Feb 3 2011

Perl problems – I guess

by Zylr

After I did a dist-upgrade last-night, I’ve had some big problems with the server.

I solved this problem by : export LC_ALL=en_US.UTF-8

You can read down below how the problems looked:

snorre:~# perl
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = “en_US”
are supported and installed on your system.
perl: warning: Falling back to the standard locale (“C”).

snorre:~# locale -a
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory

snorre:~# dpkg-reconfigure locales
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = “en_US”
are supported and installed on your system.
perl: warning: Falling back to the standard locale (“C”).
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory

snorre:~# /etc/init.d/proftpd start
Starting ftp server: proftpd – unable to set LC_ALL: No such file or directory
– Fatal: unable to load module ‘mod_lang.c’: Operation not permitted
failed!


Jan 4 2011

apt/sources.list

by Zylr

Source list for Debian’s Lenny release…

deb http://debian.lth.se/debian/ lenny main contrib non-free
deb-src http://debian.lth.se/debian/ lenny main contrib non-free

deb http://security.debian.org/ lenny/updates main contrib non-free
deb-src http://security.debian.org/ lenny/updates main contrib non-free

deb http://volatile.debian.org/debian-volatile lenny/volatile main contrib non-free
deb-src http://volatile.debian.org/debian-volatile lenny/volatile main contrib non-free