django 几条命令

杀manage.py进程 : ps -ef | grep manage.py|grep -v grep|awk '{print $2}'|xargs kill -9

启动            : python manage.py runfcgi host=127.0.0.1 port=8090

启动fastcgi      php-cgi -b 127.0.0.1:9000

           : spawn-fcgi -a 127.0.0.1 -p 9000 -C 10 -u www-data -f /usr/bin/php-cgi

检查fastcig是否启动  sudo netstat -anpo | grep "php-cgi" | wc -l

把django跑在8090端口,用python manage.py runfcgi host=127.0.0.1 port=8090 errlog=~/fcgi_errlog

然后nginx里server是8080

设置根目录/转发到8090

自定义别名或函数

vim ~/.bashrc

alias xx='cd ~/shanghaixx/xx/xx && workon xx'
xx2(){
    cd ~/shanghaixx/xx/xx;
    workon xx;

}

相关推荐