installing web2py on Ubuntu

1,914 views
Skip to first unread message

Massimo Di Pierro

unread,
Nov 9, 2009, 5:52:23 PM11/9/09
to web...@googlegroups.com
If you have sudo access to a fresh ubuntu install just run this script

sudo setup-web2py.sh

and it will:
1) install a bunch of packages you need including ssh, emacs, apache2,
python2.5, postgresql
2) download and start web2py on port 8123 as user www-data
3) configure apache to prosy web2py and restarts apache
4) go to

http://hostname/welcome

setup-web2py.sh

salingrosso

unread,
Nov 10, 2009, 5:44:47 AM11/10/09
to web...@googlegroups.com
I've installed web2py on "arch linux" and I only needed to download
web2py. It was really really easy... :-) I think that Python is already included
on default installation of Ubuntu.  This script could be interesting
because, as I see, it install and configure Apache. You think that
this configuration could be good also on production server?

2009/11/9 Massimo Di Pierro <MDiP...@cs.depaul.edu>

mdipierro

unread,
Nov 10, 2009, 9:46:35 AM11/10/09
to web2py-users
That is similar the configuration I use. Ideally one should use
mod_wsgi on production but I would not know how to automate its
installation.

I am sure the script can be improved.

On Nov 10, 4:44 am, salingrosso <salingro...@gmail.com> wrote:
> I've installed web2py on "arch linux" and I only needed to download
> web2py. It was really really easy... :-) I think that Python is already
> included
> on default installation of Ubuntu.  This script could be interesting
> because, as I see, it install and configure Apache. You think that
> this configuration could be good also on production server?
>
> 2009/11/9 Massimo Di Pierro <MDiPie...@cs.depaul.edu>

salingrosso

unread,
Nov 10, 2009, 10:37:48 AM11/10/09
to web...@googlegroups.com
If we add: libapache2-mod-wsgi ?

2009/11/10 mdipierro <mdip...@cs.depaul.edu>

mdipierro

unread,
Nov 10, 2009, 11:11:29 AM11/10/09
to web2py-users
Can you do it and email me the script?

On Nov 10, 9:37 am, salingrosso <salingro...@gmail.com> wrote:
> If we add: libapache2-mod-wsgi ?
>
> 2009/11/10 mdipierro <mdipie...@cs.depaul.edu>

salingrosso

unread,
Nov 10, 2009, 11:32:22 AM11/10/09
to web...@googlegroups.com
This is the script, I've only added libapache2-mod-wsgi, now I'm trying to execute the script
in my secondary pc.
But: why do you install python 2.5 and not the default 2.6?

2009/11/10 mdipierro <mdip...@cs.depaul.edu>
setup-web2py.sh

salingrosso

unread,
Nov 10, 2009, 11:34:37 AM11/10/09
to web...@googlegroups.com
I think that we can improve the script so that the user could choose the database to install.

2009/11/10 salingrosso <salin...@gmail.com>

Thadeus Burgess

unread,
Nov 10, 2009, 12:08:29 PM11/10/09
to web...@googlegroups.com
Also this script does nothing to configure postgres with users/permissions. So that will still need to be done

It can be added if the script can su to postgres user.

-Thadeus

mdipierro

unread,
Nov 10, 2009, 12:21:53 PM11/10/09
to web2py-users
The script is supposed to be run as root so, it should have to problem
to sudo postgres

On Nov 10, 11:08 am, Thadeus Burgess <thade...@thadeusb.com> wrote:
> Also this script does nothing to configure postgres with users/permissions.
> So that will still need to be done
>
> It can be added if the script can su to postgres user.
>
> -Thadeus
>
> On Tue, Nov 10, 2009 at 10:34 AM, salingrosso <salingro...@gmail.com> wrote:
> > I think that we can improve the script so that the user could choose the
> > database to install.
>
> > 2009/11/10 salingrosso <salingro...@gmail.com>
>
> > This is the script, I've only added libapache2-mod-wsgi, now I'm trying to
> >> execute the script
> >> in my secondary pc.
> >> But: why do you install python 2.5 and not the default 2.6?
>
> >> 2009/11/10 mdipierro <mdipie...@cs.depaul.edu>

mdipierro

unread,
Nov 10, 2009, 12:22:12 PM11/10/09
to web2py-users
It should also configure ssl certificates.

