Friday, April 16, 2010

Installing PHP 5.2.8

PHP stands for PHP: Hypertext Preprocessor. It refers to a scripting language mainly used for server-side scripting and the parser/engine/compiler that processes PHP code. It runs on a web server, taking PHP code as input and returning web pages/HTML as output.

Prerequisites
Web server

Versions used
Apache HTTP server 2.2.8

Steps
  • Download the zip package from PHP website, http://www.php.net/downloads.php. The installer package as at version 5.2.6 doesn't seem to install correctly on Vista.
  • Create a folder C:\PHP
  • Unzip the contents of the zip package to this folder.
  • Add C:\php to the path system variable by going to Start → Settings → Control panel → System → Advanced System Settings → Advanced tab → Environment variables
  • Restart the computer
  • Make a copy of the file php.ini-recommended in C:\PHP and rename the copy as php.ini
  • Update the doc_root directive in php.ini file to the DocumentRoot path set in the Apache httpd.conf file e.g. doc_root = C:\Apache\htdocs
  • Update the extension_dir directive in php.ini file to extension_dir = C:\PHP\ext
  • Update the display_errors directive in php.ini file to display_errors = on
  • Update the date.timezone directive in php.ini e.g. date.timezone = Africa/Nairobi
  • Update the Apache httpd.conf file by adding the following lines
LoadModule php5_module "C:/php/php5apache2_2.dll" 
AddType application/x-httpd-php .php 
PHPIniDir "C:/php"
  • Add index.php to the DirectoryIndex setting of the httpd.conf file i.e. DirectoryIndex index.html index.php
  • Restart Apache by going to Start → Programs → Apache HTTP Server 2.2 → Control Apache Server → Restart
  • Create a text file named test.php in the Apache document root path. Add the following to the file. <?php phpinfo(); ?>
  • Open your browser and navigate to http://localhost/test.php. If a page with PHP configuration information is displayed, the PHP installation and configuration was successful.

Installing Subversion 1.5.3

Subversion [svn] is a version control system. A class of applications also referred to as Software Configuration Management (SCM).

Prerequisites
None

Versions used
VisualSVN 1.5.3
TortoiseSVN 1.5.3

Steps
  1. Download visualsvn server from the visualsvn website. This is a free GUI for the subversion server. It also comes with svn command line tools e.g. svn.exe
  2. Download tortoisesvn from the tortoisesvn website. This is a free GUI client for subversion. It is a windows explorer extension
  3. Install tortoisesvn. This will require a restart
  4. Install visualsvn server. You can specify to use http on port 81 for connections using a browser. Identify the folder where the svn server will keep it's database. Use svn authentication and create a user and password.

Using Subversion

Creating a repository
  • Create a new repository using visualsvn server

  • In windows explorer, right click on the root directory of items you want to add to source control and select TortoiseSVN > Import.Type the path to parent folder to create in your repository e.g. file:///C:/svn/myrepository/myfolder [don't specify the repository root path e.g. svn/myrepository]. Click on OK. This will add all files and subfolders under that folder to source control.
  • Right click on the folder again and click on SVN Checkout. Note the repository URL and checkout directory and amend as appropriate.
  • Right click on the folder and select SVN Commit

  • To add only selected files or folders, in windows explorer, from any directory, right click and select TortoiseSVN > Repo-browser. Type the URL of the repository just created.
  • Create the directory structure you want for your repository structure. Right-click in the left pane of the repository browser and select Create folder as appropriate.
  • Click on OK to close the repository browser.
  • Right click on the folder to use as the working directory and select SVN Checkout.
  • Set the repository URL e.g. file:///C:/svn/myrepository/myfolder and the checkout directory and click on OK
  • Accept any warning message that the target folder is not empty. Already existing files in the folder won't be deleted
  • To add files to source control, right click on the file and select TortoiseSVN > Add. Click on OK to mark the file for adding to source control.
  • When finished adding files, right click on the working folder and select SVN Commit. Click on OK to add the files to source control.
  • Items are now under version control

