On 13 April 2010 21:12, pablo platt <[email protected]> wrote:
> Hi,
>
> I need to setup the same django project on several identical servers.
>
> Details:
> - os - free edition of oracle enterprise linux 5
> - Apache / mod_wsgi
> - python
> - custom python2.6 installation
> - oracle db with cx_Oracle
>
> What is the simplest way to set it up?

Look at buildout for doing reproducible builds.

> Would you recommend creating a system user for the django project and use
> daemon mode?

Both are good ideas.

> What type of user and what privileges does it need?

Normal user. If by privileges you mean what file system access, that
is going to depend on what your application needs to access.

At least the WSGI script file and the directories down to that
location must be accessible to Apache user. All other files need only
be accessible to the user that daemon mode process runs as.

> Can I set ORACLE_HOME, LD_LIBRARY_PATH, PATH=$ORACLE_HOME/bin:$PATH for this
> user?

Doing that would have no effect as Apache doesn't inherit them.

Ideally the .so for cx_Oracle would be built such that LD_RUN_PATH was
used to embed the library directory into the .so so that
LD_LIBRARY_PATH not needed at run time. The ORACLE_HOME then need only
be set in WSGI script file. If that isn't possible, LD_LIBRARY_PATH
may need to be set in Apache envvars file, same directory as Apache
executable. If you Linux distribution doesn't have that file, then
needs to be set in Apache startup scripts. This is assuming the Oracle
libraries not in standard library search directories for system.

> Would you use a virtualenv for cx_Oracle?

Always a good idea to use virtualenv if don't want to trust what is in
system Python site-packages. See:

  http://code.google.com/p/modwsgi/wiki/VirtualEnvironments

> Can I somehow put the python2.6 inside the virtualenv so it will portable to
> other servers?

No. A virtualenv references an separate Python installation, cannot contain one.

You can use buildout however to automatically install a Python
installation just for your application setup. Apache is though bound
to that Python via mod_wsgi, so maybe buildout should install your
Apache and any other required bits as well.

Graham

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.

Reply via email to