2012年3月14日 星期三
QNAP NAS TS212 安裝SVN
ipkg update
ipkg install svn
2.建立SVN資料目錄
mkdir /share/MD0_DATA/svn
svnadmin create /share/MD0_DATA/svn
3.修改SVN設定檔
修改 /share/MD0_DATA/svn/conf/passwd
[users]
harry = harryssecret
sally = sallyssecret
修改 /share/MD0_DATA/svn/conf/svnserve.conf
[general]
anon-access = read
auth-access = write
password-db = passwd
4.執行 svnserve -d --listen-port=3690 -r /share/MD0_DATA/svn
Client 相關設定
Linux client bash 中加入以下參數
export SVN_EDITOR="/usr/bin/vim"
2012年2月20日 星期一
2012年1月12日 星期四
QNAP TS-412 自訂排程
ipkg install coreutils
2.編輯 /opt/var/cron/cron.allow 內容如下admin
3.加入排程工作 /opt/bin/crontab -e 內容範例如下
*/1 * * * * date >> /tmp/crontab.test
2012年1月5日 星期四
HD SUPPORT TOOLS
1.安裝 hdsupp.lrp
apkg -i hdsupp.lrp
dd if=/usr/sbin/mbr.bin of=/dev/sda bs=512 count=1
3.執行 syslinux 安裝 ldlinux.sys
syslinux /dev/sda1
2011年12月20日 星期二
QNAP TS-412 安裝 openssh
1.使用QPKG 外掛管理,安裝 Optware IPKG
2.安裝 openssh
ipkg update
ipkg install openssh
修改 /etc/init.d/Optware.sh,尋找以下內容
case "$1" in
start)
...[elided]...
# adding Ipkg apps into system path ...
/bin/cat /etc/profile /bin/grep "PATH" /bin/grep "/opt/bin" 1>>/dev/null 2>>/dev/null
[ $? -ne 0 ] && /bin/echo "export PATH=$PATH":/opt/bin:/opt/sbin >> /etc/profile
;;
stop)
改為
case "$1" in
start)
...[elided]...
# adding Ipkg apps into system path ...
/bin/cat /etc/profile /bin/grep "PATH" /bin/grep "/opt/bin" 1>>/dev/null 2>>/dev/null
[ $? -ne 0 ] && /bin/echo "export PATH=$PATH":/opt/bin:/opt/sbin >> /etc/profile
# Patch per http://wiki.qnap.com/wiki/Install_Optware_IPKG
/bin/echo "Run Optware/ipkg /opt/etc/init.d/*"
source /etc/profile
# Start all init scripts in /opt/etc/init.d
# executing them in numerical order.
#
for i in /opt/etc/init.d/S??* ;do
# Ignore dangling symlinks (if any).
#[ ! -f "$i" ] && continue
case "$i" in
*.sh)
# Source shell script for speed.
(
trap - INT QUIT TSTP
set start
. $i
)
;;
*)
# No sh extension, so fork subprocess.
$i start
;;
esac
done
# End patch
;;
stop)
2011年11月16日 星期三
PXELinux 設定範例
---------------------------------------------
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}
/etc/dhcpd.conf
-------------------------------------------
ddns-update-style none;
ignore client-updates;
allow booting;
allow bootp;
subnet 192.168.56.0 netmask 255.255.255.0 {
range 192.168.56.10 192.168.56.20;
option broadcast-address 192.10.0.255;
option routers 192.168.56.1;
option subnet-mask 255.255.255.0;
option domain-name-servers 192.168.19.10;
next-server 192.168.56.101;
filename "linux-install/gpxelinux.0";
}
/tftpboot/linux-install/pxelinux.cfg/default
--------------------------------------------
DEFAULT menu.c32
PROMPT 0
ALLOWOPTIONS 0
TIMEOUT 50
LABEL linux
MENU LABEL LINUX
KERNEL vmlinuz
append initrd=initrd.img
LABEL local
kernel chain.c32
append hd0 0
LABEL dos
MENU LABEL DOS
kernel memdisk
append initrd=dos.img
LABEL memtest
MENU LABEL MEMTEST
kernel memdisk
append iso initrd=memtest86+-4.20.iso