locate Stringy.pm
/k12/local/lib/perl5/site_perl/5.8.8/IO/Stringy.pm
perl -e ‘use IO::Stringy;’
應該要沒有錯誤
perl -e ‘print join("\n", @INC)’
就可以印出perl 的 library path
最後如果還搞不定,就
cpan
force install 那個沒有的module
如:
force install Compress::Zlib
locate Stringy.pm
/k12/local/lib/perl5/site_perl/5.8.8/IO/Stringy.pm
perl -e ‘use IO::Stringy;’
應該要沒有錯誤
perl -e ‘print join("\n", @INC)’
就可以印出perl 的 library path
最後如果還搞不定,就
cpan
force install 那個沒有的module
如:
force install Compress::Zlib
很不幸的,我們使用CentOS 5.5,那個 php 版本太低,不支援 mail.add_x_header
因此我找個半死都找不到罪魁禍首,還好底下這篇提供一個方法讓我們可以紀錄到底誰是被利用的對象:
http://www.howtoforge.com/how-to-log-emails-sent-with-phps-mail-function-to-detect-form-spam
參考: 這個網頁
su postgres
cd
cd backups/
pg_dumpall –globals-only > globals.sql
psql -d postgres
select * from pg_database 看看有那些資料庫
postgresql template0 template1 都是系統資料庫不用處理,其他的都
pg_dump --create --oids --format=c --verbose --file dbx dbx 這樣dump出來,如果編碼是 MUL_INTERNAL的,要
pg_dump -E big5 --create --oids --format=c --verbose --file dbx dbx
exit
/etc/init.d/postgresql stop
cd ~postgres
mv data/ data.old
yum remove postgresql postgresql-server postgresql-devel
yum install postgresql84 postgresql84-server postgresql84-devel
//信望愛站要處理一下soft link
/etc/init.d/postgresql initdb
chkconfig --level 35 postgresql on
cd ~postgres/data
cp ../data.old/pg_hba.conf .
/etc/init.d/postgresql start
su - postgres cd backups
psql -f globals.sql
把剛剛備份出來的 db都
pg_restore --create -d postgres dbX
restore 進來
1, wget http://software.virtualmin.com/gpl/centos/5/SRPMS/fedora-usermgmt-0.9-1.el5.src.rpm and build the source rpm
rpm -ivh /usr/src/redhat/RPMS/noarch/fedora-usermgmt-0.9-1.noarch.rpm /usr/src/redhat/RPMS/noarch/fedora-usermgmt-core-0.9-1.noarch.rpm /usr/src/redhat/RPMS/noarch/fedora-usermgmt-default-fedora-setup-0.9-1.noarch.rpm /usr/src/redhat/RPMS/noarch/fedora-usermgmt-shadow-utils-0.9-1.noarch.rpm /usr/src/redhat/RPMS/noarch/fedora-usermgmt-devel-0.9-1.noarch.rpm
2, yum -y install sendmail-devel geoip-* –enablerepo dag
3, wget ftp://ftp.muug.mb.ca/mirror/fedora/linux/development/rawhide/source/SRPMS/milter-greylist-4.2.4-1400.fc14.src.rpm
4, rpm -ivh milter-greylist-4.2.3-1400.fc14.src.rpm –nomd5
vim /usr/src/redhat/SPECS/milter-greylist.spec
define the following variable
%global username smmsp
%global vardir %_var/%name
%global dbdir %vardir
%global rundir %_var/%name
%global __chkconfig /sbin/chkconfig
delete
Requires: init(%name)
delete
–enable-dnsrbl \
delete the following (we want /var/milter-greylist/ path)
for i in `find -type f`; do
sed -e ‘s!/var/milter-greylist/milter-greylist.sock!%rundir/milter-greylist.sock!g;
s!/var/milter-greylist/greylist.db!%dbdir/greylist.db!g;
s!/var/milter-greylist/milter-greylist.pid!%_var/run/milter-greylist.pid!g;
‘ "$i" >"$i.tmp"
cmp -s "$i" "$i.tmp" || cat "$i.tmp" >"$i"
rm -f "$i".tmp
done
change this line
touch $RPM_BUILD_ROOT%_var/run/milter-greylist.pid
to
touch $RPM_BUILD_ROOT%rundir/milter-greylist.pid
change this line
touch $RPM_BUILD_ROOT%_var/run/milter-greylist.sock
to
touch $RPM_BUILD_ROOT%rundir/milter-greylist.sock
change this line
%ghost %_var/run/milter-greylist.pid
to
%ghost %rundir/run/milter-greylist.pid
%ghost %rundir/milter-greylist.sock
%dir /usr/src/debug/%name-4.2.3/*
/usr/lib/debug/usr/sbin/%name.debug
%dir %vardir/%name.sock
%vardir/%name.pid
rpmbuild -ba /usr/src/redhat/SPECS/milter-greylist.spec
rpm -Uvh /usr/src/redhat/RPMS/noarch/milter-greylist-4.2.3-1400.noarch.rpm
edit /etc/mail/greylist.conf, adding the following
geoipdb "/usr/share/GeoIP/GeoIP.dat"
spamdsock inet "127.0.0.1:783"
dacl blacklist spamd > 7 msg "Your message is considered spam."
dacl greylist spamd > 6 delay 6h autowhite 3h msg "greylist in action (6) , please come back later. call 886-921361388 for help!"
dacl greylist spamd > 5 delay 1h autowhite 40h msg "greylist in action (5), please come back later. call 886-921361388 for help!"
dacl greylist spamd > 4 delay 30m autowhite 110h msg "greylist in action (4), please come back later. call 886-921361388 for help!"
dacl greylist spamd > 3 delay 10m autowhite 180h msg "greylist in action (3), please come back later. call 886-921361388 for help!"
racl whitelist default
racl greylist default delay 5m autowhite 7d msg "greylist in action (4), please come back later. call 886-921361388 for help!"
now spamassassin must be starting
edit /etc/sysconfig/spamassassin
chkconfig –level 35 spamassassin on
service spamassassin start
service milter-greylist restart
趕快紀錄下搞定的方法:
rpm -Uvh http://elrepo.org/linux/elrepo/el5/i386/RPMS/elrepo-release-0.1-1.el5.elrepo.noarch.rpm
vi /etc/yum.repos.d/elrepo.repo
enabled=1 把他enable起來
看kernel版本
yum install kmod-it87-PAE
或
yum install kmod-it87
都 yes 以後,就可以執行
/usr/sbin/sensors-detect
偵測 sensors 。偵測完雖然有錯,但是只要
/etc/init.d/lm_sensors restart
即可用
/usr/bin/sensors 查到資料
裝完MailScanner之後,發現一直發生yum update衝突,在網路上找到
有效解決問題。
指令 大概是,先移除套件
rpm -e perl-bignum perl-Math-BigRat perl-Math-BigInt perl-IO perl-File-Temp perl-Sys-Syslog perl-Test-Harness perl-Test-Simple
自己補裝一套
perl -MCPAN -e shell
設定之後
install bignum
install IO
install File::Temp
force install Scalar::Util
install Sys::Syslog
install Test::Harness
install Test::Simple
exit
即可
紀錄一下,免得忘記:
搞了半天,是 php 除錯信號紀錄太多的問題,只要把除錯信息拿掉一些,系統就輕鬆了。
/etc/php.ini 中
把
error_reporting = E_ALL
改成
error_reporting = E_ALL & ~E_NOTICE
立刻改善,差點就去買新機器了。
另外,如果還是需要監測太大的負載,底下這個 script 可以用:
系統 loading 大於 $thresh (此處是 50) 的負荷就會自動重新啟動 httpd
#!/usr/bin/php -q
<?php
$load=(double) join(”,file(‘/proc/loadavg’));
$thresh=50;
if ($load >$thresh)
exec(‘/etc/init.d/httpd restart’);
?>
修改 /etc/MailScanner/rules/spam.whitelist.rules
加入
From: 110.207.31. yes
From: 49.120.110. yes
From: Gfooo@xxx.com.tw yes
這樣的的文字就可以,yes是白名單,no是黑名單
參考 http://www.twbsd.org/cht/book/index.php?ch=17
lame –mp3input -b 64 source/41/41_001.mp3 64k/41_001.mp3
tjm處理珍本聖經新影像上線,修正CPU溫度感應程式
tjy搶修hinet斷線
joshua 處理spamassassin,已經加上budoca,現在正在努力加上banshin中
ksf 冷氣氣流改善工程延後