Installation Notes for Spine v1.3 beta
RequirementsSpine has very few dependencies.
- Apache 1.X (development is based on version 1.3.28 and tested on 1.3.33)
or
Apache 2.X (development is based on version 2.054) - mod_perl 1.X (development is based on version 1.27 and tested on 1.29)
or
mod_perl 2.X (development is based on version 2.01) - Apache::Request [libapreq] (development is based on version 1.2 and tested on 1.33)
or
apreq2 (development is based on version 2.5.7) - Digest::MD5 (development on version 2.20 and tested on 2.33)
- DBI (development on version 1.32 and tested on 1.40)
- DBD::Mysql (development on version 2.1021 and tested on 2.9004)
or
DBD::Pg (development on version 1.4.2) - Apache::DBI (development on version 0.91 and tested on 0.94)
- Mysql 3.X
or
Postgresql (development is based on version 7.4)
Use the on-line tool to generate the correct SQL statements for the admin user. By default, version 1.3 beta does not include a default password. Visit http://spine.sourceforge.net/createuser.html to generate a custom SQL statement to create the admin account.
Installation on Debian
On Debian, install the following packages :
- apache-perl
- libapache-dbi-perl
- libdbd-mysql-perl
- mysql-client
- mysql-server
- libapache-request-perl
Development is based on mysql and postgresql.
See Using Mysql with Spine or Using Postgresql with Spine.
Open the mysql shell again:
bash# mysql spine -pIn the mysql shell, insert the generated SQL statement for the user account.
Perl Modules Installation (Including Upgrade)
There is a perl makefile included. Install the modules in the default perl location with:
bash# perl Makefile.PL bash# makeand as root (superuser)
bash# make installMake sure you have Apache::Request installed. If you have questions about installing this, consult the administrator.
Upgrade from 1.2 installations
Resetting the password is the only update needed in the database. See Using Postgresql with Spine for instructions on how to this in Postgresql. Generate the User SQL statement, as described above. Open the mysql shell again
bash# mysql spine -pIn the mysql shell, insert the following statements:
delete from users where login = "admin"; delete from session;Also insert the generated SQL statement for the user account.
Apache Configuration
Spine is developed for Apache & mod_perl 1.3.x. Installations on Apache2 & mod_perl2 will not work.
Edit your apache config file (by default httpd.conf) as follows :
<IfModule mod_perl.c>
# PerlModule Apache::DBI
# Remove the # above if you have Apache::DBI installed and you wish to use it
<Location /spine>
SetHandler perl-script
PerlHandler Apache::SPINE::Index
PerlSetVar dbd mysql
PerlSetVar dbname spine
PerlSetVar dbuser user
PerlSetVar dbpwd password
PerlSetVar main index.html
PerlSetVar webmaster 'John Doe'
PerlSetVar sitename 'SPINE Example site'
PerlSetVar chroot /home/www/html
PerlLogHandler Apache::SPINE::Log
</Location>
</IfModule>
If your Apache configuration is set up to allow drop in configuration files, use apache-conf.inclas a template. On Debian installations, copy the configuration files in
/etc/apache-perl/conf.d
- The dbname is the database name (you defined earlier).
- The dbuser is the user as which you connect to mysql (consult your mysql documentation for this setting)
- The dbpwd is the user password you use to connect to mysql (consult your mysql documentation for this setting)
- The main variable is 'content' name that is loaded by default (like a index.html).
/etc/apache-perl/conf.d
Restart the webserver, by default by running
apachectl restartOn Debian installations, restart Apache with
./etc/init.d/apache-perl restartLoading Apache::DBI will improve the access speed to the database by pooling connections. Apache::DBI is not required but recommended. Set the virtual directory you want to use in the location tag.
<Location /directory>Existing directories and files will still work properly. By default, SPINE will use the mysql DBD driver (You still need this installed on your system - see Requirements list). If you wish to use a different DBD, fill in the appropriate value.
PerlSetVar dbd PgIf you doubt, ask your system administrator. You can define which database to use for the current virtual directory.
PerlSetVar dbname spineIf you have multiple virtual directories, this setting can prevent record overlapping.
<Location /bob>
...
PerlSetVar dbname bobdb
PerlSetVar dbuser bob
...
</Location>
<Location /john>
...
PerlSetVar dbname johndb
PerlSetVar dbuser john
...
</Location>
Just make sure you install the default database data first in both databases.
Using the main variable, you can define which content will be used by default.
PerlSetVar main index.htmlSPINE defined some hardcoded macros. One of those tags is
<?SPINE_Webmaster?>This tag will be swapped with the value defined in the webmaster variable.
PerlSetVar webmaster 'John Doe'Another hardcoded macro is the sitename. The macro defined for this value is
<?SPINE_Sitename?>This tag will be swapped with the value defined in the sitename variable.
PerlSetVar sitename 'SPINE Example site'Copy Images
Copy the images from the images subdir to your main images directory (eg. /var/www/images)
Starting using Spine
Go to
http://SERVERNAME/LOCATION/login.htmland use the credentials you specified earlier.