views:

78

answers:

3

Is it possible to develop multi-client web-based CRUD applications (with Django, Ruby on Rails, etc.) on a server on which you don't have root access?

Our machines at school, on which I have a regular account, run a web server, and I can publish regular HTML pages and CGI scripts. How easy/difficult/impossible would it be to install Django with database support there in my home directory and get a simple example running? As an example to get started, I'm imagining something where a user may create an account, log in and leave a message.

We don't have mysql etc., so I'd have to install it in my home directory, if possible.

Any tips or help would be appreciated.

+3  A: 

It is possible to install and run Django without root access, although it's far from simple.

I doubt you'd be able to run MySQL. However, sqlite would work fine, as that just requires access to a file, which can easily live in your home directory. Assuming you're running Python 2.5+, the sqlite libraries are included.

Since you can run CGI scripts, you should be able to run Django via FastCGI. See the FastCGI deployment documentation for details.

In terms of Django itself, it just needs to be in your PYTHONPATH, and this can be set in the FCGI scripts that connect from Apache.

Daniel Roseman
I would say that if you *can't* run FastCGI, you're pretty much screwed. There is a major performance hit when running Python in normal CGI mode (ie. no mod_python or FastCGI), and the bigger the code chunk, the bigger the hit. Translation: running Django as normal CGI loses big time.
Peter Rowell
Uh oh, it doesn't look like I can run FastCGI. In that case, I'll probably just use the Google Apps Engine.
Frank
A: 

You can install Ruby software like Rails or Sinatra without root access, and as Daniel says, you can use SQLite databases if no MySQL database is available.

I think the best advice, though, is to either talk to your administrators, or use an external hosting service. It sounds like the system that you are talking about is intended for essentially static Web sites. If you crowbar in a Web framework and database then at the very least you will be using more than your fair share of resources, and may be violating your terms of use by introducing unauthorized software.

Heroku provide free hosting for small Rails sites, and I believe that some people use that as an easy way to get started.

Stuart Ellis
A: 

As this is a school environment, do you really need a full server? I mean, could you not get by on the dev server (./manage runserver) and save yourself a whole load of configuration issues? I've no idea what your scenario is so if you just need something while you're logged on, I'd imagine it would be fine.

Database-wise, SQLite should be more than enough but it does have various dependencies that can be a pain (though, like Django, not impossible) to satisfy.

Oli