On Fri, Jan 15, 2010 at 02:20:06PM +0000, mog wrote: > On 15/01/2010 11:57, Graham Dumpleton wrote: >> I have a FreeBSD 7.2 image installed under VmWare and think I have >> ports installed. >> >> How do I install mod_wsgi 2.8/3.1 ports given that they aren't in >> standard ports tree, plus, even the ones at freshports are setup for >> Apache 1.3 and not Apache 2.2.
Actually those ports specify USE_APACHE=1.3+. Which means they require an Apache version of 1.3 or more recent to be built. If you make sure to install Apache 2.2 (www/apache22 port) *before* building mod_wsgi the dependency resolver will be happy and won't force www/apache13 on you. As for getting the most recent ports tree, mog's advice below is similar to what I'd give you. >> http://www.freshports.org/www/mod_wsgi/ >> http://www.freshports.org/www/mod_wsgi3/ >> >> I have never installed FreeBSD before or used ports, so good >> instructions for getting Apache 2.2 and newest mod_wsgi versions >> installed from ports appreciated. > > The system I was using to get things working on to begin with runs > FreeBSD 7.2 (amd64), then the machine I built a jail on for a clean > testing environment is running FreeBSD 7.2 (i386). FreeBSD 7.2 is the "legacy" production release. FreeBSD 8.0 is the current production release (not to be confused with FreeBSD-CURRENT, which is a development trunk). > First you need to make sure your ports tree is present and > up-to-date. For most people, the best way to do this is using > portsnap(8). To run portsnap for the first time, you need to use the > following commands: > > portsnap fetch > portsnap extract > > Naturally the first time portsnap runs, it has quite a lot of work > to do, so it may take a while. Future updates should happen quicker > and can be performed just by issuing the 'portsnap fetch update' > command. For more information on portsnap you may wish to check out > the handbook page: > > http://www.freebsd.org/doc/en/books/handbook/portsnap.html > > Once the ports tree is updated, you can start installing things. > Personally, I'm using perl-5.10 at the moment (and Apache will want > it) so I like to install it first to get it out the way. If another > port has already installed a different version, it probably doesn't > matter for what you're doing. > > To install perl I do: > > /usr/ports/lang/perl5.10 && make install clean > > A number of ports will display an Options menu when you go to > install them. This is just a simple list of checkbox options that > can allow you to tweak common configure/build options the port uses > in a user-friendly manner. For most ports you'll usually find that > the default Options settings are fine. > > As you'd expect, the ports system will automatically install any > dependencies required by the port you are trying to install, so > don't be surprised if it shows you an Options menu for something > else at some point. > > Next you might like to install Python. You can do this like so: > > cd /usr/ports/lang/python26 && make install clean > > Then Apache: > > cd /usr/ports/www/apache22 && make install clean > > Then mod_wsgi 2.x: > > cd /usr/ports/www/mod_wsgi && make install clean > > Or for mod_wsgi 3.x use: > > cd /usr/ports/www/mod_wsgi3 && make install clean Actually if you don't care for using specific versions you can just start install the www/apache22 port first, then the www/mod_wsgi or www/mod_wsgi second (and last). The ports system is capable enough to pull in all required dependencies. For Python, lang/python26 is already the default used (if you don't explicitly use another version). I'm not sure about Perl though. One thing I'd do as well is use 'make config-recursive install clean', the config-recursive target will make sure that all build configuration questions will be asked *before* it starts building (ensuring that the build process won't pause waiting for user input). > Note that the ports system (quite sensibly) will not allow you to > have both of these installed at the same time. To install a > different version, you must first remove the version currently > installed. For example, you might remove mod_wsgi like this. > > pkg_info | grep mod_wsgi > mod_wsgi-3.1 Python WSGI adapter module for Apache > > pkg_delete mod_wsgi-3.1 > > The pkg_info(1) command simply generates a list of all currently > installed ports / packages. Then the pkg_delete(1) command will > delete whatever port / package you tell it to. > > Once installed, you'll find your Apache configuration files located in: > > /usr/local/etc/apache22/ > > Note that the mod_wsgi ports will automatically add the LoadModule > directive into your httpd.conf for you. But it always makes sense to > check through it all anyway just in case. > > You can let FreeBSD's rc.d help you manage the starting and stopping > of Apache. Doing these commands as root will also tell Apache to > start when your system boots up: > > echo 'apache22_enable="YES"' >> /etc/rc.conf > echo 'apache22_http_accept_enable="YES"' >> /etc/rc.conf The first (enable) directive is required for the rc.d script (below) to work at all. At system bootup time something like this piece of shell code is ran: > for rcscript in /etc/rc.d/* /usr/local/etc/rc.d > do > $rcscript start > done All those scripts (indirectly) include /etc/rc.conf, that's how they determine whether to start the pieces of software for real. > And then use the rc.d control script to start Apache: > > /usr/local/etc/rc.d/apache22 start > /usr/local/etc/rc.d/apache22 stop > /usr/local/etc/rc.d/apache22 graceful > etc > Do '/usr/local/etc/rc.d/apache22' with no arguments for a list of > available options. -- With kind regards, Giel van Schijndel - Interlink <www.il.fontys.nl>
signature.asc
Description: Digital signature
