修正 bind 出現 max open file (1024) 的錯誤

While I upgrading my gentoo box, the BIND had been recomplied. After I re-steup my configurations there exists an error on the log.

max open files (1024) is smaller than max sockets (4096)

This is a bug introduced from kernel and I found a solution from Bombcar Heavy Blog.

1
2
# cd /etc/security/limits.d
# vim named.conf

And fillout the settings:

named        soft    nofile        4096

Then modify the named.conf settings:

# vim /etc/bind/named.conf

In the Options section, filling it:

files 4096;

Finally, restart the named and the error disappear. 😀

升級 gentoo 的 perl 到 5.12.2 後 openwebmail 不能使用的問題

After upgrading my gentoo box’s perl to 5.12.2, the openwebmail dead. The basic result is in the 5.12 version there is no suidperl program.

To solve this, after reading related materiel, the step listing:

1
2
3
# cd {http root}/cgi-bin/openwebmail
# perl misc/tools/wrapsuid/wrapsuid.pl {http root}/cgi-bin/openwebmail
# grep "suidperl" ./.*.* | awk -F ':#' '{print $1}' | xargs sed -i 's/suidperl/perl/'

The step 2 will first change all the .pl files into hidden file and then make a wrapper written in C language. And the step 3 is for changing all the suidperl corresponding interpreter line to perl.

But after this I encounter another problem that there shown I must setuid to root in webpage while using it. The solution is to change owner to root again because the wrapper program broken it.

# chmod 4555 *.pl

And it works! All the material is from Openwebmail.

升級 gentoo 的 spamd

After upgrading the spamassassin of my gentoo box to 3.3.1-r3 I encounter two problems while starting it.

First, Uninitialized value $opt{“syslog-socket”} in lc at spamd

The solution is:

– my $log_socket = lc($opt{‘syslog-socket’});
+my $log_socket = $opt{‘syslog-socket’};

if (!defined $log_socket || $log_socket eq ”) {
$log_socket = am_running_on_windows() ? ‘none’ : ‘unix’;
+} else {
+  $log_socket = lc $log_socket;
}

From Gentoo Forum where it is filed as a bug and may be fix recently.

Second, child process exited or timed out without signaling production of a PID file: exit 255

Solution is by running:

# sa-update -D

From Virtualmin. And everything is fine while restarting.

升級 gentoo 的 phpMyAdmin 到 3.5 以上

Last time when I upgrade my phpMyaAdmin packages to version 3.5, I encounter a problem that all the table links for choose are gone. I’ve tried to reconfigure the config file for pMA and re-install the packages, but no use. Finally, I’ve REMOVE the packages directories, re-emerge it and make a new config file, and it works fine. The steps:

1. Remove phpMyAdmin

# emerge -C phpmyadmin

2. Remove the directories

# rm -rf {install directory for phpmyadmin}

3. Install the packages

# emerge phpmyadmin

4. Follow the elog’s instructions to configure a new config file, and enjoy it. 😀

升級 gentoo 的 mysql 5.0 到 5.1

安裝完成後:

1. Update config file to remove useless parameters

# etc-update

2. Restart service

# /etc/init.d/mysql restart

3. Upgrade mysql tables

# mysql_upgrade -u root -p

4. Restart again

# /etc/init.d/mysql restart

5. Other: the libraries linked w/ mysql 5.0 must upgrade, so I ran revdep-rebuild for possible problems.