2011年6月21日 星期二

LEAF TFTP安裝摘要

1.載入模組 /kernel/net/ipv4/netfilter/ip_conntrack_tftp.o
2.修改shorewall rules規則
3.apkg -i tftp.lrp

tftp 上傳資料時出現以下訊息,確認是否為寫入目錄權限問題或是雙方ip_conntrack_tftp.o 等相關模組設定是否正常
Transfer timed out.

Synology DS209 安裝 SVN摘要

1.建立 svnowner帳號 供 svn 服務使用

2.建立供 svn 資料庫目錄
mkdir /volume1/svn
chown -R svnowner /volume1/svn

3.安裝 ipkg 及 SVN
wget http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/stable/syno-mvkw-bootstrap_1.2-7_arm.xsh
sh ./syno-mvkw-bootstrap_1.2-7_arm.xsh
ipkg update
ipkg upgrade
ipkg install svn

4.初始化svnserver

/etc/inetd.conf 加入
svn stream tcp nowait svnowner /opt/bin/svnserve svnserve -i -r /volume1/svn

5.加入services

/etc/services 加入
svn 3690/tcp # Subversion
svn 3690/udp # Subversion

6.重新開機

7.建立 svn 資料庫 RepoName
root登入後,執行以下指令
cd /volume1/svn
svnadmin create RepoName
chown -R svnowner RepoName

8.設定存取控制
異動 /volume1/svn/RepoName/conf/svnserv.conf 內容
anon-access = none
auth-access = write
password-db = passwd

參數說明
anon-access 任何人都可以存取
auth-access 透過 認證存取
none 表示無法讀取
read 表示只能讀取
write 可寫入/讀取

9.設定帳號密碼

異動 /volume1/svn/RepoName/conf/passwd 內容
username = password --> 帳號及密碼對應方式,密碼為明碼

參考資料
http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/
http://wizjos.endofinternet.net/synology/index.php/algemeen/welk-processortype-zit-er-in-mijn-systeem

2011年5月12日 星期四

Openfiler 安裝 HighPoint RocketRAID 2760/2760A

以下適用於 openfiler 2.9.1 X86_64,HighPoint RocketRAID 2760/2760A

1.設定 Proxy:
export http_proxy=http://proxy_server-ip:port/

2.安裝 gcc 及相關套件:
conary update gcc
conary update libtool 
conary update glib
conary update glib:devel
conary update glibc   
conary update glibc:devel
conary update automake
conary update autoconf
conary update pkgconfig
conary update ncurses:devel

3.下載 RocketRAID 2760/2760A Driver:
Linux open soure 版本

4.編譯 RocketRAID 2760/2760A driver
tar xzf rr276x-linux-src-v1.0-100907-1741.tar.gz
cd rr276x-linux-src-v1.0/product/rr276x/linux
./make

5.測試 rr276x.ko
insmod ./rr276x.ko
若硬體不存在會有以下顯示:
insmod: error inserting './rr276x.ko': -1 No such device

6.安裝 driver module
cp ./rr276x.ko /lib/modules/2.6.32-71.18.1.el6-0.20.smp.gcc4.1.x86_64/kernel/drivers/scsi/
depmod -a

7.安裝 RAID Management/ Inband Service
下載 CLI Linux 版本
tar zxf CLI-Linux-3.5-100701.tgz
cd CLI-Linux-3.5-100701/rpm
mkdir hightpoint
cd hightpoint
rpm2cpio ../hptraidconf-3.5-1.x86_64.rpm.rpm | cpio -idv
rpm2cpio ../hptsvr-3.13-7.x86_64.rpm | cpio -idv

8.hptraidconf
Note: The default username is RAID and the default password is hpt.

9.其他
HighPoint RocketRAID 274x系列只需下載對應硬體driver,安裝編譯步驟相同

參考文件:
http://www.highpoint-tech.com/Taiwan/rr2760_2760A_download_tw.htm
http://www.ontn.net/highpoint/HPT_CLI_Guide.pdf

2011年4月29日 星期五

LEAF 光碟 ISOLinux 摘要

1.建立isolinux目錄,包含以下檔案:
isolinux.bin
isolinux.cfg
isolinux.dpy
linux

2.其他 leaf.cf,*.lrp 不置於 isolinux目錄中

3.執行以下指令,建立新的iso檔案:
mkisofs -o output.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table directory

註:isolinux/boot.cat 會自行產生

LEAF Kernel 2.6 Initrd.lrp 異動摘要

解開 initrd:
mv initrd.lrp initrd.gz
gzip -d initrd.gz
mkdir initrd
cd initrd
cpio -i < ../initrd

dd if=../img bs=1120 skip=1|zcat |cpio -i
封裝 initrd:
find . | cpio -c -o | gzip -9 > ../initrd.lrp

2011年3月2日 星期三

查詢 Linux 相關版本資訊

32/64 bit版本:
1.getconf LONG_BIT
64 或 32

2.file /bin/ls
64bit=>/bin/ls: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
32bit=>/bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), stripped

3.uname -a
結果為 x86_64 則為 64-bit否則為 32-bit.


Linux 版本:
1.lsb_release -a
2.cat /etc/redhat-release

2011年2月22日 星期二

刪除 Proxmox VE Cluster 設定

確認所有node皆移除cluster
pveca -d ID

master 及各個node 執行以下指令:
1.停止 cluster sync 服務
/etc/init.d/pvemirror stop

2.停止 tunnel service 服務
/etc/init.d/pvetunnel stop

3.刪除 cluster 設定檔
rm /etc/pve/cluster.cfg
rm -rf /etc/pve/master

4.刪除相關的ssh設定內容
rm /root/.ssh/known_hosts