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

Saturday, November 17, 2007

Xubuntu on Acer TM-341T

Hardware:Acer TravelMate 341T
Target OS:Xubuntu 7.10


Problem:
這台電腦的Debian原本是在DHCP的環境下安裝的,但是今天我的環境換成利用PPPoE的連線方式卻無法正常使用(已經使用pppoeconf設定過!)。
症狀如下:
1.只可以ping到ISP分配的IP,以及ISP的gateway。
2.從plog看到訊息 Couldn't increase MTU to 1500 以及Couldn't increase MRU to 1500。

解決方法:
參考my.opera.com上的Eexpress作者的這篇文章
http://my.opera.com/eexpress/blog/index.dml/tag/GlobeSpan

在我改了/etc/ppp/peers/dsl-provider中的三行(把下面三行之前的#刪除!)之後,就可以正常上網了。
pty "/usr/sbin/pppoe -I ppp0 -T 80 -m 1452"
pty "/usr/sbin/pppoe -I ppp0 -T 80 -m 1412"
pty "/usr/sbin/pppoe -I ppp0 -T 80"



原本系統為Debian 3.1(純文字),想說要裝Xubuntu來用,但是因為這台NB它的光碟機無法開機,所以沒辦法依照一般的方法安裝OS。慶幸的是這台NB本來就有Debian以及可以用floppy開機(但是無法確定是否可以100%正常運作!),本來想說要利用現有的Debian來安裝,但是硬碟已經沒有空間了,所以就作罷!後來用Smart Boot Manager 就可以使用光碟安裝Xubuntu了。大致上的步驟如下:
1.從Xubuntu的iso檔裡面找出sbm.bin這個image file (xubuntu-7.10-desktop-i386.iso/install)。
2.利用RawWrite for Windows把sbm.bin寫入磁碟中。
3.把寫好的磁片以及Xubuntu放到NB中。
4.進入Smart Boot Manager介面,選擇CD-Rom開機。
5.安裝Xubuntu。

Source to download Xubuntu:
NCHC
http://ftp.twaren.net/Linux/Ubuntu/ubuntu-dvd/xubuntu/\
releases/7.10/release/xubuntu-7.10-desktop-i386.iso

Tuesday, November 6, 2007

Debian 常用指令

以關鍵字搜尋軟體
apt-cache search

安裝軟體
apt-get install

移除軟體
apt-get remove

查詢系統裝了哪些軟體
dpkg --get-selections
dpkg -l



Ref:
Gentoo Taiwan 討論區-Gentoo Taiwan 討論區 首頁-系統安裝管理精華區-Gentoo/Debian/FreeBSD套件管理memo Note:gentoo.tw暫時停止服務(DNS作業問題)

Tuesday, March 13, 2007