Running django+apache on my macbook

101 views
Skip to first unread message

John M

unread,
Jan 18, 2008, 12:55:55 PM1/18/08
to Django users
OK,

So I know Linux / Apache pretty well, never really done any hard-core
stuff with it. Now I want to use apache on my macbook (intel) OSx
10.5 (upgrade),but have no clue about how to do it.

Googling for how to install mod_python results in a lot of issues from
what I can find, 64bit vs 32bit, etc.

So my question is, whats the easiest way to just get my macbook intel
10.5 to run apache and Django.

Thanks everyone

John

Anton P. Linevich

unread,
Jan 18, 2008, 1:09:27 PM1/18/08
to django...@googlegroups.com

* If you need it for developing, just use django bulidin server.
* If you have a free time, than compile apache2 in your homedirectory with
mod_python and other modules.
* you can run any of Linux liveCDs on your macbook with preinstalled
apache, mod_python and django

--
Anton P. Linevich

William Siegrist

unread,
Jan 18, 2008, 1:13:31 PM1/18/08
to django...@googlegroups.com
I recommend installing apache, python, and mod_python via MacPorts.
Thats what I do to run django on various Mac platforms. Granted, I
work with the MacPorts project, so maybe I'm biased, but I also came
from a linux environment and find MacPorts to be very useful for
package management.

http://www.macports.org/

-Bill

> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To post to this group, send email to django...@googlegroups.com
> To unsubscribe from this group, send email to django-users...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/django-users?hl=en
> -~----------~----~----~----~------~----~------~--~---
>

John M

unread,
Jan 18, 2008, 2:28:21 PM1/18/08
to Django users
Thanks for the macports idea, i'll have a look.

On Jan 18, 10:13 am, William Siegrist <wsiegr...@apple.com> wrote:
> I recommend installing apache, python, and mod_python via MacPorts.
> Thats what I do to run django on various Mac platforms. Granted, I
> work with the MacPorts project, so maybe I'm biased, but I also came
> from a linux environment and find MacPorts to be very useful for
> package management.
>
> http://www.macports.org/
>
> -Bill
>
> On Jan 18, 2008, at 9:55 AM, John M wrote:
>
>
>
> > OK,
>
> > So I know Linux / Apache pretty well, never really done any hard-core
> > stuff with it. Now I want to use apache on my macbook (intel) OSx
> > 10.5 (upgrade),but have no clue about how to do it.
>
> > Googling for how to install mod_python results in a lot of issues from
> > what I can find, 64bit vs 32bit, etc.
>
> > So my question is, whats the easiest way to just get my macbook intel
> > 10.5 to run apache and Django.
>
> > Thanks everyone
>
> > John
> > >
>
>
> smime.p7s
> 3KDownload

John M

unread,
Jan 18, 2008, 2:29:38 PM1/18/08
to Django users
Anton, that was sort of my question, how do I complete your second
idea but w/o the recompile. The mac already comes with apache 2
installed and running rather well, how hard would it be to add
mod_python or mod_wsgi to that environment?

Thanks

John

Christian Joergensen

unread,
Jan 18, 2008, 3:08:19 PM1/18/08
to django...@googlegroups.com

You don't really need Apache and mod_python for developing Django, just
use the built-in webserver.

Take a look here:
http://www.djangoproject.com/documentation/install/

Note the first paragraph of "Install Apache and mod_python". Developing
your applications under mod_python is quite a hassle IMO.

Regards,

--
Christian Joergensen | Linux, programming or web consultancy
http://www.razor.dk | Visit us at: http://www.gmta.info

John M

unread,
Jan 18, 2008, 4:49:31 PM1/18/08
to Django users
I guess I wasn't clear on the PURPOSE to do it, experience, not
practicality.

I love the built-in django server, it's awesome, how much easier could
anyone make it, I think none. But, I wanted to get ready for what it
might be like to deploy django at a hosting facility, or maybe even on
a home setup in Apache, thats all. Since I have a macbook, with
Apache 2 installed, I figured I'd try it. after checking the config
and various googles, it turns out that getting mod_python on the mac
os X might not be as easy as say a debian apt-get kind of thing :).

So, back to the question, how do I get a mac book with stock apache
installed, to run django?

Thanks

John
> Christian Joergensen | Linux, programming or web consultancyhttp://www.razor.dk | Visit us at:http://www.gmta.info

Graham Dumpleton

