Alexis Dorais-Joncas wrote: > Hi all, > > 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? > > I'm using FreeBSD g-noc.net 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Thu > Nov 3 09:36:13 UTC 2005 > [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC i386 with ports > updated daily with cvsup. > > Right now, after I do : > cd /usr/ports/databases/phpmyadmin > sudo make PREFIX=/xxx/yyy install > > I get : > pkg_info|grep Admin > phpMyAdmin-220.127.116.11 A set of PHP-scripts to manage MySQL over the web > > And when I try to install it again but using a different PREFIX, I get > this : > ===> Checking if databases/phpmyadmin already installed > ===> phpMyAdmin-18.104.22.168 is already installed > You may wish to ``make deinstall'' and install this port again > > 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 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 -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW
Description: OpenPGP digital signature