2010年12月28日 星期二

Apache FTPClient listFiles() return is empty

FTPClient ftp
...
ftp.setControlEncoding("utf8");
ftp.setDefaultPort(port);
ftp.connect(ip);
ftp.login(id, pwd);
ftp.enterLocalPassiveMode();//important
ftp.changeWorkingDirectory("ToLoad");

加上enterLocalPassiveMode method就解決了

2010年12月12日 星期日

CentOS install snmp

確認一下有裝了嗎 ?
# rpm -qa | grep net-snmp
net-snmp-utils-5.3.2.2-9.el5_5.1
net-snmp-libs-5.3.2.2-9.el5_5.1
net-snmp-5.3.2.2-9.el5_5.1

沒有的話就裝吧
#yum install -y net-snmp
#yum install -y net-snmp-libs
#yum install -y net-snmp-utils

修改設定
#vi /etc/snmp/snmpd.conf
com2sec notConfigUser default MyCommunity

group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser

view all included .1 80
view system included .iso.org.dod.internet.mgmt.mib-2.system

access notConfigGroup "" any noauth exact all none none

讓它重開也會開啟
#chkconfig snmpd on
設定完成生效重啟
#service snmpd restart

確認成功與否
#snmpwalk -v 2c -c MyCommunity localhost system



失敗的話看防火牆有沒有擋到161 udp port、防火牆有開啟否
#netstat -ln | grep 161
#service iptables status
修改 /etc/sysconfig/iptables (或 /etc/sysconfig/iptables-config)
增加如下:
-A RH-Firewall-1-INPUT -p udp -m state --state NEW -m udp --dport 161 -j ACCEPT

restart iptables
#/etc/init.d/iptables restart

2010年12月9日 星期四

New Mac air 11 inch crash event

買不到三個星期,今天在用air看pdf檔案後離開後,回到座位後畫面全黑,怎麼都沒反應.這時以為買到機王了= =
就先打電話給客服 ,她叫我拔除所有與其連結的線連同電源線並按住shift+option+command+power 15 seconds 然後再按開機鈕居然就恢復正常了.回到桌面後我就更新OS 10.6.4 ->10.6.5重開機後,又出現更新韌體的訊息,看了內容跟我發生的情況一樣,當然我也更新這個韌體,再度重開機。就等之後是否還會有這種情況發生嚕^^
隔天又發生一樣的情況= = ....只好盡量不要讓它到休眠狀態Orz..

2010年12月8日 星期三

Library updating

Quartz 1.8.4 Released - 10/28/2010
Quartz 2.0 on beta stage -11/24/2010
Notable new features include : Quartz Where: a new interface to control where jobs execute in a clustered environment.

COVID-19 確診經歷紀實

原本以為真的是天選之人,就算先前家裡兩個小孩都確診都逃過了(可能有中獎但無症狀吧),不過就在2023年六月18日破解自認為天選之人的"心態",為什麼可以確認就是這天中獎的呢?因為在前都是居家上班,到人多的室內場所都會戴口罩,就剛好這天傍晚原本只想說要去附近的國...