On Nov 10, 11:08 am, Thadeus Burgess <thade...@thadeusb.com> wrote:
> Also this script does nothing to configure postgres with users/permissions.
> So that will still need to be done
>
> It can be added if the script can su to postgres user.
>
> -Thadeus
>
> On Tue, Nov 10, 2009 at 10:34 AM, salingrosso <salingro...@gmail.com> wrote:
> > I think that we can improve the script so that the user could choose the
> > database to install.
>
> > 2009/11/10 salingrosso <salingro...@gmail.com>
>
> > This is the script, I've only added libapache2-mod-wsgi, now I'm trying to
> >> execute the script
> >> in my secondary pc.
> >> But: why do you install python 2.5 and not the default 2.6?
>
> >> 2009/11/10 mdipierro <mdipie...@cs.depaul.edu>

salingrosso

unread,
Nov 10, 2009, 12:30:11 PM11/10/09
to web...@googlegroups.com
The server works! But how can I verify if it run with wsgi? And how can I
access to the admin? Maybe that SSL doesn't work?


2009/11/10 mdipierro <mdip...@cs.depaul.edu>

mdipierro

unread,
Nov 10, 2009, 12:32:45 PM11/10/09
to web2py-users
the script I sent does not use mod_wsgi and does not setup ssl.
I just said it should do those does things but it does not now.

On Nov 10, 11:30 am, salingrosso <salingro...@gmail.com> wrote:
> The server works! But how can I verify if it run with wsgi? And how can I
> access to the admin? Maybe that SSL doesn't work?
>
> 2009/11/10 mdipierro <mdipie...@cs.depaul.edu>

salingrosso

unread,
Nov 10, 2009, 12:37:16 PM11/10/09
to web...@googlegroups.com
I've tried the version that install wsgi, the one that I've send
to you. You should try it. So this script install a server ready
for web2py but without admin. I think this solution is better
for production environments!
The best should be a script that is distro agnostic and install
everything from source, and that let you choose the database engine.
I'm not enough expert of bash to make it but I could try.


2009/11/10 mdipierro <mdip...@cs.depaul.edu>

Thadeus Burgess

unread,
Nov 10, 2009, 1:00:55 PM11/10/09
to web...@googlegroups.com
Source installations are still prone to distro-specific problems. It is best to just create an install script for each distro..

Or better yet, create .deb/.rpm/.pacman/.portage packages for web2py that can do all of this :)

-Thadeus

mdipierro

unread,
Nov 10, 2009, 1:38:54 PM11/10/09
to web2py-users
I have not got it.

On Nov 10, 11:37 am, salingrosso <salingro...@gmail.com> wrote:
> I've tried the version that install wsgi, the one that I've send
> to you. You should try it. So this script install a server ready
> for web2py but without admin. I think this solution is better
> for production environments!
> The best should be a script that is distro agnostic and install
> everything from source, and that let you choose the database engine.
> I'm not enough expert of bash to make it but I could try.
>
> 2009/11/10 mdipierro <mdipie...@cs.depaul.edu>

Jim

unread,
Nov 10, 2009, 2:31:38 PM11/10/09
to web2py-users
Google App Engine requires 2.5

I'm sure web2py will work with just 2.6 installed if it really bothers
somebody to install 2.5

mdipierro

unread,
Nov 10, 2009, 2:57:17 PM11/10/09
to web2py-users
I have had problems with running GAE dev_appserver and Python 2.6 (do
not remember what they were and I was using stackless 2.6).
Works fine with 2.5 of course.

Timbo

unread,
Nov 10, 2009, 3:42:48 PM11/10/09
to web2py-users
That's so cool...but why so many unnecessary packages?

mc, g++, emacs, ssh, build_essential, zip, unzip, openssh-server,
postfix ???

Many of these are great packages and necessary for a well-run server
(except emacs, build_essential, g++), but do they belong in a web2py
install script?

My take is don't include:
- emacs because it furthers a religious debate
- g++ and build_essential because the script doesn't build anything
and you don't need built tools to run web2py and build tools can be
considered bad on a production box

-tim
>  setup-web2py.sh
> 2KViewDownload

mdipierro

unread,
Nov 10, 2009, 4:04:34 PM11/10/09
to web2py-users
True. I was sharing the script I use.
Reply all
Reply to author
Forward
0 new messages