Webapp-Config: Difference between revisions

From Research
Jump to navigation Jump to search
No edit summary
Line 34: Line 34:
  <font color=red>hostname</font> <font color=blue>~ #</font> '''webapp-config -I -h localhost -d /gallery  gallery 2.2.3'''
  <font color=red>hostname</font> <font color=blue>~ #</font> '''webapp-config -I -h localhost -d /gallery  gallery 2.2.3'''
  <font color=red>hostname</font> <font color=blue>~ #</font> '''webapp-config -I -h localhost -d /awstats awstats 6.5-r1'''
  <font color=red>hostname</font> <font color=blue>~ #</font> '''webapp-config -I -h localhost -d /awstats awstats 6.5-r1'''
 
<font color=red>hostname</font> <font color=blue>~ #</font> '''webapp-config -I -h localhost -d /apcupsd apcupsd 3.12.4'''


== Upgrading Installed Applications ==
== Upgrading Installed Applications ==

Revision as of 17:21, 4 December 2008

Under Gentoo, installing a typical web application is actually a two-step process:

  • you emerge the application, which typically installs the app under /usr/share/webapps/<pkg_name>
  • you then perform a second-stage installation to your web-server doc-root, using webapp-config


Why? To support virtual-hosting, and multiple sites being served from a given host, where they may each require different package-versions.

QuickStart for Impatient People

  • Install webapp-config:
hostname ~ # emerge -v webapp-config
  • Install your desired package onto your system; we'll use awstats as an example here:
hostname ~ # emerge -v awstats
  • Secondarily-install your package onto the webserver's root:
hostname ~ # webapp-config -I -h localhost -d /awstats awstats 6.7-r2
  • configure the package, as necessary.
  • Restart your web-server:
hostname ~ # /etc/init.d/apache2 restart


Setting up Webapp-Config

First, we have the configuration-file /etc/vhosts/webapp-config, which lets us specify the vhost-root (often simply /var/www/<hostname>, but sometimes /srv/www/<hostname>. The localhost will be different in the case where we actually use vhosts, which isn't too common for us; we tend to prefer individual, dedicated vserver-guests, with single-site web-serving in each).

Typical settings within the /etc/vhosts/webapp-config file:

vhost_root="/var/www/${vhost_hostname}"
vhost_hostname="localhost"
vhost_server="apache"


Installing Applications

These commands will install apps under /var/www/localhost/htdocs/<pkg_name>, with the specific version mentioned at the end of command-line:

hostname ~ # webapp-config -I -h localhost -d /mediawiki  mediawiki 1.8.5
hostname ~ # webapp-config -I -h localhost -d /gallery  gallery 2.2.3
hostname ~ # webapp-config -I -h localhost -d /awstats awstats 6.5-r1
hostname ~ # webapp-config -I -h localhost -d /apcupsd apcupsd 3.12.4

Upgrading Installed Applications

Commands to upgrade (typical):

hostname ~ # webapp-config -U -d /gallery  gallery 2.2.5
hostname ~ # webapp-config -U -d /mediawiki mediawiki 1.11.2
hostname ~ # webapp-config -U -d /awstats awstats 6.7-r2


Other webapp-config Commands

hostname ~ # webapp-config --list-installs  can optionally follow this with <pkg_name>, or <pkg_name pkg_version>
hostname ~ # webapp-config --list-unused-installs can optionally follow this with <pkg_name>, or <pkg_name pkg_version>