所以,你需要买上一个路由器,或者用自带的,至于各种教程就网上找吧。如果不知道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
#修改etc/config/fstab文件如下:
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
下载setuptools
安装easy_install
sh setuptools-0.6c11-py2.6.egg
安装Pip
easy_install pip
安装django
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;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_types text/plain application/x-javascript text/css application/xml;
gzip_vary on;
server {
listen 88;
server_name YOUR_SERVER;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 32k;
fastcgi_buffers 4 32k;
fastcgi_busy_buffers_size 32k;
fastcgi_temp_file_write_size 32k;
client_body_timeout 10;
client_header_timeout 10;
send_timeout 60;
output_buffers 1 32k;
postpone_output 1460;
root /root/Onrt;
location /static/ { # STATIC_URL
alias /root/Onrt; # STATIC_ROOT
expires 30d;
}
location /media/ { # MEDIA_URL
alias /root/Onrt; # MEDIA_ROOT
expires 30d;
}
location / {
include fastcgi_params;
fastcgi_pass 127.0.0.1:1259;
}
#location ~ \.php$ {
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# include fastcgi_params;
#
# if (-f $request_filename) {
# # Only throw it at PHP-FPM if the file exists (prevents some PHP exploits)
# fastcgi_pass 127.0.0.1:1026; # The upstream determined above
# }
#}
}
}
python /root/Onrt/manage.py runfcgi host=127.0.0.1 port=1259;

围观我的Github Idea墙, 也许,你会遇到心仪的项目