Category Archives: Linuxamp;FreeBSD

[Linux] IRQ

From setserial manual … The “standard MS-DOS” port associations are given below: /dev/ttys0 (COM1), port 0x3f8, irq 4/dev/ttys1 (COM2), port 0x2f8, irq 3/dev/ttys2 (COM3), port 0x3e8, irq 4/dev/ttys3 (COM4), port 0x2e8, irq 3 Due to the limitations in the design … Continue reading

Posted in Linux, Linuxamp;FreeBSD | Leave a comment

[Linux] [Windows] SVN Service 的架設與使用

為了管理我那大大小小的文件與程式碼,自己架設了一個SVN Server。以下是架設與使用方法。 先記一下,有空再整理。 Note: 在設定<Location 位置> Block時,位置中的目錄路徑不可以跟現有的網頁目錄重疊,否則Apache會辨認不出來。 Reference SVN基本指令教學 SVN中文書 SVN Server On CentOS(Linux)1 SVN Server On CentOS(Linux)2 SVN Server(Client) On Windows. SVN: How to do permission control?

Posted in Linux, Linuxamp;FreeBSD, svn, 程式設計 | Leave a comment

設定Firefox 網址列自動完成與候選列長度

Firefox 有個自動完成的功能,預設是不開啟的狀態。你可以讓網址列的自動完成設定為開啟。方法如下: 1. 在firefox網址列輸入 about:config 2. 在filter 輸入browser.urlbar.autofill ,過慮出設定欄,滑鼠連點該欄位,使之為true即可。 預設的firefox也有自動完成的候選列可以選擇,但是通常會非常的長,使用桌上型電腦還好,如果是筆記型電腦的話,畫面被蓋掉一半以上,關鍵的地方看不到就覺得非常煩。因此,也可以透過about:config來設定。 只要將filter 過慮為browser.urlbar.maxRichRessults ,設定成你要顯示的候選列數目即可。^_^

Posted in browser, Linuxamp;FreeBSD | Leave a comment

Install LXDE in Ubuntu

這整件事情起因於…我的電腦好像有點慢…于是乎下定決心要安裝LXDE下去。 1. 一開始就利用Synapitic 安裝LXDE所有套件。(注意,請不要安裝lxnm,敝人經驗是它對無線網路介面support很弱…) 安裝完畢之後,登出。 選擇作業階段:LXDE,登入。 之後,你會發現右下角的網路圖示icon跟電源圖示在預設之下,LXDE並沒有支援。 2. 因此,如果你要加入的話,以gnome提供的powermanager與nm-applet為例。 進入系統工具->Ubuntu TWEAK->啟動控制(自動啟動)。 把電源管理工具跟網路工具打勾,並且將網路工具的啟動command由nm-applet –sXXXX 改為nm-applet。 編輯~/.config/autostart/nm-applet.desktop 跟 ~/.config/autostart/gnome-power-manager.desktop。 把其中一行OnlyShowIn=GNOME;XFCE;改成OnlyShowIn=GNOME;XFCE;LXDE; 完工之後,登出,大功告成。 補一張我的LXDE 桌面圖: Reference LXSession Ubuntu  Linux 設定網卡 文字模式下啟動無線網路

Posted in Linuxamp;FreeBSD, LXDE | 2 Comments

Backup MySQL with bash

這是一個簡單的範例程式,用來備份mysql用的。 以下假設我的MySQL使用者帳號為user,密碼為123,database名稱為db1 backupmysql.sh: =編輯開始= #!/bin/sh#Program:#      This code backup MySQL database with date.#      Author: Allen#History:#      2009/1/1 #take datedate=`date +%Y%m%d` #database namedb_name=’db1‘db_user=‘user”db_password=’123‘ mysqldump $db_name -u $db_user –password=”$db_password” > 備份目錄/$db_name$date.sql =編輯結束 = 然後將這支bash程式權限設定為 700 (chmod 700 backupmysql.sh)。 如果你要讓它定期幫你備份的話,加入crontab就好囉。 例如我要讓它每七天都幫我備份的話,只要加入以下: #Allen: 每七天的01:00執行一次 backupmysql.sh ,自動備份資料檔案0 … Continue reading

Posted in Linux, Linuxamp;FreeBSD | Leave a comment

CentOS yum設定檔

