wiki:Installation

Installing

Needed software

To use the OpenLabsWeb? interface you will need the following applications and software packages.

And the following php modules are needed:

php5-mysql
php5-pcre
php5-session
php5-sockets

Smarty

To be able to use smarty, update the php.ini file used and add the path to smartys script directory, called libs in standalone installations, to your include_path. Example:

FreeBSD:
include_path = ".:/usr/local/share/pear:/usr/local/share/smarty"
Windows:
include_path = ".;C:\php\pear;C:\web\smarty\libs\"

Pear and Text_Wiki

Check http://pear.php.net/manual/en/installation.getting.php for instructions installing PEAR.

To install Text_Wiki you will first have to install pear. This can be done by running the go-pear.bat on windows. After that you can install Text_Wiki by using:

pear install Text_Wiki

Or if you have downloaded the package:

pear install Text_Wiki.tgz

The include_path must be updated for pear packages to work as it is in the example above.

Unfortunately Text_Wiki is a bit outdated and no longer maintained and because of that it contains code using constructs that are no longer valid in newer versions of php. to fix that, go to the Pear/Text? directory and edit the Wiki.php .

search for:
& = new
replace with:
= new

HTTP Server configuration

The project shares it codebase between a number of sites. You can find them at /trunk/sites. Each contains a public directory that needs to be accessible from the webserver, both over HTTP and HTTPS (for secure login).

Apache example:

# If the electronics site is the root of this webserver
DocumentRoot "<source_directory>/trunk/sites/electronics/public"

# If your site is not the root document, you can create an alias for the site like
#Alias /electro <source_directory>/sites/electronics/public

<Directory "<source_directory>/trunk/sites/electronics/public">
  # Basic php setup, may not be needed
  AddType application/x-httpd-php .php
  AddType application/x-httpd-php-source .phps
  DirectoryIndex index.php index.html

  # Don't allow indexing of the contents
  # MultiViews is needed to guess file suffixes for load/save
  Options -Indexes +MultiViews
  AllowOverride None
  #for apache 2.2
  Order Allow,Deny
  Allow from all
  #for apache 2.4
  #Require all granted
</Directory>

# To disable access to .svn directories
<DirectoryMatch "/\.svn/">
  Order allow,deny
  Deny from all
</DirectoryMatch>

Remember that this is needed for both the HTTP and the HTTPS virtual hosts.

HTTPS and self signed certificates

Generate the self signed certificate files by running (in the command line):

openssl genrsa -out privkey.pem
openssl req -new -key privkey.pem -out cert.csr
openssl req -new -x509 -key privkey.pem -out cacert.pem -days 1095

Place the certificate files in the apache configuration folder and update the following configuration items:

SSLCertificateFile
SSLCertificateKeyFile
(SSLCertificateChainFile if needed)
Last modified 3 years ago Last modified on Feb 4, 2015, 3:59:22 PM