Daily use
  • To check in items, right click and select SVN Commit
  • To check out, no special action is needed. SVN by default uses an update-and-merge technique rather than lock-update-check-in, so that multiple people can update the same file at the same time. If you require to lock the file so that you are the only one who can modify it, right click and select TortoiseSVN > Get lock. Use TortoiseSVN > Release lock when finished.
  • To get latest, right click and select SVN update
  • To remove a file from version control, shift+right click on the file while viewing it from the right hand pane of windows explorer and choose the TortoiseSVN > Delete (keep local) menu. This will mark it for deletion from svn but keep the local copy. Right click on the file and select SVN Commit to effect the change. The normal TortoiseSVN > Delete command will immediately delete a file from the working folder. For a folder, it's marked for deletion and actually deleted when you commit. You can get a file back by browsing the repository and copying it from a previous revision, before it was deleted. Use TortoiseSVN > Revert to unmark an item previously marked for deletion.
  • To remove a folder from version control, right-drag the working copy onto itself. Windows explorer doesn't allow dragging items onto themselves in the same window though, so you must either use a second explorer window or drag onto the tree view. On the pop-up menu provided select SVN Export to here and accept to unversion the folder.
  • To export a folder, such that a copy is made to a different location without the .svn directories, right click on the folder and select TortoiseSVN > Export.
  • To create a tag or branch, right click on the folder, select TortoiseSVN > Branch/tag and in the To path: section, enter the path of the new branch/tag e.g. /tags/version2.2. The base directory e.g. tags in this case, needs to exist already.

Right-drag
In Windows explorer, it is possible to move/copy files not only by dragging them with the left mouse button, but also with the right mouse button. The difference is that the left-drag executes the operation immediately, and the right-drag will first show you a context menu where you can choose the operation. TortoiseSVN adds some of its commands to that right-drag context menu.

To add the files/folders to the working copy, right-drag unversioned files/folders on to a versioned folder and select SVN Add files to this WC.

To export items, right-drag versioned files/folders from your working copy to an unversioned folder and select one of these two commands
  • SVN Export to here: exports the dragged files/folders to the target location, i.e. creates a copy without the .svn folders
  • SVN Export all to here: exports the dragged files/folders to the target location, including unversioned files.

To move and copy your files and folders around in your working copy, right-drag files/folders inside your working copy and select one of these four commands
  • SVN Move versioned files here: moves the files to the drop location. If a file already exists, it will ask you what to do (rename the file, overwrite it or cancel).
  • SVN Move and rename versioned files here: the same as 'SVN Move versioned files here', except that it will ask for a new name for every dropped file.
  • SVN Copy versioned files here: the same as 'SVN Move versioned files here' but it leaves the original file, i.e. the file is copied not moved
  • SVN Copy and rename versioned files here: the same as 'SVN Move and rename versioned files here' but it leaves the original file, i.e. the files are copied not moved

Installing JasperServer 3.7.0

JasperServer is at the heart of the Jaspersoft BI suite, enabling management and distribution of reports.

Prerequisites
JRE [installer comes with bundled JRE]
Tomcat [installer comes with bundled tomcat]
MySQL [installer comes with bundled MySQL]

Versions used
JRE 1.6.0_18
Tomcat 6.0.20
MySQL 5.0.45

Steps
  1. Download the jasperserver installer package from sourceforge, http://sourceforge.net/projects/jasperserver/files/JasperServer/
  2. Make sure the mysql service is running
  3. If you have a databases on your server named sugarcrm or foodmart, export them to different databases. The sample databases that come with jasperserver are stored  in these databases
  4. Run the installer
  5. Install to C:\jasperserver-ce-3.7.0
  6. Specify to use an existing tomcat and an existing mysql
  7. Start tomcat
  8. Navigate to localhost:8080/jasperserver
  9. Login with the username/password combination of jasperadmin/jasperadmin
  10. Installation is complete

