วันพฤหัสบดีที่ 25 กรกฎาคม พ.ศ. 2556

การใช้งาน lighttpd บน DNS320L FFP0.07

1. Copy Config
cp /ffp/etc/examples/lighttpd/lighttpd.conf /ffp/etc
2. Make Folder
mkdir -p /mnt/HD/HD_a2/www/pages
mkdir -p /mnt/HD/HD_a2/www/logs
mkdir -p /mnt/HD/HD_a2/www/tmp
3. ใช้ WinSCP ไป แก้ไข lighttpd.conf ที่ /ffp/etc
บรรทัดที่แก้มี
server.document-root         = "/mnt/HD/HD_a2/www/pages/"
server.upload-dirs              = ( "/mnt/HD/HD_a2/www/tmp" )
server.errorlog                    = "/mnt/HD/HD_a2/www/logs/error.log"
accesslog.filename            = "/mnt/HD/HD_a2/www/logs/access.log"
server.port                           = 88
4. Restart Lighttpd
/ffp/start/lighttpd.sh restart
5.ทดสอบการใช้งาน
นำไฟล์ index.html ไปไว้ที่ /mnt/HD/HD_a2/www/pages
เรียกใช้งาน IP:88

****** จากที่ทำการทดสอบพบว่า Lighttpd มัน Run เองแต่ไม่สามารถเข้าได้ให้ทำการเพิ่ม
 kickwebs_start()
{
    /ffp/start/lighttpd.sh stop
    echo "Kicking webs ..."
    killall webs
}
ตัวสีแดง ใน /ffp/start/kickwebs.sh

****** ต้องผ่านการลง FFP และเปิดใช้งาน SSH แล้ว ถ้ามีการลง Tranmission ให้เลือก Port ให้แตกต่างจากที่ใช้

อ้างอิง
http://www.internetearnings.com/how-to-install-lighttpd-php-on-dlink-dns-320/
http://wolf-u.li/4695/konfiguration-von-mysql-und-lighttpd-mit-php-unter-ffp-0-7/

วันจันทร์ที่ 15 กรกฎาคม พ.ศ. 2556

การสำรอง Driver

Driver ที่ Windows Update Download มาเก็บไว้อยู่ที่
C:\Windows\System32\DriverStore\FileRepository
สามารถเอาไปลงเครื่องอื่นๆได้ด้วย

วันจันทร์ที่ 8 กรกฎาคม พ.ศ. 2556

Install Transmission บน DNS320L

 อ้างอิง
*** http://klseet.com/index.php/d-link-dns-320-nas/173
*** http://nas-tweaks.net/371/hdd-installation-of-the-fun_plug-0-7-on-nas-devices/#Download
http://kylek.is-a-geek.org:31337/files/ffp/0.7-arm/
http://nas-tweaks.net/82/installing-and-uninstalling-packages-and-activation-and-deactivation-of-daemons-in-fonz-fun_plug/
http://forum.dsmg600.info/t2719-%5BREL%5D-Transmission.html
โปรแกรมที่ต้องใช้
1.Putty
2.WINSCP
3.Editplus
----------------
step 1
----------------
0. Install Plugin
โหลด
fun_plug =>> http://wolf-u.li/u/433
fun_plug.tgz =>> http://inreto.de/dns323/fun-plug/0.7/arm/fun_plug.tgz
จากนั้นนำไปวางที่ NAS
1. Change Device Root
usermod -s /ffp/bin/sh root
mkdir -p /ffp/home/root/
sed -ie 's#:/home/root:#:/ffp/home/root:#g' /etc/passwd
pwconv
### ถ้า  pwconv ขึ้น Error
pwconv: failed to change the mode of /etc/passwd- to 0600
#Before you run pwconv
cd etc
cp passwd passwd-
cd /
pwconv

2. Change Password
passwd
3. store password
wget http://wolf-u.li/u/172/ -O /ffp/sbin/store-passwd.sh
store-passwd.sh
4. Activate & enable SSH login
chmod a+x /ffp/start/sshd.sh
sh /ffp/start/sshd.sh start
จากนั้นใช้ Winscp ไปเพิ่ม 2 บรรทัดนี้
chmod 700 /ffp/var/lib/sshd/
chmod 700 /ffp/etc/ssh/ssh_*
ใน ffp/start/sshd.sh
ก่อนบรรทัด “proc_start $command”
5.หลังจากเปิด ssh แล้วจะ Dis Telnet แล้ว Reboot
chmod -x /ffp/start/telnetd.sh
reboot
6.หลังจาก Reboot มาแล้ว ถ้า ssh ยังไม่เปิด ให้ไปแก้ ##นำไปรวมกับข้อ 4 แล้ว
เพิ่ม
chmod 700 /ffp/var/lib/sshd/
chmod 700 /ffp/etc/ssh/ssh_*
ใน ffp/start/sshd.sh
ก่อนบรรทัด “proc_start $command”
จากนั้น Reboot และทดสอบ ssh
7. โหลด Transmission โดยใช้คำสั่ง
wget http://inreto.de/ffp/0.7/arm/packages/curl-7.21.4-arm-1.txz
wget http://kylek.is-a-geek.org:31337/files/ffp/0.7-arm/Transmission-2.76-arm-1.txz
8. ลง โดยใช้คำสั่ง
funpkg -i curl-7.21.4-arm-1.txz
funpkg -i Transmission-2.76-arm-1.txz
9.ติดตั้ง User และ Pass และ ที่เก็บไฟล์ โดยใช้คำสั่ง
su nobody -c "transmission-daemon -f -g /mnt/HD/HD_a2/.transmission-daemon -w ##Path## -t -u ##User## -v ##Pass## -a 127.0.0.1,192.168.*.*"
ตัวอย่าง
su nobody -c "transmission-daemon -f -g /mnt/HD/HD_a2/.transmission-daemon -w /mnt/HD_a2/Downloads -t -u Transmission -v 99999 -a 127.0.0.1,192.168.*.*"
มันจะรันไม่สำเร็จ จะค้างอยู่ที่หน้า Port ซักอย่าง ให้กด Ctrl+C
และใช้คำสั่ง Start มันใหม่
/ffp/start/transmission start
10.จากนั้นทดสอบเข้า Web UI โดย
IPADDRESS:9091
11.ตรวจสอบ CPU ใน NAS ถ้ามัน 100% ตอนโหลดBitให้ SSH ไปแก้ **แนะนำให้ทำเลยหลังจาก start transmission
rm /dev/random
rm /dev/urandom
และ
mknod -m 666 /dev/random c 1 8
mknod -m 666 /dev/urandom c 1 9
12.แก้ไขค่า Config Transmission




เกือบลืมอย่าลืมสร้าง Folder ที่เก็บไว้นะครับ จากนั้นค่อยนำไปใส่ใน Config

***************************จบครับ****************************


ปล.ผมไม่ได้เป็นคนต้นคิดนะครับ แต่เกิดจากอยากลองทำอะไรแปลกๆกับของที่ซื้อมาเลยหาข้อมูลและรวบรวมมาให้เท่านั้น (กันลืมส่วนตัวด้วย)