最近Lab網頁主機替換,我為它裝上了CentOS 5.2,發現鳥哥網站寫的直接在mirrorlist加入&cc=tw 的方法對於學術網路的安裝與更新來說,實在太慢了。 研究了一下,終於將它換成對應到義守大學檔案伺服器的mirror。如此,連線速度就可以快很多倍囉! 以下是我的設定檔(位於/etc/yum.repos.d/CentOS-Base.repo): [base]name=CentOS-$releasever – Base#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&cc=twbaseurl=http://ftp.isu.edu.tw/pub/Linux/CentOS/$releasever/os/$basearch/gpgcheck=1gpgkey=http://ftp.isu.edu.tw/pub/Linux/CentOS/RPM-GPG-KEY-CentOS-5 #released updates[updates]name=CentOS-$releasever – Updates#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&cc=twbaseurl=http://ftp.isu.edu.tw/pub/Linux/CentOS/$releasever/updates/$basearch/gpgcheck=1gpgkey=http://ftp.isu.edu.tw/pub/Linux/CentOS/RPM-GPG-KEY-CentOS-5 #packages used/produced in the build but not released[addons]name=CentOS-$releasever – Addonsbaseurl=http://ftp.isu.edu.tw/pub/Linux/CentOS/$releasever/addons/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons&cc=twgpgcheck=1gpgkey=http://ftp.isu.edu.tw/pub/Linux/CentOS/RPM-GPG-KEY-CentOS-5 #additional packages that may be useful[extras]name=CentOS-$releasever – Extrasbaseurl=http://ftp.isu.edu.tw/pub/Linux/CentOS/$releasever/extras/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&cc=twgpgcheck=1gpgkey=http://ftp.isu.edu.tw/pub/Linux/CentOS/RPM-GPG-KEY-CentOS-5 #additional packages that extend functionality of existing packages[centosplus]name=CentOS-$releasever – Plus#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&cc=twbaseurl=http://ftp.isu.edu.tw/pub/Linux/CentOS/$releasever/centosplus/$basearch/gpgcheck=1enabled=0gpgkey=http://ftp.isu.edu.tw/pub/Linux/CentOS/RPM-GPG-KEY-CentOS-5 … Continue reading

Posted in Linux, Linuxamp;FreeBSD | 2 Comments

Vim 鍵盤指令圖解

ref:http://blog.linux.org.tw/~jserv/archives/001675.html

Posted in Linux, Linuxamp;FreeBSD, vim, 程式設計 | Leave a comment

automake,autoconf,libtool,Kdevelop

Automake,autoconf,libtools Kdevelop manaul Kdevelop 快速上手(簡體中文)

Posted in Kdevelop, Linux, Linuxamp;FreeBSD, 程式設計 | Leave a comment

Linux proftp 架設範例 1

最近幫系上老師架設FTP,架設成功了許久,但是一直沒有寫下架設方法。為了避免忘記,就把心得寫了下來…設備環境:Linux (Fedora Core 6) + Proftpd 需求: 一個系有上課的有3個年級,每個年級有專屬的ftp帳號 user1,user2,user3,使用者只能上傳檔案,上傳之後不能下載,也不可以切換到其他使用者目錄(如user1可以切換到user2的資料夾),檔案上傳之後不可以刪除。也不可以複寫檔案! 需要有一個專門給大家下載公用檔案的帳號:download。該使用者只能下載,不能刪除,不能上傳檔案,也不能切換到其他使用者目錄。只有BigUser可以複寫檔案,與刪除檔案,上傳檔案。 需要有一個可以將檔案上傳到每個user資料夾,也可以把檔案刪除的大總管BigUser。 作法:因為每個使用者只能上傳不能刪除與下載檔案,所以我把/etc/proftpd.conf設定檔加了以下設定: # Edit by Allen<Directory /home/download>AllowOverwrite on<Limit READ>AllowAll</Limit><Limit WRITE>AllowUser BigUserDenyUser download</Limit></Directory> <Directory /home/user1>AllowOverwrite off<Limit WRITE>AllowAll</Limit><Limit DELE RMD>AllowUser BigUserDenyUser user1</Limit><Limit READ> AllowUser BigUserDenyUser user1</Limit></Directory> <Directory /home/user2>AllowOverwrite off<Limit WRITE>AllowAll</Limit><Limit DELE RMD>AllowUser BigUserDenyUser user2</Limit><Limit READ>AllowUser BigUserDenyUser user2</Limit></Directory><Directory /home/user3>AllowOverwrite … Continue reading

Posted in Linux, Linuxamp;FreeBSD | Leave a comment

[LPI]UART? Port? IRQ?

UART 通用非同步收發傳輸器(Universal Asynchronous Receiver/Transmitter,通常稱作UART,讀音/ˈjuːɑrt/)是一種非同步收發傳輸器,是電腦硬體的一部分,將資料由序列傳輸(Serial communication)與平行傳輸(Parallel communication)間作傳輸轉換。UART通常用在與其他通訊協定(如EIA RS-232)的連結上。 IRQ 那么,什么是IRQ(中断请求)呢?中断请求是由某个设备发出并同时请求CPU产生中断的一个请求响应信号。通常情况下,计算机是根据中断请求的优先 级来决定究竟应当首先响应哪一个设备的中断请求的(中断请求IRQ0~1RQ15中,IRQ0的优先级别最高,IRQ15最低)。原则上,计算机中每个设 备自身只有 惟一的一个中断请求通道,即IRQ值(又叫IRQ号)。当两个硬件设备同时使用同一个中断通道(IRQ值)时,就会发生IRQ冲突,因为这个时候处理器已 经无法准确判断收到的中断请求究竟来自于哪个设备了。 Port 聯接阜

Posted in Linux, Linuxamp;FreeBSD, LPI | Leave a comment