Tuesday 27 April 2010

clearos5.1 migration, cont

problem: continuing migration

what im not doing: giving in


now that i had a bootable system i selected all required packages from the web interface. after a while, all the expected options were available and we were getting somewhere! while scanning through all the new options i found that the mail-antispam page was blank... a bit of googling returned that this is a bit of a bug (undocumented) that arises if the package is installed post-os-install. seems that

Postgrey.class.php

is missing. found the following fix

wget http://download1.clearfoundation.com/clearos/enterprise/5.1/System/RPMS/app-greylisting-5.1-20.i386.rpm

rpm -Uvh app-greylisting-5.1-20.i386.rpm

but this is where i met an old problem. for some reason our router resolves some internet addresses to

1.0.0.0

and i have had limited success when removing ipv6 on the host. as a deb head, this is done by appending

install ipv6 /bin/true (always returns 0)

to

/etc/modprobe.conf

then updating / adding

NETWORKING_IPV6=no
IPV6INIT=no

to

/etc/sysconfig/network

then

service network restart
rmmod ipv6
(didnt work, had to reboot)

but, alas... problem remained. so, changed the dns address in

/etc/resolv
service network restart

to an open dns address, and all went well. mail-antispam was all good. however, i recalled with clarkconnect4.2 when the host dns address didnt match the auto-supplied router dns address for pptpd (still stuck on wins, no local dns), although remote connection was fine, it caused an issue with routing and the remote lan wasnt available from the remote host. so, some remote testing was next.

remote tests proved fine, must have been an issue with clarkconnect4.2!

now to setting the server up for production...

Sunday 25 April 2010

clearos5.1 migration

problem: got to migrate from clarkconnect4.2 to clearos5.1

what im not doing: considering any other server / gateway os just yet


so, during the above adventure, i have came across a few problems. the first was after initial setup and testing (very basic install, add only required packages) i tried to change the hostname via the web interface. this caused some sort of lock-up and the machine had to be hard rebooted. the boot sequence started to crawl around loading of the hal daemon and then slapd, so i booted into rescue mode via the cd, chrooted the system partition and had a look around. first stop was to check all network script and config files as i wasnt sure the hostname change was good. so, first checked

/etc/hosts

and all looked good. then checked

/etc/sysconfig/network and /etc/sysconfig/networking-scripts/ifcfg-eth0

and and found a hostname conflict in /etc/sysconfig/network. i also checked

/etc/resolv

to ensure that dns settings were good. they were, but more on that later...

rebooted and started up no probs! first hurdle!

Sunday 18 April 2010

postfix deferred email requeue

problem: clarkconnect4.2 deferring all emails because clamav0.9x now unsupported

what im not doing: losing them


first, though i would just be able to uninstall cc-clamav (and related) then reinstall them. so

apt-get remove cc-clamav

then

apt-get install cc-clamav

without joy! no cc-clamav... so

apt-cache search *clam*

nothing... found support for 4.2 ended nov2009...

as im still on holiday will rely on clients antivirus until im 'back at work', but still 171 emails deferred due to clamav error. looked into postfix commands and found

postsuper

so to requeue

postsuper -r ALL (uppercase for security)

and get ready to migrate server

Tuesday 6 April 2010

mysql memory leak - not the database, ME!

problem: keep forgetting this for some reason

what im not doing: googling it and rattling through 4-5 site before i find 'the one'


so, here it is... find auto-increment value of database

SHOW TABLE STATUS LIKE 'table_name';

and, reset the value

ALTER TABLE tablename AUTO_INCREMENT = value;

and if i have to insert somewhere in the middle

SET insert_id = value;
then run insert query

meaning to log this for ages!