日期:2014-05-16 浏览次数:20731 次
所以,你需要买上一个路由器,或者用自带的,至于各种教程就网上找吧。如果不知道Openwrt是什么请谷歌,如果你的路由器不能上网,带有无线的话,试着用connectify共享出你的网络。
(Ps:需要有Linux基础才会各种没有压力,power by Phodal.com)
参考这个贴子:http://www.openwrt.org.cn/bbs/forum.php?mod=viewthread&tid=5983,扩展你的系统到U盘上。
opkg update opkg install kmod-usb-ohci kmod-usb2 kmod-fs-ext3 opkg install kmod-usb-storage reboot mount /dev/sda1 /mnt mkdir /tmp/root mount -o bind / /tmp/root cp /tmp/root/* /mnt -a umount /tmp/root umount /mnt echo Booted from internal rom >> /etc/banner opkg update opkg install block-extroot
echo option force_space >> /etc/opkg.conf reboot
当然了,如果你的路由器带有支持extroot功能的话,直接就能用。如我的

总之是为了保证有足够的空间来安装这些。
wget -c http://downloads.openwrt.org.cn/backfire/10.03.1/brcm63xx/packages/libffi_3.0.9-1_brcm63xx.ipk wget -c http://downloads.openwrt.org.cn/backfire/10.03.1/brcm63xx/packages/python-mini_2.6.4-3_brcm63xx.ipk wget -c http://downloads.openwrt.org.cn/backfire/10.03.1/brcm63xx/packages/python_2.6.4-3_brcm63xx.ipk安装这几个包
opkg install libffi*.ipk opkg install python-mini*.ipk opkg install python_2*.ipk
http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11-py2.6.egg#md5=bfa92100bd772d5a213eedd356d64086
安装easy_install
sh setuptools-0.6c11-py2.6.egg
easy_install pip
pip install django
创建一个django项目,比如Onrt
django-admin.py startproject Onrt
opkg install lighttpd opkg install libsqlite2 opkg install libsqlite3 opkg install lighttpd-mod-access opkg install lighttpd-mod-alias opkg install lighttpd-mod-cgi opkg install lighttpd-mod-fastcgi opkg install lighttpd-mod-rewrite opkg install lighttpd-mod-redirect opkg install sqlite2-cli
opkg install nginx opkg install fastcgi
/etc/init.d/nginx start
user nobody nogroup;
worker_processes 1;
error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
events {
worker_connections 1024;
}
http {
include mime.types;
index index.php index.html index.htm;
default_type text/html;
sendfile on;
keepalive_timeout 65;
gzip on;
gzip_min_length 1k;