Re: Multiple installation of one ports
On Wednesday 17 September 2008 16:55:46 FreeBSD wrote: John Nielsen a écrit : On Tuesday 16 September 2008 01:26:35 pm FreeBSD wrote: 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. I've done this in the past with Gallery and it looks like Drupal should be workable too. The thing to do is to make either a clone port or a slave port of the original and tweak a few things. In particular you'll want to add some sort of suffix to the port name and change the installation directory. For example, you could make a directory called ports/www/drupal6-customer and drop this in its Makefile: PKGNAMESUFFIX=-${CUSTNAME} DRUPAL_BASE=drupal6-${CUSTNAME} .include ../drupal6/Makefile You could then do things like # cd /usr/ports/www/drupal6-customer # make CUSTNAME=foo install clean # make CUSTNAME=bar install clean which would (with any luck) create independent installations of drupal under /usr/local/www/drupal6-foo and /usr/local/www/drupal6-bar. Or if you didn't want to worry about defining CUSTNAME all the time (or the desired name/location won't follow a predictable pattern) you could make a different slave port for each installation and hard-code the two values. I haven't tested any of this other than some quick verification of variables using make -V. HTH. If you have specific questions about port mechanics the ports@ list might be the best place to ask. See also the Porter's Handbook: http://www.freebsd.org/doc/en/books/porters-handbook/ JN That's a pretty interesting idea...I'll keep it in the back of my head. Good idea, but it's better to create your own 'local' ports outside of the standard hierarchy. For example, my own local ports reside in ${PORTSDIR}/local. It needs one tweak in /etc/make.conf: VALID_CATEORIES=local The reason it's 'better', is that you can maintain them in your own repository and it's easier to make a tarball of all your local ports, rather then have them scattered over different categories. -- Mel Problem with today's modular software: they start with the modules and never get to the software part. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Multiple installation of one ports
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 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Multiple installation of one ports
John Nielsen a écrit : On Tuesday 16 September 2008 01:26:35 pm FreeBSD wrote: 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. I've done this in the past with Gallery and it looks like Drupal should be workable too. The thing to do is to make either a clone port or a slave port of the original and tweak a few things. In particular you'll want to add some sort of suffix to the port name and change the installation directory. For example, you could make a directory called ports/www/drupal6-customer and drop this in its Makefile: PKGNAMESUFFIX=-${CUSTNAME} DRUPAL_BASE=drupal6-${CUSTNAME} .include ../drupal6/Makefile You could then do things like # cd /usr/ports/www/drupal6-customer # make CUSTNAME=foo install clean # make CUSTNAME=bar install clean which would (with any luck) create independent installations of drupal under /usr/local/www/drupal6-foo and /usr/local/www/drupal6-bar. Or if you didn't want to worry about defining CUSTNAME all the time (or the desired name/location won't follow a predictable pattern) you could make a different slave port for each installation and hard-code the two values. I haven't tested any of this other than some quick verification of variables using make -V. HTH. If you have specific questions about port mechanics the ports@ list might be the best place to ask. See also the Porter's Handbook: http://www.freebsd.org/doc/en/books/porters-handbook/ JN That's a pretty interesting idea...I'll keep it in the back of my head. Thanks, Martin ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Multiple installation of one ports
Hi Martin, You want to install multiple sites on one server or multiple servers? If the former, there is a solution for you at: http://drupal.org/getting-started/6/install/multi-site I have yet to try this, but will likely give it a shot some day... If the latter, are your other systems FreeBSD? If so, (and forgive me if I'm telling you something you already know) you simply need to run portupgrade/portaudit on those systems. If, for example, it's some Linux distrobution, see if it has a package management software that will handle installing and upgrading Drupal. In all cases, portupgrade will not do everything for you. You still may have to run update.php sometimes if a particular update needs to have databases changes. Genuinely hope this helps! :) Gavin Spomer Systems Programmer Brooks Library Central Washington University FreeBSD [EMAIL PROTECTED] 09/16/08 10:31 AM 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? Thank you for your time, Martin ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Multiple installation of one ports
Gavin Spomer a écrit : Hi Martin, You want to install multiple sites on one server or multiple servers? One server only If the former, there is a solution for you at: http://drupal.org/getting-started/6/install/multi-site That would solve my problem in that case... I have yet to try this, but will likely give it a shot some day... If the latter, are your other systems FreeBSD? If so, (and forgive me if I'm telling you something you already know) you simply need to run portupgrade/portaudit on those systems. If, for example, it's some Linux distrobution, see if it has a package management software that will handle installing and upgrading Drupal. In all cases, portupgrade will not do everything for you. You still may have to run update.php sometimes if a particular update needs to have databases changes. Ok but my question was more focusing on the handling of multiple installation of the same port by portupgrade. If it's possible to install the same port multiple times, how is portupgrade going to deal with this? Thanks for your response! Martin Genuinely hope this helps! :) Gavin Spomer Systems Programmer Brooks Library Central Washington University FreeBSD [EMAIL PROTECTED] 09/16/08 10:31 AM 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? Thank you for your time, Martin ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Multiple installation of one ports
On Tue, 16 Sep 2008 14:18:54 -0400, FreeBSD [EMAIL PROTECTED] wrote: Ok but my question was more focusing on the handling of multiple installation of the same port by portupgrade. If it's possible to install the same port multiple times, how is portupgrade going to deal with this? It's possible to install the same port into differenz directories using a different prefix. Usually, ports are installed into /usr/local, including the proper subtrees, such as bin/, lib/ or share/. NB that it may happen that by forcing another prefix than /usr/local results in programs using the wrong libs. Furthermore, you need to specify a different bin/ path to run the application. Another option would be jails - each port installed and running in its own jail at the internal standard locations. But as you may see and already know, it's a bit complicated. :-) -- Polytropon From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Multiple installation of one ports
FreeBSD [EMAIL PROTECTED] 09/16/08 11:19 AM Ok but my question was more focusing on the handling of multiple install the same port multiple times, how is portupgrade going to deal with this? Thanks for your response! Martin I'm *somewhat* of a FreeBSD newb, but I don't think you can do multiple installs of the same port... can you? I'd like to know. If not, then the multi-site method outlined at the Drupal site is what you want. That method uses the same files (not another instance of each file) for every Drupal site. For example, if you have 3 Drupal sites running on the same server, they all use the same index.php file. So when you do a portupgrade of Drupal, then all three of your Drupal sites will be upgraded at once. Let me know if this doesn't make sense. - Gavin ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Multiple installation of one ports
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 -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW signature.asc Description: OpenPGP digital signature
Re: Multiple installation of one ports
Matthew Seaman wrote: 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 What I do with webapps from ports is install them once, then copy them to each of the customers that wants them. It's not a perfect solution, but for a webapp what I care about for the ports is dependency tracking, and portaudit. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Multiple installation of one ports
On Tuesday 16 September 2008 01:26:35 pm FreeBSD wrote: 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. I've done this in the past with Gallery and it looks like Drupal should be workable too. The thing to do is to make either a clone port or a slave port of the original and tweak a few things. In particular you'll want to add some sort of suffix to the port name and change the installation directory. For example, you could make a directory called ports/www/drupal6-customer and drop this in its Makefile: PKGNAMESUFFIX=-${CUSTNAME} DRUPAL_BASE=drupal6-${CUSTNAME} .include ../drupal6/Makefile You could then do things like # cd /usr/ports/www/drupal6-customer # make CUSTNAME=foo install clean # make CUSTNAME=bar install clean which would (with any luck) create independent installations of drupal under /usr/local/www/drupal6-foo and /usr/local/www/drupal6-bar. Or if you didn't want to worry about defining CUSTNAME all the time (or the desired name/location won't follow a predictable pattern) you could make a different slave port for each installation and hard-code the two values. I haven't tested any of this other than some quick verification of variables using make -V. HTH. If you have specific questions about port mechanics the ports@ list might be the best place to ask. See also the Porter's Handbook: http://www.freebsd.org/doc/en/books/porters-handbook/ JN ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]