Development & IT > Plug-in Installation Guide
posted on 6:01 PM, June 2, 2010
Plug-ins are distributed and installed separately from the base ExSite
system. There are two methods for installing plug-ins into a website.
If your plug-in repository is $BASE, and the plug-in subdirectory is $BASE/Plugin, then change to your website's cgi-bin directory, and execute the following commands:
You should also change to your website's base htdocs directory, and execute the following commands:
Note: it is always wise to make a backup of your database before doing any work that reconfigures it:
Method 1: Makefile
The Makefile that is distributed with the base distribution (in the install directory) can be used to install plug-ins. The configuration section of the Makefile must be edited to reflect your local setup. Once that is done, put a copy of the Makefile in your cgi-bin directory. Then the following commands will work:make PLUGINwhere "PLUGIN" is the name of the plug-in you want to install. For example:
make PhotoAlbumTo install multiple plug-ins at once, simply give all their names to make:
make PLUGIN1 PLUGIN2 PLUGIN3Note that these commands install the basic website files, but do not reconfigure the database. For that, see below.
Method 2: Manual Installation
Each plug-in is distributed in a directory with the following contents:| README | brief description of the plug-in module |
| html/* | static files such as images, stylesheets, JS scripts |
| cgi/* | plug-in code and configuration files |
If your plug-in repository is $BASE, and the plug-in subdirectory is $BASE/Plugin, then change to your website's cgi-bin directory, and execute the following commands:
cp -r $BASE/Plugin/cgi/Modules/* ModulesIf you want to keep the original files in the repository and symlink to them instead, use the following commands:
mkdir dbmap/Plugin
cp -r $BASE/Plugin/cgi/dbmap/* dbmap/Plugin
cp -r $BASE/Plugin/cgi/conf/Plugin.conf conf
ln -s $BASE/Plugin/cgi/Modules/* Modules(The symlink method makes it easier to upgrade your plugins by replacing the whole plug-in repository at once. It also makes it easier to share plug-ins on a server with multiple web sites.)
mkdir dbmap/Plugin
ln -s $BASE/Plugin/cgi/dbmap/* dbmap/Plugin
cp -r $BASE/Plugin/cgi/conf/Plugin.conf conf
You should also change to your website's base htdocs directory, and execute the following commands:
mkdir _Modules/Plugin(You can change the cp -r to ln -s if you prefer the symlink method.)
cp -r $BASE/Plugin/html/* _Modules/Plugin/
Database Configuration
If your plugin has files in its cgi/dbmap directory, then it modifies the database, and there is an extra setup step to complete the installation. Starting from your cgi-bin directory, execute the following command:$BIN/makesql.pl > make.sqlwhere $BIN is the location of the bin directory in your ExSite base distribution. This will create a script, make.sql, which sets up your database tables. (This script will include your old tables plus the new ones that the plug-in requires. However, the old tables will not be affected if you run this script.) To run the script, type:
mysql -u root -p your_db < make.sql(you will need to enter the mysql password.) Change "your_db" in the above command to your database name. If you have a personal mysql account to do this work, you should also change "root" to your account name.
Note: it is always wise to make a backup of your database before doing any work that reconfigures it:
mysqldump -u root -p your_db > db-backup.sql