From owner-freebsd-questions@FreeBSD.ORG Tue Sep 16 19:07:40 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 846FA1065673 for ; Tue, 16 Sep 2008 19:07:40 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (gate6.infracaninophile.co.uk [IPv6:2001:8b0:151:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id DC12F8FC1A for ; Tue, 16 Sep 2008 19:07:39 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.3/8.14.3) with ESMTP id m8GJ7Rxx064730; Tue, 16 Sep 2008 20:07:33 +0100 (BST) (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: Sendmail DKIM Filter v2.7.1 smtp.infracaninophile.co.uk m8GJ7Rxx064730 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infracaninophile.co.uk; s=200708; t=1221592053; bh=g0KHaAaa9Gzlpz NCAzkvSMfYMg+vngp0DRUa+bilCV4=; h=Message-ID:Date:From:MIME-Version: To:CC:Subject:References:In-Reply-To:Content-Type:Cc:Content-Type: Date:From:In-Reply-To:Message-ID:Mime-Version:References:To; z=Mes sage-ID:=20<48D003E9.8070801@infracaninophile.co.uk>|Date:=20Tue,=2 016=20Sep=202008=2020:07:21=20+0100|From:=20Matthew=20Seaman=20|Organization:=20Infracaninophile|User -Agent:=20Thunderbird=202.0.0.16=20(X11/20080726)|MIME-Version:=201 .0|To:=20FreeBSD=20|CC:=20freebsd-questi ons@freebsd.org|Subject:=20Re:=20Multiple=20installation=20of=20one =20ports|References:=20<48CFEC4B.1080009@optiksecurite.com>|In-Repl y-To:=20<48CFEC4B.1080009@optiksecurite.com>|X-Enigmail-Version:=20 0.95.6|Content-Type:=20multipart/signed=3B=20micalg=3Dpgp-sha256=3B =0D=0A=20protocol=3D"application/pgp-signature"=3B=0D=0A=20boundary =3D"------------enig032A6FB177387047C39709D3"; b=m5pEin9OG4TA41/ctz RzomM7i9pgQILa8K3xruiqY+0P9hgYpRHmRCP5uTWbH+nnlq3D0Cm0Jf0ewk5DVJIZJ LC6Z7KkRdtHtcGq5Mpl46MdEAk53Bsf/ibK7GfnnzQ7h1zopGelfUdonv93nr8pBRYm 98oKw8HNjqc2wJ1FYNA= Message-ID: <48D003E9.8070801@infracaninophile.co.uk> Date: Tue, 16 Sep 2008 20:07:21 +0100 From: Matthew Seaman Organization: Infracaninophile User-Agent: Thunderbird 2.0.0.16 (X11/20080726) MIME-Version: 1.0 To: FreeBSD References: <48CFEC4B.1080009@optiksecurite.com> In-Reply-To: <48CFEC4B.1080009@optiksecurite.com> X-Enigmail-Version: 0.95.6 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig032A6FB177387047C39709D3" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (smtp.infracaninophile.co.uk [IPv6:::1]); Tue, 16 Sep 2008 20:07:33 +0100 (BST) X-Virus-Scanned: ClamAV 0.93.3/8264/Tue Sep 16 19:01:22 2008 on happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VERIFIED,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on happy-idiot-talk.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: Tue, 16 Sep 2008 19:07:40 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig032A6FB177387047C39709D3 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable FreeBSD wrote: > Hi everyone, >=20 > I've been asked by a customer to install Drupal on one server to manage= =20 > a new site. No problem yet. But, he also asked if it would be possible = > to install it for other sites. >=20 > I know that there is a warning if you want to install a port that is=20 > already installed, but is there a way to bypass this? I know I could=20 > install it from the tarball from the website, but I want to be able to = > use portupgrade and portaudit to deal with it. >=20 > 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 location= s 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 = =20 and subsequent instances of drupal and apache. This is pretty much = overkill but it's a tried and tested strategy and should be reliable= =2E 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. =20 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 = =20 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=20 several different web sites (virtual hosts, web trees, what you will= )=20 within the same instance. =20 Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enig032A6FB177387047C39709D3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREIAAYFAkjQA+8ACgkQ8Mjk52CukIxtiQCfUo6157zDfAhBfc5ZWg/h60yn NCIAn01Mz9FITn6pJHxcNqBUhZ7XnxrF =yIrF -----END PGP SIGNATURE----- --------------enig032A6FB177387047C39709D3--