Articles » Administrator » Setting up a Shared-Fundanemt installation
Author

Brian Jørgensen is a 9th semester, Software Engineering student at Aalborg University. He works as a freelance developer and on Fundanemt.

Website
E-mail

Setting up a Shared-Fundanemt installation

by Brian Jørgensen, July 2005

First we need an definition of what a Shared-Fundanemt installation is, which will hopefully help get rid of any misunderstandings.

Shared-Fundanemt installation:
An installation where all Fundanemt files are shared among several sites on the same server. Only data files - configuration, database, files and graphics - are separate.

The major advantages of having a shared installation, is the

  • ease of maintenance
  • reduced disk space consumed

It is possible to update the Fundanemt core files, modules etc. at a central location on the server. This at the same time reduces the amount of disk space used, and enable even very small web servers to host multiple websites. At the present time, an Fundanemt installation takes up little over 12 MB of disk space.

Requirements

It is possible to setup a shared Fundanemt environment on most servers, but there are a few requirements. To be honest, I have only seen this work on servers where the website administrator had shell access to the server. This technique is properly most usable for administrators that have access to a dedicated server.

  • Read access from the user-site to the central Fundanemt directory. PHP Safe mode could cause this to fail.
  • FTP or shell access to the web server.
  • Possibility to create symlinks on the server (through FTP or shell)

Installing Shared Fundanemt

No further installation besides placing an extracted copy of the latest Fundanemt version in a directory somewhere on the web server is necessary. Using a CVS checkout of either the latest stable CVS branch or development branch makes maintenance easier.

The site_graphics, files and conf directories can be deleted from the shared installation, although it does not really matter.

Note: Any Fundanemt installation can be used as the shared installation, how ever to minimize the risk of causing an error, I recommend creating a separate installation that is not used directly.

Installing User-site Fundanemt

The first step is to create the directory that holds the website - in this example /websites/examplesite.dk/

In the directory a sub-directory for Fundanemt is created named fundanemt. Inside the fundanemt directory, three data directories are created

  • conf - for the configuration file.
  • files - containing user files
  • site_graphics - containing images


Next step is to create symlinks for four directories and one file, to their location in the shared installation. The symlinks are created using the ln program on UNIX type operating systems using shell access, or using the FTP command site symlink.

In the following I assume that the shared Fundanemt installation is located in /websites/sharedfundanemt/ on the file system, and accessible as /sharedfundanemt/ using FTP.

Shell access

ln -s /websites/sharedfundanemt/core core
ln -s /websites/sharedfundanemt/fundaClient fundaClient
ln -s /websites/sharedfundanemt/index.php index.php
ln -s /websites/sharedfundanemt/install install
ln -s /websites/sharedfundanemt/modules modules

FTP:
site symlink /sharedfundanemt/core core
site symlink /sharedfundanemt/fundaClient fundaClient
site symlink /sharedfundanemt/index.php index.php
site symlink /sharedfundanemt/install install
site symlink /sharedfundanemt/modules modules

The directory structure looks like the following

  • /websites/examplesite.dk
    • fundanemt
      • conf
      • core (symlink)
      • files
      • fundaClient (symlink)
      • index.php (symlink)
      • install (symlink)
      • modules (symlink)
      • site_graphics
    • index.php
    • style.css
    • ...

Updating all Sites

All the websites using the shared Fundanemt installation can easily be updated by either replacing the copy of Fundanemt in the shared location with a newer version, or by updating from CVS if the sites are using a CVS checkout.

Using the latest CVS stable branch, will ensure that all websites are featuring the latest bug fixes - this could be both security updates, usability bugs or features not working properly. Fundanemt.com features information about how to download and update the latest CVS branch.

More Options

Additionally the Fundanemt sites can be hosted from the same database by using database table prefixes. During the installation the table prefix can be specified, or by manually editing the configuration file.

Wrap-Up

Having a shared Fundanemt installation makes it extremely easy to create new Fundanemt powered websites, and I already know of a few shared installations that run smoothly.

The Fundanemt development team has already taken actions to make the Fundanemt directory structure more clean, and easier to create shared installations by minimizing the number of files and directories outside the core directory. In the future the frontend files inside the fundaClient directory will be moved to the core directory as well.

If you have any questions about setting up a shared Fundanemt installation, or having problems with a already setup installation, feel free to contact me and the rest of the Fundanemt team.