tjm 更換CentOS 5.5 預計本週換postgresql
ksf 更換UPS電池
tjm 更換CentOS 5.5 預計本週換postgresql
ksf 更換UPS電池
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
ksf 處理冷氣漏水
tjy複製Raid manual
joshua life greylist 升級
tjm 寫完聖經速讀紀錄,處理好開機USB備份
下週六換電池更新 life 電風扇
tjm 寫聖經閱讀即時查字典切換程式
joshua 灰名單套件,搞定spam 信件防堵
電池購買日期 2007年3月10日 防爆電池 已經超過三年,應該更換了.
所以我們要購買RAM,預備硬碟,六個防爆電池 以執行今年度之預算 頻寬派tjm與lk去談判,看看有沒有辦法取得兩條光纖
us的icecast 偵測改北美發動
tjm 修改聖經地理,聖經閱讀程式,撰寫聖經公會每日金句程式
ksf 舊RAID更新外殼,有利保固
joshua:搞定tech
0, 預備工作
安裝 yum-utils
取得 sendmail rpm
yumdownloader sendmail
解開 sendmail-8.13.8-2.el5.i386.rpm
rpm2cpio sendmail-8.13.8-2.el5.i386.rpm | cpio -ivd
(會解出 sendmail 的內含檔案, 取 sendmail.mc)
cp etc/mail/sendmail.mc /etc/mail/sendmail.mc_original, 以此為依據,
1, amavisd-new 網站
http://www.ijs.si/software/amavisd/
2, 停掉 MailScanner
service MailScanner stop
chkconfig –level 35 MailScanner off
3, 安裝
yum -y install amavisd-new amavisd-new-milter clamav clamav-db –enablerepo dag
4, 設定
(1) sendmail
cp /etc/mail/sendmail.mc_original /etc/mail/1.mc
vi 1.mc 加入以下內容
DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA’)dnl
MASQUERADE_AS(`fhl.net’)
FEATURE(masquerade_envelope)
FEATURE(allmasquerade)
INPUT_MAIL_FILTER(`greylist’, `S=local:/var/milter-greylist/milter-greylist.sock’)
INPUT_MAIL_FILTER(`milter-amavis’, `S=local:/var/amavis/amavis-milter.sock, F=T, T=S:20m;R:20m;E:40m’)dnl
另外要修改 /etc/init.d/amavisd
MILTER_SOCKET="local:/var/amavis/amavis-milter.sock"
/etc/amavisd.conf 也要參照 tech 修改一下
趕快紀錄下搞定的方法:
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 查到資料
tjm 換RAID機器失敗
ksf 更換RAID機器失敗
joshua 將mail scanner轉成另一個系統
tjm 排除大量信件問題,解決MailScanner和perl 衝突,修改聖經地圖程式
冷氣機制有問題
裝完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’);
?>