|
欢迎到我的Blog捧场
http://hi.baidu.com/myeyre/blog/ ... eae42ccffca3d3.html
-------------------------------------------------------------------
WRTSL54GS动手玩 之 Debian篇
DebianWRT debootstrap Howto:
Refer to:
http://wiki.debian.org/DebianWRT
http://wiki.debian.org/Debootstrap
http://www.lucas-nussbaum.net/blog/?p=228
1) on a Linux PC:
#Debian and Ubuntu Rock. zypper or yum etc should do the trick too.
apt-get update
apt-get install debootstrap
#Mirrors located in China seemed to badly synced: missing archs, wrong files, outdated ...
#Pity for this GREAT GREAT country.
#Choose a primary mirror near you. TW, JP mirrors should be fine. There's even a KR mirror.
#To locate a mirror near you, see the list of Debian worldwide mirror sites.
#http://www.debian.org/mirror/list
cd ~; mkdir ~/debian-wrt
##lenny on DD-WRT v24 preSP2: FATAL: kernel too old
#debootstrap --arch mipsel --foreign lenny ~/debian-wrt http://ftp.tw.debian.org/debian/
debootstrap --arch mipsel --foreign etch ~/debian-wrt http://ftp.tw.debian.org/debian/
tar -czf debian-wrt.tar.gz debian-wrt/
#cp it to WRTSL54GS using Samba, ssh or ftp.
2) on DD-WRT:
tar -xzf debian-wrt.tar.gz
##
#mount -t proc proc ~/proc
chroot ./debian-wrt /bin/bash
mount -t proc proc /proc
ls /proc
/debootstrap/debootstrap --second-stage
##reload init, I'd rather not to.
#init q
3) Post-install config:
echo "nameserver 192.168.10.1" > /etc/resolv.conf
#null sources.list??
echo "deb http://ftp.tw.debian.org/debian/ etch main contrib non-free" > /etc/apt/sources.list
apt-get update
apt-get install hello
hello
#Good!!
4) LAMP:
apt-get install lighttpd php5 php5-cgi mysql-server php5-mysql phpmyadmin
#vi /etc/lighttpd/lighttpd.conf
server.port = 81
#10-fastcgi.conf: php4 >> php5
lighty-enable-mod fastcgi
/etc/init.d/lighttpd start
cat > /var/www/i.php
<?php
phpinfo();
?>
^D
##mysql
##use mysql;
##delete from user where user = '';
##update user set password = password('xxxzzz') where user='root';
##
##flush privileges;
5) Wordpress:
Still suffer from bad performence.
#try to run php as apache module.
Still sucks.
#try to run on 7231-4p 64M mod??
tbd.
#try to run spawn-fcgi on another WRT??
tbd. |
|