unread,
Jan 18, 2008, 7:29:17 PM1/18/08
to Django users
On Jan 19, 8:49 am, John M <retireonc...@gmail.com> wrote:
> I guess I wasn't clear on the PURPOSE to do it, experience, not
> practicality.
>
> I love the built-in django server, it's awesome, how much easier could
> anyone make it, I think none.  But, I wanted to get ready for what it
> might be like to deploy django at a hosting facility, or maybe even on
> a home setup in Apache, thats all.  Since I have a macbook, with
> Apache 2 installed, I figured I'd try it.  after checking the config
> and various googles, it turns out that gettingmod_pythonon the mac
> os X might not be as easy as say a debian apt-get kind of thing :).
>
> So, back to the question, how do I get a mac book with stock apache
> installed, to run django?

Simple, don't use mod_python as it hasn't been patched to build
cleanly on a 64bit Intel MacOSX Leopard machine. Use instead mod_wsgi
2.0 (RC) as it will build out of the box on MacOSX. See:

http://www.modwsgi.org
http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango
http://code.google.com/p/modwsgi/wiki/InstallationOnMacOSX

Graham

> Thanks
>
> John
>
> On Jan 18, 12:08 pm, Christian Joergensen <m...@razor.dk> wrote:
>
> > John M wrote:
> > > OK,
>
> > > So I know Linux / Apache pretty well, never really done any hard-core
> > > stuff with it.  Now I want to use apache on my macbook (intel) OSx
> > > 10.5 (upgrade),but have no clue about how to do it.
>
> > > Googling for how to installmod_pythonresults in a lot of issues from
> > > what I can find, 64bit vs 32bit, etc.
>
> > > So my question is, whats the easiest way to just get my macbook intel
> > > 10.5 to run apache and Django.
>
> > You don't really need Apache andmod_pythonfor developing Django, just
> > use the built-in webserver.
>
> > Take a look here:http://www.djangoproject.com/documentation/install/
>
> > Note the first paragraph of "Install Apache andmod_python". Developing
> > your applications undermod_pythonis quite a hassle IMO.

John M

unread,
Jan 18, 2008, 11:51:17 PM1/18/08
to Django users
Thakn you Graham, thats what I'm talking about. I just finished
trying to compile mod_python, and it's not working, and I figured it
was something like that.

So it's off to try mod_wsgi.

Thanks

J

On Jan 18, 4:29 pm, Graham Dumpleton <Graham.Dumple...@gmail.com>
wrote:

Heather

unread,
Jan 19, 2008, 10:32:53 AM1/19/08
to Django users
You have to do some editing to make it work for 64 bit. If you google
mod_python leopard 64 bit you'll find some pages. Here is one...
http://blog.wired.com/monkeybites/2007/11/tips-and-tricks.html
I have a macbook pro and am running django w/ mod_python and the built
in apache2 and mysql.

luxagraf

unread,
Jan 19, 2008, 1:30:28 PM1/19/08
to django...@googlegroups.com
Since I wrote that little guide Heather links to, I should point out
that while the mod_python bit works fine, the real problem on a
macbook with Leopard installed ends up being mysqldb (see
<http://www.djangoproject.com/documentation/install/>). I never have
been able to successful compile a version of mysqldb that would work
with Leopard's default Apache and MySQL.

In the end I wanted to mirror my remote production setup as closely a
possible so I went ahead and installed my own Apache2, python 2.4 and
the rest (OS X 10.5 comes with python 2.5, which can cause problems
when your production environment is python2.4).

But if you have any questions, feel free to e-mail me.

cheers
sng
<http://luxagraf.net/>

John M

unread,
Jan 19, 2008, 1:53:20 PM1/19/08
to Django users
sng, Thank you for the offer. Thats a great idea, and one I will
probably purse, and if I have any issues, I'll post them here, but
thanks for the phone offer, thats is most generous.

John

Anton P. Linevich

unread,
Jan 20, 2008, 9:16:53 AM1/20/08
to django...@googlegroups.com
Greeting, John! Fri, Jan 18, 2008 at 11:29:38AM -0800, retireoncsco wrote:

>
> Anton, that was sort of my question, how do I complete your second
> idea but w/o the recompile. The mac already comes with apache 2
> installed and running rather well, how hard would it be to add
> mod_python or mod_wsgi to that environment?

Well, this is not hard, but as many of django-users@ sayed, better use
that already builded and supporting by others. There is mod_cgi module
from the box in MacOS Tiger/Leo. Instructions how to use mod_cgi with
django availiable in django-docs. Good luck!

--
Anton P. Linevich

Reply all
Reply to author
Forward
0 new messages