Date: Tue, 16 Sep 2008 20:07:21 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: FreeBSD <freebsd@optiksecurite.com> Cc: freebsd-questions@freebsd.org Subject: Re: Multiple installation of one ports Message-ID: <48D003E9.8070801@infracaninophile.co.uk> In-Reply-To: <48CFEC4B.1080009@optiksecurite.com> References: <48CFEC4B.1080009@optiksecurite.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48D003E9.8070801>