升級 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.

mplayer/mencoder

這邊拿來筆記轉檔用的指令好了:

1. amr -> wav

因為我不會用 mencoder, 所以找到也可以用 mplayer 做

 mplayer {filen} -ao pcm:file={outputfile}

2. 等找到繼續寫

詭異的 Apache HTTP response 206

某計劃需要在外網建置 staging, 於是必須用 vpn 連到內網做 mount 的動作

但是不曉得為什麼會一直出現 206 partial content

根據網路上的資料顯示, 若是出現 206/304 且只有 <256k 的資料才能顯示時

就要把下面兩個設定的註解拿掉:

EnableMMAP off

EnableSendfile off

只是莫名其妙的是, 上次同樣這樣配置就不需要解開阿…連OS跟設定都完全一樣, 但這次就要…

什麼鬼…