Thursday, December 27, 2007

文字介面下的另一種FTP Client選擇 - lftp

之所以會找到lftp軟體,是因為之前在Debian 4.0, Ubuntu 6.06, Ubuntu 7.04這幾個Distribution的文字介面底下使用ftp這個指令連結到也是利用Debian 4.0 or Ubuntu 7.04所架設的FTP Server(vsFTP, Using UTF-8)時,無法正常顯示中文,雖然說在CentOS 5的文字介面底下使用ftp這個指令可以正常顯示中文,但是都找不出是什麼原因造成這樣的差異!

後來找到了lftp這個套件,安裝後,就可以在Debian 4.0, Ubuntu 6.06, Ubuntu 7.04中正常顯示中文,此外又有檔名補齊的功能,真不錯!

使用方法如下:
lftp -u username -p port IP

Reference:
[1]. http://freshmeat.net/projects/lftp/
[2]. http://lftp.yar.ru/

FTP Client

Monday, December 24, 2007

Remote Log Server using syslog-ng!

#1. 安裝syslog-ng [1]

#aptituide install syslog-ng

----------------------------------------------------------------------------------
#2. 設定/etc/syslog-ng/syslog-ng.conf。加上下面這些文字。[1]
(Server side:接收遠端傳送的log file。)
#
# If you wish to get logs from remote machine you will need this server
# to listen upon port 514.
#
source remote { tcp(port(514) keep-alive(no)); };

#
# Automatic host sorting
# Store all files beneath '/var/log/NAME OF MACHINE/facility
# Create these directories if required, with the given permissions.
#
destination hosts { file("/var/log/HOSTS/$HOST/$FACILITY" owner(root)
group(root) perm(0600) dir_perm(0700) create_dirs(yes)); };

#
# log by host (as defined above) anything that's coming from the
# remote socket.
#
log { source(remote); destination(hosts); };

----------------------------------------------------------------------------------
3.重新啟動syslog-ng服務。[1]

#/etc/init.d/syslog-ng restart

----------------------------------------------------------------------------------
參考網站:
[1]. Debian Administration - Sending system messages to a central location.
http://www.debian-administration.org/articles/24

[2]. Wiki of Ubuntu - Quick HOWTO : Ch05 : Troubleshooting Linux with syslog
http://wiki.ubuntu.org.cn/index.php?title=Quick_HOWTO_:_Ch05_:_Trouble
shooting_Linux_with_syslog&variant=zh-tw


[3]. Ubuntuforu
ms - [SOLVED] syslog-ng with dlink router
http://ubuntuforums.org/showthread.php?t=626724
[4]. DebianHelp - Centralized Syslog Server Using syslog-NG with web Interface using php-syslog-ng
http://www.debianhelp.co.uk/syslog-ng.htm