Friday, October 21, 2011

Setting up MSW on Rackspace

./manage.py shell

django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb

In root install: pip install mysql-python.

If you I got another error ...
In file included from _mysql.c:29:0:
pymemcompat.h:10:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
... then you need to install sudo apt-get install python-dev

(I searched for solutions for a long time, trying to find my "/usr/local/mysql" on ubuntu, but I don't have it (even though I have mysql).)


Now ./manage.py shell has
ImportError: No module named OpenSSL
From root, pip install pyopenssl


Now ./manage.py shell has
ImportError: No module named bycrypt
From root, pip install py-bcrypt

AND THEN I GOT MANAGE.PY SHELL!!!
import django! works on it too!!!!!!!!
$ ./manage.py shell
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) 
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import django

Whoa I can even run it on my rackspace IP! :D Even though it crashes, at least it can get the request!

$ ./manage.py runserver 50.57.147.82:8000
Validating models...

0 errors found
Django version 1.3.1, using settings 'MozSecWorld.settings_local'
Development server is running at http://50.57.147.82:8000/
Quit the server with CONTROL-C.
[21/Oct/2011 03:23:36] "GET / HTTP/1.1" 301 0

Traceback (most recent call last):
...
TemplateSyntaxError: Caught ImportError while rendering: No module named jinja2
[21/Oct/2011 03:23:37] "GET /msw/ HTTP/1.1" 500 2909
So I did, from root, pip install jinja2

AND MOZSECWORLD IS UP at http://50.57.147.82:8000/!!!!!!!! :D:D:D

No comments:

Post a Comment