This is a discussion on Django on Solaris 10 with the GlassFish Web Stack - Solaris Rss ; This post will show how to get running with Django on Solaris 10 with the Sun GlassFish Web Stack. Install Web Stack First, get the GlassFish Web Stack from here . Depending on how you want to install the Web ...
This post will show how to get running with Django on Solaris 10 with the Sun GlassFish Web Stack.
Install Web Stack
First, get the GlassFish Web Stack from here. Depending on how you want to install the Web Stack, choose either the Image Packaging System (IPS) or the native package format. For more details on the installation, see Sriram's Blog. This post assumes the native version, but can easily be modified for the IPS delivery.
/usr/sfw/bin/wget http://modwsgi.googlecode.com/files/mod_wsgi-2.5.tar.gz /usr/sfw/bin/gtar xfz mod_wsgi-2.5.tar.gzcd mod_wsgi-2.5 ./configure --with-apxs=/opt/webstack/apache2/2.2/bin/apxs --with-python=/opt/webstack/python/bin/python Before you run make, be sure that /usr/ccs/bin and the C compiler, in this case Sun Studio Express, /opt/SSX0903/bin, are in your path. We also need to explicitly set the rpath.
LD_RUN_PATH=/opt/webstack/python/lib makemake install This will put the mod_wsgi.so library in /opt/webstack/apache2/2.2/libexec/mod_wsgi.so.
/usr/sfw/bin/wget http://www.djangoproject.com/downloa...r/sfw/bin/gtar xfz Django-1.1.tar.gzcd Django-1.1/opt/webstack/python/bin/python setup.py install Now, let's create a sample project.
cd /export/home/overstre/opt/webstack/python/bin/python /opt/webstack/python/lib/python2.6/site-packages/django/bin/django-admin.py startproject mysite We now need to tell Django that we will be using WSGI.
cd mysite; mkdir apachecat > django.wsgi > /etc/opt/webstack/apache2/2.2/conf.d/modules-32.load And now we need to setup a simple wsgi.conf file so Apache knows about the Django project we created in the previous section.
cat > /etc/opt/webstack/apache2/2.2/conf.d/wsgi.conf