Note that the installer package comes bundled with iReport which is a report designer for jasperreports. You need not download iReport separately.

If you require to use a different application server or DBMS, download the WAR package rather than the installer. Download the jasperserver-ce-install-guide.pdf for instructions on how to set it up.

Installing TikiWiki 4.2

TikiWiki is an open source web-based application that does many things including collaboration and bug tracking.

Prerequisites
Web server configured to process PHP pages
PHP
MySQL

Versions used
PHP 5.2.8
Apache 2.2.8
MySQL 5.0.45

Steps
  • Download the zip package from the tiki website, tikiwiki.org
  • Unzip the zip file to the webserver document root e.g c:\apache\htdocs
  • Rename the folder created e.g. to tiki
  • Open a command prompt window
  • Type mysql -h localhost -u root -p [assuming mysql is in the system path]
  • Enter the root password
mysql> create database tiki;
mysql> grant all on tiki.* to tiki@localhost identified by “tiki”;
mysql>quit
  • Using a browser, navigate to localhost/tiki
  • Follow the instructions of the installer

Installing Palo BI Suite 3.0

Palo is an open source MOLAP server. It's primarily designed to work with excel, coming with an excel add-in. There's also an openoffice extension, palo for openoffice add-in, that can be used for integration with openoffice calc.

Prerequisites
.NET framework 2.0
MS Excel or OpenOffice calc

Versions used
Palo 3.0
OpenOffice calc 3.1.0
Palo for openoffice addin 2.0.1

Steps
  1. Download the Palo BI suite from the palo website, jedox.com
  2. Run the setup file
  3. Install to c:\Palo
  4. Download the palo for openoffice addin from http://extensions.services.openoffice.org/en/project/PaloOpenOffice
  5. Start openoffice calc
  6. Select the Tools | Extension manager menu
  7. Click on the Add button and select the PalOOCa.oxt file downloaded.
  8. Close calc after the addin has installed
  9. Open calc
  10. You'll have a new menu in the menu bar named Palo
  11. Click on the Palo | Modeler menuClick on the edit connection icon to edit the details for the localhost connection. Set the port to 7921, username to admin and password to admin.
  12. Click on the connect to server icon to connect to the server on localhost.

To connect to a mondrian schema, and use OpenOffice to browse mondrian olap cubes,
  • Click on the Palo | Modeler menu
  • Click on the create connection icon. Fill the following for the host and port, or similar values corresponding to the mondrian server setup
Host – localhost:8080
Port – mondrian/xmla
  • Click on the connect to server icon to connect to the mondrian server
  • Click on close once the connection is established
  • Click on the Palo | Insert View menu
  • Select the appropriate database and dimensions to view then click on the create button

Upgrading Mantis

Based on the upgrading section of the mantis manual.
http://www.mantisbt.org/manual/manual.installation.upgrading.php

Versions used
Upgrade from 1.1.6 to 1.2.0

Steps
  1. Backup the mantis database
  2. Backup the mantis directory on the web server
  3. Rename the file c:\apache\htdocs\mantis\mantis_offline.php.sample to mantis_offline.php
  4. Unzip the latest mantis package to a temporary folder e.g. C:\temp
  5. Copy the contents of c:\temp\mantisbt-1.2.0 to the web server e.g. C:\apache\htdocs\mantis, replacing all existing files and folders
  6. Delete the file c:\apache\htdocs\mantis\core\my_view_inc.php
  7. Using a browser, navigate to localhost/mantis/admin/install.php
  8. Supply a database username and password to use to upgrade the database
  9. Click on the install/upgrade database button
  10. Installation should be successful
  11. Confirm the installation status by navigating to localhost/mantis/admin/check.php
  12. Delete the file c:\apache\htdocs\mantis\mantis_offline.php. It may be appropriate to delete all old files from the previous version (those which haven't been replaced because they no longer exist in the new version)
  13. Delete the folder c:\apache\htdocs\mantis\admin
  14. Using a browser, navigate to localhost/mantis to log in and use the latest version of mantis