Installation instructions

The configuration process is done using the configure bash script. The first lines of this script contain all configuration options. The first part of the configuration process checks your server configuration. Now go to the basilic-1.5.13 directory and type:
> ./configure
This will create the checkConfig.php file in the current directory. Open this file in an other browser to see the results of the test suite. Make sure you access this file through your web server using an URL like http://your-server/pathToBasilic/basilic-1.5.13/checkConfig.php and not as a file://, so that php scripts are properly interpreted.

php configuration

If checkConfig.php displays as an empty page in your browser, first check that the file is present and readable. Then, tune your apache-php configuration and make sure Apache handles php scripts: Your httpd.conf should especially contain a line like:
AddType application/x-httpd-php .php
Make a simple test by creating a test.php file that simply contains the following line. It should display complete php and apache server configuration details:
<?php phpinfo(); ?>

mySQL configuration

Once php is set, you need to create a new dedicated database in mySQL (skip this part if you are updating an existing Basilic system, see the update section). Sufficient priviledges are required to do this (ask your web admin if needed) :
mysql -uroot -p  (add the "-h your.web.server" option if you use the mySQL server remotely)
Enter password : ******
mysql> CREATE DATABASE basilic;  (if you use an other name, change mysqlDatabase value in configure)
Query OK, 1 row affected (0.00 sec)
mysql> USE basilic;
Database changed
Then cut and paste the content of tables.txt in your mySQL console in order to create the five tables in this database : publis, docs, authors, publidocs, publiauthors.

Finally, create two new users who will have access to this database: www is only allowed to select (used by web site visitors) while intranet can edit the database (local administration):

mysql> GRANT SELECT ON basilic.* TO 'www'@'localhost' IDENTIFIED BY 'www';
mysql> GRANT SELECT,INSERT,UPDATE,DELETE ON basilic.* TO 'intranet'@'localhost' IDENTIFIED BY 'choose an intranet password';
The names and passwords can of course be changed (compulsory for the intranet password).

Once all this is done, quit mySQL (using quit;) and edit the mySQL section of configure to update the users' names and passwords. Run configure once more to update checkConfig.php and correct possible problems as indicated in this page before proceeding.

Thumbnail creation using convert

ImageMagick's convert must be installed for automatic thumbnail creation. The apache user (who is running the web server) should be able to run it from php scripts.

Install convert on your web server, optionnaly change ConvertCommand command line in configure. Re-run configure and check its results in checkConfig.php until a thumbnail is created.

File hierarchy

The publication web server hierarchy is divided into a public part (publications associated pages and index pages) and an intranet part (database edition pages). Access to the intranet part should be limited to local users. See the apache htaccess documentation for details on protected web directories.

Edit the directory configuration section of configure to tune the paths of these directories and then run configure to update checkConfig.php and check the resulting directory structure.

Local browser detection

When a local user browses the publication pages, (s)he is allowed to edit the publication data. Default configuration is to detect local browsers using their associated machine ip address. Is considered an intranet those with an ip of the form RemoteAddr.[0-255]. Edit RemoteAddr in configure to match your local network submask.

Edit Public/header.php and change the way $local is set to implement a different detection scheme.

Laboratory name

Your laboratory name will appear on top of index pages as well as in the titles. Change LabName in configure.

Administrator notification

Problems with the server are reported though e-mail messages or appended to a log file. Edit AdminNotification in configure to set this. If the value contains a '@' it is considered as an e-mail address, otherwise it represents the name of a (writable) log file. Php must be able to send e-mail with the first option. Re-run configure, update checkConfig.php in your browser and check that the designated recipient receives an e-mail or that the log file is updated.

Installation

Finally, once all configuration tests have passed, simply click on "Install" to really install the Basilic scripts.

Populating the database

See the update section below if you have already installed an older Basilic version and are currently simply updating Basilic.

The database is normally updated using forms in the server backoffice (the intranet part of Basilic). However, it may be more convenient to fill the database from a existing bibTex file after its installation. In the Basilic sources' Import directory, there is a bibtex2table program that does it:

cd Import (or add this directory to your PYTHONPATH)
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. (or use "setenv" with [t]csh)
bibtex2table myfile.bib
This program is based on the xdkbibtex library, written by Xavier Décoret. This library is provided already compiled for simplification, but consider recompiling it if the program exhibits a weird behavior.

You need to clean your bib file in order to initialize the databases with clean data. Note that the LaTeX \" accent must be protected: {\" }. You must unify authors, journals and booktiles names to create unique entries. Four files are generated by bibtex2table to help you do this: authorList.txt, journalList.txt, booktileList.txt and titleList.txt. Open these files, correct your bibTex as indicated, and re-run bibtex2table until all the entries are clean. keys.txt lists the new generated keys, that can be compared with the previous ones in case you are transfering from a previous Basilic database.

When the input is cleaned, import the tables into mySQL using the commands listed in the authors.sql, publiauthors.sql and publis.sql files. You can for instance use the phpMyAdmin's load from file option.

Finally, follow this link to create all the directories associated to these publications (since you did not use the normal backoffice edition pages and these directories were not created by the import).

You (and publications' authors) can now move publications' associated documents in their respective directories. You can also fill some authors's URL fields in the authors database.

Update of an existing database

Warning messages will be displayed by checkConfig.php about already existing file. You may ignore these messages and overwrite your previous configuration during installation. The new scripts will replace the older ones, which will be renamed with a .basilic.bak extension. If you have changed some of the scripts, you should then merge the two files (usually the .css style sheets, or the header.php and footer.php scripts).

If your database was created with a Basilic version > 1.2, you don't need to create the mySQL databases nor do they have to be populate since it is already done. The new scripts should seamlessly refer to the old publications' files and directories.

Look and feel

The visual appearance of the index and publications' associated pages is defined by the listpubli.css and publi.css style sheets, located in virtualplants/CSS.

Help pages

A basilic presentation page as well as a users guide have been installed in the virtualplants/Intranet/Basilic directory.

Polishing

Make sure the /virtualplants/Publications directory and the mySQL database are backuped regularly.

Send the URL of your publication web server to citeseer to get referenced. Make sure search engines robots have access to your publication web pages. Check your web server log and look for bad links during the first days.

Send me an e-mail so that I can update the list of Basilic users. Subscribe to the basilic mailing-list to get informed of new releases.

Multilingual configuration

By default, the public part of the publication server handles two different languages. The page language is defined by the value of the lg php variable. The headers and texts displayed in the index pages and in the publication associated pages depend on this value.

lg is modified when you click on the flag in the top banner of a page. The getLanguage.php script is called at the beginning of each page and updates lg accordingly.

Default language values are french and english. Simply translate the texts defined at the beginning of the publi.php and index.php pages (in virtualplants/Publications) to implement a new language.

The intranet pages are in english. If you translate them, please send back the result so that I add it into the distribution.