Date: Fri, 08 Dec 2006 22:15:12 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Alexis Dorais-Joncas <mailinglists+freebsd-questions@g-noc.net> Cc: freebsd-questions@freebsd.org Subject: Re: How to install the same port twice but at different locations? Message-ID: <4579E3F0.1070907@infracaninophile.co.uk> In-Reply-To: <4579C3D8.4050307@g-noc.net> References: <4579C3D8.4050307@g-noc.net>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig06E2F2E044AE2C5E16738177 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Alexis Dorais-Joncas wrote: > Hi all, >=20 > Subject says it all. I would like to install the package phpMyAdmin on > two different locations on my server. Is this doable? If so, how? >=20 > I'm using FreeBSD g-noc.net 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Thu > Nov 3 09:36:13 UTC 2005 =20 > root@x64.samsco.home:/usr/obj/usr/src/sys/GENERIC i386 with ports > updated daily with cvsup. >=20 > Right now, after I do : > cd /usr/ports/databases/phpmyadmin > sudo make PREFIX=3D/xxx/yyy install >=20 > I get : > pkg_info|grep Admin > phpMyAdmin-2.9.1.1 A set of PHP-scripts to manage MySQL over the web >=20 > And when I try to install it again but using a different PREFIX, I get > this : > =3D=3D=3D> Checking if databases/phpmyadmin already installed > =3D=3D=3D> phpMyAdmin-2.9.1.1 is already installed > You may wish to ``make deinstall'' and install this port again >=20 > Using FORCE_PKG_REGISTER unregisters the first installation, so its no > good for this I guess. The problem is not so much installing the PHP code in two different locations, which you can do quite simply by playing with the PREFIX settings, but trying to register the same thing two times in the package DB. Hmmm... The only way I can see to deal with this is to use a separate package database for the second installation. Something like: setenv PREFIX /some/where/else setenv PKG_DBDIR /var/db/pkg-some-where-else mkdir -p /var/db/pkg-some-where-else cd /usr/ports/databases/phpMyAdmin make install Note: this install will find and use all of the dependencies installed to support the first instance of phpMyAdmin. If you're doing multiple=20 installs to support using phpMyAdmin in a jail then there are better methods. Probably the most conceptually simple method is to null-mount /usr/ports under your jail directory, then log into the jail and work inside it. However that does require having a 'fat' jail with a complete= system environment inside it. This is the functionality that DESTDIR was invented to support (ie. installing in a location that is different to the way the location will appear in use) -- unfortunately DESTDIR support is being reworked and isn't fully available yet. 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 --------------enig06E2F2E044AE2C5E16738177 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFeeP18Mjk52CukIwRCKo8AJ95jSfr8x6E91wSblZkSzm5RG4vtACfYu7M MAkPQ9Bu8TJscjpO4hXVLpQ= =fGZG -----END PGP SIGNATURE----- --------------enig06E2F2E044AE2C5E16738177--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4579E3F0.1070907>