Installation & Security HOWTO
Installation & Security HOWTO

## Download and unpack

There are a few ways to get phpgw, the released tarball from download.phpgroupware.org/now home page, CVS StableBranch and HEAD branches, and most GNU/Linux distros come with a package. It is not recommended to use a distro package because it is almost always out of date and will have bugs due to phpgw still being a BETA project. We will cover installation of a release tarball of 0.9.16.001 and a cvs update to get all the latest patches committed to the stable cvs tree. The cvs update is optional but to do it you only need the cvs client installed, most GNU/Linux distributions come with one, and internet access from the server.

Grab your preferred packaged format (tar.gz, tar.bz2, or zip) from download.phpgroupware.org/now and save it to a temporary directory. Next extract the archive, I use tar.gz:

    $ tar -zxf phpGroupWare-0.9.16.001.tar.gz

This will give you a "phpgroupware" directory with lots of directories under it. The phpgw layout is as follows:

  `phpgroupware\`
  `|-- App 1\` (this is the root of an application)
  `| |-- inc\` (the applications classes and core files go here)
  `| |-- setup\` (the files needed to "install" the app go here)
  `| |-- templates\` (the app specific template and theme files go here)
  `|-- App 2\`
  `| |-- inc\`
  `| |-- setup\`
  `| |-- templates\`
  `.`
  `.`
  `.`
  and so on

Next move the phpgroupware directory into your web root. There is no formula for where to put it, typically you would put it directly in /var/www/html/ or /home/httpd/html/ or where ever your apache DocumentRoot is. Alternatively you can install phpGroupWare using a virtual host. For this HOWTO I will be using my users home directory in /home/chris/htdocs/ and not doing any phpgw config as root. The only requirement is that every directory in the file system up to the directory you install in MUST have modes a+rx or 755 so that the anonymous web user can view the html and run the php scripts. The php files do not have to be executable unless you are using the php CGI, which is not recommended for a php application of this size and complexity.

Before we start installing, we'll get the latest patches from the phpgroupware stable CVS tree. The package you downloaded will already have the CVS directories in it to tell the cvs client what to do. This step is optional but highly recommended. Run the following command anytime you want to get the latest patches from the stable cvs tree.

    			$ export CVS_RSH=ssh
    			$ cd phpgroupware
    			$ cvs -z6 update -dP > cvs.log

You may get a warning about a missing .cvspass file, this is harmless. You will then see cvs go through every directory looking for files to update. This will also create a cvs.log file showing you what files updated. It is recommended you review this log to check for errors after each update.