From owner-freebsd-questions@FreeBSD.ORG Wed Sep 17 15:47:57 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CC611065678 for ; Wed, 17 Sep 2008 15:47:57 +0000 (UTC) (envelope-from freebsd@optiksecurite.com) Received: from relais.videotron.ca (relais.videotron.ca [24.201.245.36]) by mx1.freebsd.org (Postfix) with ESMTP id 52FB48FC21 for ; Wed, 17 Sep 2008 15:47:57 +0000 (UTC) (envelope-from freebsd@optiksecurite.com) MIME-version: 1.0 Content-transfer-encoding: 8BIT Content-type: text/plain; charset=ISO-8859-1; format=flowed Received: from [192.168.10.102] ([74.56.107.65]) by VL-MO-MR005.ip.videotron.ca (Sun Java(tm) System Messaging Server 6.3-4.01 (built Aug 3 2007; 32bit)) with ESMTP id <0K7C00HPEH2WPQH0@VL-MO-MR005.ip.videotron.ca> for freebsd-questions@freebsd.org; Wed, 17 Sep 2008 10:47:21 -0400 (EDT) Message-id: <48D1189D.5010803@optiksecurite.com> Date: Wed, 17 Sep 2008 10:47:57 -0400 From: FreeBSD User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) To: Matthew Seaman References: <48CFEC4B.1080009@optiksecurite.com> <48D003E9.8070801@infracaninophile.co.uk> In-reply-to: <48D003E9.8070801@infracaninophile.co.uk> Cc: freebsd-questions@freebsd.org Subject: Re: Multiple installation of one ports X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Sep 2008 15:47:57 -0000 Matthew Seaman a écrit : > FreeBSD wrote: >> Hi everyone, >> >> I've been asked by a customer to install Drupal on one server to >> manage a new site. No problem yet. But, he also asked if it would be >> possible to install it for other sites. >> >> I know that there is a warning if you want to install a port that is >> already installed, but is there a way to bypass this? I know I could >> install it from the tarball from the website, but I want to be able >> to use portupgrade and portaudit to deal with it. >> >> Any suggestions? > > This is an interesting problem. The FreeBSD ports system does not at > present allow multiple installations of the same port, even into > different ${PREFIX}es. This make sense for most of the software dealt > with by the ports system, but in the specific case of web based > applications having the same application installed into multiple > locations > in the same web tree is a perfectly reasonable thing to want to do. > > Here are some ideas as to ways you might consider for working round the > problem and still being able to use the ports system in the usual way. > None of these are tested by me in any way, and some of them may not > actually work. > > i) If you have spare IPs available, simply set up jails to run > second and subsequent instances of drupal and apache. This is > pretty much overkill but it's a tried and tested strategy and > should be reliable. > The downside is you need to install at least enough of a system in > each jail to support running apache, etc. plus you have to maintain > each of the different jail environments separately. > > ii) If you haven't any spare IPs, you can install multiple copies of > the same port on the same machine by changing *both* $PKG_DBDIR > and $PREFIX in the environment to distinct values for each copy. > Unfortunately changing $PREFIX doesn't give you complete freedom > to choose where a web app will be installed -- typically a web app > will be located at ${PREFIX}/www/app-name. However by judicious > use of the Alias directive in httpd.conf you can make all those > different directories appear in the same web tree. Like option > (i) you've still got multiple copies of ports to maintain, although > in this case, it's only the drupal port and anything that depends > on drupal that you need multiple copies of, rather than the entire > installation tree of ports. > > iii) A kind of wacky idea this, and it will only work for web apps whose > configuration files are contained within the web root. That's > true of most PHP based web apps -- other languages may differ. > Install the port once only, in the normal fashion. Then create > loopback mounts of the application directory multiple time, each to > a union fs (see mount_unionfs(8)) where you superpose a separate > layer to contain just the configuration files for that instance. > It's conceptually complicated, but all the work should be at the > setup stage and after that, there's only one instance of your web > app to keep properly maintained. > > iv) I've no idea if this is at all possible with Drupal, but really > the absolute easiest solution is to choose a CMS that lets you > manage several different web sites (virtual hosts, web trees, what > you will) within the same instance. > Cheers, > > Matthew > > As usual, a very complete answer! Every time I see your name, I'm sure to find a clear and pertinent answer. Thanks for your support to the community. As you outlined in your fourth possibility, I will go with the easiest solution. For web-based apps, I will install them directly, without using the ports if I have to run multiple instance of the same app. In this case, Drupal supports multiple sites so that's not a problem, but I heard that Joomla didn't support this. Thank you and to everyone else that replied, Martin