Installing mod_wsgi on OpenSolaris.

*Not for the faint of heart. (See below)*

This is the process I followed to install mod_wsgi on OpenSolaris 2008.11.

First I would like to thank Graham Dumpleton and Thurner Rupert from the mod_wsgi mailing list and @yksingisyyteni from #opensolaris.

The way to do it:

When trying to install mod_wsgi with a fresh install of OpenSolaris and the amp-dev, gcc-dev, Sun Studio Express, and all other relevant packages; I kept ending up with an error saying, “/opt/SUNWspro/bin/cc not found”. WTF is SUNWspro? Let me tell you: SUNWspro is a piece of the Sun Studio 12 program used to compile C for the Solaris platform. It is the same thing that compiled the version of Apache you installed through PKG. Which means that that GNU cc program that you chose to download is not going to work to compile it. What you need to do is get Sun Studio 12. Once you have it you can follow the instructions on the Sun website for how to install it (which I could never get to work) or you could do this:

bunzip2 -vv SunStudio…tar.bz2 (this will take some time; let it run)

tar xvf SunStudio…tar (this will also take some time)

./installer & (now wait)

Follow the GUI tools to finish the install.

Once you have Sun Studio installed you can compile like the Installation Instructions say. Just a quick make, make install, edit your apache conf file and you are done.

*Not the way to do it:

This is what I had to do to get to the final, finished product you see above.

Realize I don’t know what SUNWspro is.

Think, “Fuck, I will just reinstall.”

mailing list, irc

Reinstall, damn it still doesn’t work.

I know, I will try to install Sun Studio.

I am running bzcat SunStudio…tar.bz2 | tar xvf – and it is not working.

I waited…

and waited…

OK, scratch that. I will compile my own versions of Apache, MySQL, and any other thing that I would need to run a server.

That was fun. Apache is a blast to compile.

MySQL…pkg, WTF? I can’t just double click?

I will install the tar MySQL.

Fuck, this takes a long time and is kind of hard.

Pkgadd -d, wait that’s how I can add the MySQL.pkg file?

rm -rf mysql

pkgadd -d mysql.pkg

mysqld

ERRORS!!!1!111!!

Much “googling”

Damn. I got mod_wsgi to work I don’t want to reinstall again.

mysql ERRORS!!1!!1!!

Reinstall

Now I know the drill

Install amp-dev and all other relevant packages

Install SunStudio

Compile mod_wsgi

HOORAY!!!