Showing posts with label Installing. Show all posts
Showing posts with label Installing. Show all posts

Thursday, September 12, 2013

Installing Sonatype Nexus Open Source

Sonatype Nexus Open Source (Nexus OSS) is a repository manager for maven repositories.

Prerequisites
Maven

Versions used
Nexus OSS 2.0.5-04
Maven 3.0.4

Steps
  • Download the nexus oss zip package from http://sonatype.org/nexus
  • Extract the zip file to a folder created for nexus e.g. C:\nexus
  • Installation is complete

Running nexus
  • Open a command prompt window and navigate to the the NEXUS_HOME\bin directory e.g. C:\nexus\nexus-2.0.5-04\bin\
  • Run the command nexus.bat console
  • Open a browser and navigate to localhost:8081/nexus. The nexus interface should be displayed.
  • To install nexus as a service, run the command nexus.bat install
  • The nexus service name is nexus-webapp. Now you can start/stop nexus like any other service e.g. using the command net start nexus-webapp. To uninstall the service, run the command nexus.bat uninstall
  • On the nexus home page, click on the Log In link. The default login username/password is admin/admin123. There is also a default deployment user with username/password deployment/deployment123. You can change any of these passwords by expanding the Security section on the left hand pane, selecting the Users option, right-click on the desired user and selecting the Set Password context menu.

Configuring maven to use nexus
  • You can set maven to look for artefacts from nexus instead of directly from the internet e.g. the maven central repository. A Nexus proxy repository acts as a local cache for a remote repository.
  • Create or edit the USER_HOME_DIR\.m2\settings.xml file e.g. C:\Users\ANDY\.m2\settings.xml, to configure nexus as the mirror for all repositories e.g.

  
    
      
      nexus
      external:*
      http://localhost:8081/nexus/content/groups/public
    
  
  
    
      nexus 
      
      
      
        
          central
          http://central
          true
          true
        
      
     
        
          central
          http://central
          true
          true
        
      
    
  
  
    
    nexus
  

Installing Maven 3.0.4

Apache Maven is an open source build automation tool for java projects.

Prerequisites
JDK

Versions used
Maven 3.0.4
JDK 1.6.0_39

Steps

  • Download the maven binary zip package from http://maven.apache.org
  • Extract the zip file to some folder e.g. C:\. A folder structure like C:\apache-maven-3.0.4 will be created
  • Add the environment variable MAVEN_HOME with the value of the maven home directory e.g. C:\apache-maven-3.0.4\
  • Add the %MAVEN_HOME%\bin location to the PATH environment variable
  • The setup is complete. Open a command prompt window and type the command mvn -version to confirm.
  • The local maven repository is located in <USER_HOME_DIR>\.m2\repository e.g. C:\Users\TOM\.m2\repository
  • Note that maven requires internet access to download dependencies and may do so from time to time depending on the command and project given. Once a dependency is downloaded once, it is put in the local repository and will not be downloaded again.

Sunday, February 12, 2012

Installing OpenKM 5.1.7

OpenKM is an open source Document Management System

Prerequisites
JDK

Versions used
OpenKM 5.1.7
Oracle JDK 1.6.0_21

Steps
  • Download the zip package from the openkm website, openkm.com
  • Extract the zip file to a directory of your choice e.g. c:\openkm
  • Create a file in the C:\openkm\jboss-4.2.3.GA\bin directory named start.bat with the following contents
run.bat -b 0.0.0.0
  • Create a file in the C:\openkm\jboss-4.2.3.GA\bin directory named stop.bat with the following contents
shutdown.bat -S
  • Run the start.bat file in the C:\openkm\jboss-4.2.3.GA\bin directory
  • Wait for jboss to finish starting (until "server started in ..." is displayed)
  • Using a browser, navigate to localhost:8080/OpenKM
  • Use the username/password combination of okmAdmin/admin to log in. The username is case sensitive.
  • Use the File | Exit menu to logout
  • Edit the C:\openkm\jboss-4.2.3.GA\OpenKM.cfg file, changing the hibernate.hbm2ddl line from create to none so that it looks as follows
hibernate.hbm2ddl=none
  • Stop openkm by running the stop.bat file in the C:\openkm\jboss-4.2.3.GA\bin directory
  • Restart openkm by running the start.bat file in the C:\openkm\jboss-4.2.3.GA\bin directory
  • Installation is complete



Increasing permgen space
  • Edit the run.bat file in the C:\openkm\jboss-4.2.3.GA\bin directory. Edit the line
set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m
So that it looks something like this
set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m -XX:MaxPermSize=256m

Friday, April 16, 2010

Installing Open Source Job Scheduler 1.3.6

Open Source Job Scheduler is an open source application for scheduling and monitoring tasks.

Prerequisites
JRE
RDBMS + JDBC driver
Web server with PHP configured
PHP

Versions used
Apache 2.2.8
MySQL 5.0.45
MySQL Connector/J 5.1.10
PHP 5.2.8
JRE 1.6.0_18

Steps
  • Download the zip package from the job scheduler website, http://jobscheduler.sourceforge.net/
  • Create a temporary directory e.g c:\temp\scheduler
  • Unzip the file to the temporary directory e.g. C:\temp\scheduler
  • Open a command prompt
  • Type mysql -h localhost -u root -p
  • Enter the root password
mysql> create database scheduler;
mysql> grant all on scheduler.* to scheduler@localhost identified by "scheduler";
mysql> quit
cd c:\temp\scheduler
java -jar scheduler_win32.jar
  • The setup program will start
  • Change the installation path from program files e.g. to c:\scheduler
  • Be sure to include the managed jobs, database and web interface components when installing
  • Enter other required details and create a copy of the install script at the end.
  • Edit the file apache\conf\httpd.conf and add the following
Alias /scheduler/logs "c:/scheduler/logs"
Alias /scheduler "c:/scheduler/web"

<Directory "c:/scheduler/web">
    AllowOverride None    
    Options Indexes FollowSymLinks ExecCGI
    Order allow,deny
    Allow from all
</Directory>

<Directory "c:/scheduler/logs">
    AllowOverride None    
    Options Indexes FollowSymLinks
    Order allow,deny
    Allow from all
</Directory>
  • Restart apache
  • Using a browser, navigate to localhost/scheduler/index.htm
  • In the login screen enter sos for the unit, admin for username and leave the password blank
  • Review the documents in the c:\scheduler\doc\en folder for information on how to create and manage jobs. The quickstart is a good place to start.

If you get an error after logging in e.g. Error while connecting to the scheduler... or a message like "It could not commit any Job Scheduler to this site for monitoring", try the following.
  • Edit the file c:\scheduler\web\packages\scheduler\sos_scheduler_network.inc.php. Modify the normalize_host function to look as follows.
  function normalize_host( $host ) {
    return gethostbyname($host);
    /*
    $ip = gethostbyname($host);
    if( ereg( '^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$', $ip ) ) {
      return gethostbyname(gethostbyaddr($ip));
    } else {
      return '';
    }
    */
  }
  • In the same file also edit the line that sets the ip host to
$this->network_schedulers[$ip_port]['host']= $this->normalize_host(APP_SCHEDULER_HOST);
  • Edit the file c:\scheduler\web\scheduler_monitor.php. Edit the line that sets the ip to
$ip=gethostbyname($spooler_host);


Scheduling Pentaho Data Integration (Kettle) jobs
If scheduling kettle transformations or jobs, the scheduler will think the job has encountered an error because some text is written to stderr and a warning email is sent as a result. To avoid this, when configuring the job, after settting the command parameter, set the ignore stderr parameter to Yes.

Another way to avoid the warning email would be to modify the batch file that runs the job or transformation to redirect stderr to the same file as stdout [using 2>&1]. e.g.
cd C:\Kettle
kitchen.bat /file:"C:\path\job.kjb" > "C:\path\job.log" 2>&1

Installing OpenReports 3.2.0

OpenReports is an open source web reporting solution that supports a variety of open source reporting engines, including JasperReports, JXLS, and Eclipse BIRT. You create reports externally using these tools and then OpenReports can be used to run, schedule and deliver them. OpenReports also supports QueryReports and ChartReports which enable you to easily create reports and charts by only specifying the required SQL. No report design is required for these.

OpenReports 3.2.0 supports JasperReports 3.5.1, Eclipse BIRT 2.3.2 and JXLS 0.9.8.

Prerequisites
JRE or JDK 1.6

Versions used
JRE – 1.6.0.17

Steps
  • Download the zip file from SourceForge, http://sourceforge.net/projects/oreports/files/
  • Unzip the file to C:\. Don't rename the extracted folder, but leave the extracted path as C:\openreports-tomcat.
  • Go to Start > Control Panel > System > Advanced System Settings. Select the Advanced tab and click on the Environment Variables button. Click on the new button and create a variable named JRE_HOME with the value set to the path of the JRE directory e.g. C:\Program Files\Java\jre6. If you have JDK installed, create a variable named JAVA_HOME instead with the value set to the path of the JDK directory.
  • Edit the file c:\openreports-tomcat\startup.bat to have the following contents
cd database
start start-database.bat
cd ..\tomcat\bin
call startup
  • Create a new file in c:\openreports-tomcat named shutdown.bat with the following contents
cd database
start stop-database.bat
cd ..\tomcat\bin
call shutdown
  • Create a new file in c:\openreports-tomcat\database named stop-database.bat with the following contents
@echo off

FOR %%b IN (openreports,sample) DO call :runCommand %%b
goto :end

:runCommand
java -cp hsql/hsqldb-1.7.3.jar org.hsqldb.util.ShutdownServer -url "jdbc:hsqldb:hsql://localhost/%1" -user "SA" -password ""

:end
  • Double-click on the file c:\openreports-tomcat\startup.bat. This will start the HSQLDB database OpenReports uses internally and the tomcat server bundled with OpenReports.
  • Wait for the tomcat server to finish starting up. When finished the original command window will display something like INFO: Server startup in 78676 ms
  • Open a browser window and navigate to http://localhost:8080/openreports
  • If port 8080 is already in use, for instance by another web server, modify the file C:\openreports-tomcat\tomcat\conf\server.xml. Search for 8080 and replace the value for the HTTP/1.1 connector with another port number that's not in use and that's greater than 1024. Restart the server and include the new port number in the URL you navigate to.
  • Login using the username admin and password admin.
  • You can now select and view the sample reports that come with the installation.
  • To add new reports, create the reports using the reporting engines supported by OpenReports e.g. JasperReports and deploy the report files to the OpenReports server. Add and configure them from OpenReports to make them available.
  • Copy the JDBC drivers for the databases you'll be reporting from to the C:\openreports-tomcat\tomcat\common\lib folder.
  • Copy the JDBC drivers for the databases used by BIRT reports to the folder C:\openreports-tomcat\tomcat\webapps\openreports\WEB-INF\platform\plugins\org.eclipse.birt.report.data.oda.jdbc_2.3.2.r232_v20090212\drivers
  • To have emails sent to a mail server with SMTP authentication turned on, add the following to the file C:\openreports-tomcat\tomcat\webapps\openreports\WEB-INF\applicationContext.xml. Setting the smtp authentication details in the OpenReports administration panel doesn't work.
<bean id="mailAuthenticator" class="org.efs.openreports.util.SMTPAuthenticator">
 <constructor-arg index="0" value="email account here" />
 <constructor-arg index="1" value="password here" />
 </bean>

 <bean id="mailSession" class="javax.mail.Session" factory-method="getInstance">
 <constructor-arg index="0">
 <props>
 <prop key="mail.smtp.host">smtp server hostname or IP here</prop> 
<prop key="mail.smtp.auth">true</prop> 
 </props>
 </constructor-arg>
 <constructor-arg index="1" ref="mailAuthenticator" />
</bean>
  • To get OLAP report samples to work when using JRE 1.6+, delete the file xalan-2.6.0.jar from the WEB-INF\lib folder and then restart tomcat.
  • To stop OpenReports, double-click on the file C:\openreports-tomcat\shutdown.bat
  • Installation is complete


Setting up OpenReports to use an independent Tomcat server and MySQL for its database
OpenReports comes bundled with a tomcat server and preconfigured HSQLDB database. To use a pre-existing tomcat server and MySQL for the database, use the following additional steps.

Prerequisites
Tomcat
MySQL
Apache Ant
JDK 1.6
MySQL JDBC driver

Versions used
Tomcat 6.0.20
MySQL 5.0.45
JDK 1.6.0_17
Apache Ant 1.8.0RC1
MySQL JDBC driver 5.1.10

Steps
  • Download Apache Ant from http://ant.apache.org/ if you don't already have it. Download the binary distribution zip archive.
  • Unzip the file to c:\
  • Edit the PATH environment variable and add ;C:\apache-ant-1.8.0RC1\bin at the end.
  • Copy the MySQL JDBC driver [jar file] to the tomcat\lib folder of the tomcat installation
  • Ensure you have a JAVA_HOME environment variable that points to the JDK folder e.g. C:\Program Files\Java\jdk1.6.0_17
  • Edit the file C:\openreports-tomcat\database\schema\or_ddl_mysql.sql. Add semicolons at the end of each command, and add the following lines in addition.
INSERT INTO REPORT_USER (NAME,PASSWORD,PDF_EXPORT_TYPE) VALUES('admin','admin',0);
INSERT INTO USER_SECURITY(USER_ID,ROLE_NAME) VALUES (1,'ROOT_ADMIN_ROLE');
  • Open a command prompt window and type mysql -h localhost -u root -p [assuming mysql\bin is included in the PATH environment variable]
  • Supply the root password in the mysql window that comes up
mysql> CREATE DATABASE openreports;
mysql> GRANT ALL ON openreports.* TO oreports@localhost IDENTIFIED BY 'oreports';
mysql> use openreports
mysql> \. C:\openreports-tomcat\database\schema\or_ddl_mysql.sql
mysql> \. C:\openreports-tomcat\database\schema\quartz\tables_mysql.sql
mysql> quit
  • Edit the file C:\openreports-tomcat\openreports\src\openreports.properties to have the following contents
# properties used by the Spring configuration

hibernate.dialect=org.hibernate.dialect.MySQLDialect

hibernate.jdbc.driver=com.mysql.jdbc.Driver
hibernate.jdbc.url=jdbc:mysql://localhost:3306/openreports
hibernate.jdbc.username=oreports
hibernate.jdbc.password=oreports
hibernate.jdbc.maxIdle=2
hibernate.jdbc.maxActive=5

quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate  

# use the following line for HSQLDB demo Quartz databases
#quartz.jobStore.selectWithLockSQL = SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?

# use this for all other Quartz databases
quartz.jobStore.selectWithLockSQL = SELECT * FROM {0}LOCKS WHERE LOCK_NAME = ? FOR UPDATE
   
quartz.jdbc.driver = com.mysql.jdbc.Driver
quartz.jdbc.url = jdbc:mysql://localhost:3306/openreports
quartz.jdbc.username=oreports
quartz.jdbc.password=oreports
quartz.jdbc.maxIdle=2
quartz.jdbc.maxActive=5

#number of threads that are available for concurrent execution of jobs
org.quartz.threadPool.threadCount = 5
  • Edit the file C:\openreports-tomcat\openreports\WebRoot\WEB-INF\applicationContext.xml and add the following items to enable sending mail with SMTP authentication.
<bean id="mailAuthenticator" class="org.efs.openreports.util.SMTPAuthenticator">
 <constructor-arg index="0" value="email account here" />
 <constructor-arg index="1" value="password here" />
 </bean>

 <bean id="mailSession" class="javax.mail.Session" factory-method="getInstance">
 <constructor-arg index="0">
 <props>
 <prop key="mail.smtp.host">server hostname or IP here</prop> 
<prop key="mail.smtp.auth">true</prop> 
 </props>
 </constructor-arg>
 <constructor-arg index="1" ref="mailAuthenticator" />
</bean>
  • Edit the file C:\openreports-tomcat\reports\datasources.xml and delete the sample mondrian datasource so that the file has the following contents.
<?xml version="1.0"?>
<DataSources>

</DataSources>
  • Delete the following files from C:\openreports-tomcat\openreports\WebRoot\WEB-INF\lib\.xalan-2.6.0.jar, xercesImpl-2.0.2.jar and xml-apis-2.0.2. These will be replaced with files from the xalan 2.7.1 distribution.
  • Download the binary distribution of xalan 2.7.1 from http://xml.apache.org/xalan-j/downloads.html
  • Unzip the package to a temporary folder e.g. c:\temp
  • Copy the files xalan.jar, xercesImpl.jar, xml-apis.jar and serializer.jar from c:\temp\xalan-j_2_7_1 to the folder C:\openreports-tomcat\openreports\WebRoot\WEB-INF\lib\
  • If you'll be using a jasper reports version other than 3.5.1, delete the files jasperreports-3.5.1.jar and jasperreports-3.5.1-javaflow.jar from C:\openreports-tomcat\openreports\WebRoot\WEB-INF\lib\. Place the files for the required jasper engine in the folder instead e.g. jasperreports-3.7.0.jar and jasperreports-3.7.0-javaflow.jar.
  • Put the mysql JDBC driver in the folder C:\openreports-tomcat\openreports\WebRoot\WEB-INF\lib. You can skip this step if a copy of the driver is available in the tomcat\lib folder
  • If you are using tomcat 6 and JRE 1.6, put a copy of the olap4j jar file in C:\openreports-tomcat\openreports\WebRoot\WEB-INF\lib. You can download this file from http://sourceforge.net/projects/olap4j/files/. This step is important for the environment described. If omitted, the application will deploy successfully on tomcat 5.5 but fail on tomcat 6 with an error “cannot create jdbc driver...java.lang.NoClassDefFoundError: org/olap4j/OlapWrapper...”.
  • Edit the C:\openreports-tomcat\openreports\WebRoot\WEB-INF\applicationContext.xml so that the environment bean section looks something like this
<bean id="environment"
    class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
    lazy-init="false">
    <property name="ignoreResourceNotFound" value="true" />
    <property name="locations">
      <list>        
            <value>/WEB-INF/openreports.properties</value>        
      </list>
    </property>
  </bean> 
  • Move the file openreports.properties from C:\openreports-tomcat\openreports\src to C:\openreports-tomcat\openreports\WebRoot\WEB-INF.
  • Edit the file C:\openreports-tomcat\openreports\build.xml to change the deployment path of the openreports.properties file. Add an entry to the “war” target fileset for this file
<target name="war" depends="jar">
 <war destfile="${deploy}/openreports.war" webxml="${web-inf}/web.xml">
  <fileset dir="${WebRoot}">
   <include name="**/openreports.properties" />
  • These last 3 steps will allow you to change the openreports database at a later time, without having to recompile the application.
  • Open a command prompt window and navigate to C:\openreports-tomcat\openreports
  • Type ant war and hit enter.
  • Wait for the task to complete with a BUILD SUCCESSFUL message
  • Start the tomcat service
  • Navigate to localhost:8080/ and login to the web application manager.
  • Deploy the updated war file found at C:\openreports-tomcat\tomcat\webapps\openreports.war
  • Nagivate to localhost:8080/openreports
  • Login using username admin and password admin.
  • Click on the Administration button, then the Settings link and set the following properties
Base directory – C:\openreports-tomcat\reports [where jasper or birt report files will reside]
Report generation directory – C:\openreports-tomcat\reports\generated
Temp directory – C:\openreports-tomcat\temp
Query report max rows – 1000
  • If you would like to use an independent tomcat server with the sample hsqldb database that comes with openreports, make sure that the version of the hsqldb driver referenced in the C:\openreports-tomcat\database\start-database.bat file used to start up the database is the same one used in the tomcat installation e.g. in the tomcat\lib folder. Otherwise you may get a “connection is broken...” error when starting the application if the openreports.properties file points to the sample database.


Using BIRT reports
OpenReports 3.2.0 supports BIRT 2.3.2.
  • Copy the JDBC drivers for the databases used by the BIRT reports to the folder tomcat\webapps\openreports\WEB-INF\platform\plugins\org.eclipse.birt.report.data.oda.jdbc_2.3.2.r232_v20090212\drivers
  • When creating a new report in OpenReports, when adding a report template, add the .rptdesign report file.
  • To design birt reports, use the BIRT RCP designer 2.3.2. You can download it from http://download.eclipse.org/birt/downloads/index2.3.2.php

When exporting to xls, BIRT uses Excel 2003 xml format [birt uses office 2003 xml for all formats but OpenReports doesn't have an option for exporting to doc or ppt]. This doesn't open properly by default in OpenOffice. To generate binary xls files, you can use the Tribix xls emitter for BIRT.
  • Download xls-emitter-bin_2.3.1.zip from http://sourceforge.net/projects/tribix/files/
  • Download the Apache POI library. Download the file poi-bin-3.2-FINAL-20081019.zip from http://archive.apache.org/dist/poi/release/bin/
  • Extract xls-emitter-bin_2.3.1.zip to a temporary location e.g. C:\temp
  • Extract poi-bin-3.2-FINAL-20081019.zip to a temporary location e.g. C:\temp
  • To use the tribix emitter in the Eclipse RCP Designer, copy the contents of c:\temp\xls-emitter-bin_2.3.1\plugins to birt-rcp-report-designer-2_3_2\plugins. [a jar file and a folder]
  • Copy c:\temp\poi-3.2-FINAL\poi-3.2-FINAL-20081019.jar to birt-rcp-report-designer-2_3_2\plugins\org.uguess.birt.report.engine.emitter.xls_2.3.1.200812291511\lib
  • Rename the file birt-rcp-report-designer-2_3_2\plugins\org.eclipse.birt.report.engine.emitter.prototype.excel_2.3.2.r232_v20090601.jar e.g to not-used-org.eclipse.birt.report.engine.emitter.prototype.excel_2.3.2.r232_v20090601.jar
  • Open the BIRT designer and run a report as XLS.
 
  • To use the tribix emitter in OpenReports, stop tomcat and copy the contents of c:\temp\xls-emitter-bin_2.3.1\plugins to tomcat\webapps\openreports\WEB-INF\platform\plugins.
  • Copy c:\temp\poi-3.2-FINAL\poi-3.2-FINAL-20081019.jar to tomcat\webapps\openreports\WEB-INF\platform\plugins\org.uguess.birt.report.engine.emitter.xls_2.3.1.200812291511\lib
  • Rename the file tomcat\webapps\openreports\WEB-INF\platform\plugins\org.eclipse.birt.report.engine.emitter.prototype.excel_2.3.2.r232_20090202.jar e.g. to not-used-org.eclipse.birt.report.engine.emitter.prototype.excel_2.3.2.r232_20090202.jar
  • Restart tomcat
  • When you export BIRT reports to XLS, they will now use the tribix xls emitter.


Using JasperReports
OpenReports 3.2.0 supports jasperreports 3.5.1 by default.
  • To design reports using the jasperreports engine, install and use iReport. You can download it from http://sourceforge.net/projects/ireport/files/ 
  • If you use an iReport version later than 3.5.1 to design the reports, reports you deploy to OpenReports may not display any data. This is because the same version of jasperreports used to compile a report should be used to run it.
To use a later version of jasperreports e.g. 3.7.0, use the following additional steps.
  • Download the files jasperreports-3.7.0.jar and jasperreports-javaflow-3.7.0.jar from http://sourceforge.net/projects/jasperreports/files/
  • Copy these two files to the tomcat\webapps\openreports\WEB-INF\lib folder
  • Delete the files jasperreports-3.5.1.jar and jasperreports-3.5.1-javaflow.jar from tomcat\webapps\openreports\WEB-INF\lib. Stop tomcat if the files are in use and can't be deleted.
  • When creating a new report in OpenReports, when adding a report template, add the .jasper report file rather than the .jrxml file. To get a .jasper file, preview the report from within iReport.
If you need to compile a jrxml file to a particular jasper version, e.g. a report to be used with the jasperreports 3.5.1 engine in OpenReports, download and use the iReport version corresponding to the required jasper version.

Installing OpenI 2.0 RC2

OpenI is an open source business intelligence application. It's main emphasis is on providing OLAP analysis, although it can also do regular reporting by allowing publishing of jasper report files.

Prerequisites
Tomcat 5.5+ [with JDBC driver in the tomcat\lib directory]
JRE 1.5+
OLAP server
RDBMS + JDBC driver

Versions used
Tomcat 6.0.20
JRE 1.6.0_18
Mondrian 3.1.5
MySQL 5.0.45
MySQL Connector/J 5.1.10

Steps
  • Download the openi-tomcat package from sourceforge, http://sourceforge.net/projects/openi/files/
  • Extract the zip package to a temporary folder e.g. C:\temp
  • Edit the file tomcat\conf\tomcat-users.xml file and add some details for openi users.
<role rolename="openi"/>
<role rolename="app_admin"/>
<role rolename="foodmart_user"/><role rolename="foodmart_admin"/>
<user username="openiadmin" password="password" roles="openi,app_admin"/>
<user username="foodmartadmin" password="password" roles="openi,foodmart_admin"/>
<user username="foodmartuser" password="password" roles="openi,foodmart_user"/> 
  • Edit the tomcat\webapps\mondrian\web-inf\datasources.xml file. Modify the default datasource [with datasourcename of Provider=Mondrian;DataSource=MondrianFoodMart;].
  • Edit the DatasourceInfo element to put the appropriate details for the foodmart sample database i.e database url, username and password. e.g.
<DataSourceInfo>Provider=mondrian;Jdbc=jdbc:mysql://localhost/foodmart;JdbcUser=foodmart;JdbcPassword=foodmart;JdbcDrivers=com.mysql.jdbc.Driver;</DataSourceInfo>
  • Start tomcat
  • Copy the file c:\temp\openi\openi.war to the tomcat\webapps folder. This will cause the application to be deployed
  • Using a browser, navigate to localhost:8080/openi
  • Login with username/password of openiadmin/password
  • Openi needs a folder in which to place project details. You'll be prompted to create one e.g .in c:\openi-projects. Click on the create sample project button to do this.
  • This will create the folder with a sample project that's made for the foodmart sample database.
  • Click on the Logout button
  • Edit the file c:\openi-projects\foodmart\project.xml and modify the jdbc_default string entry with the details for the sample foodmart database e.g. Put the correct database url, username and password. The details for the mondrian data source entry should match those in the tomcat\webapps\mondrian\web-inf\datasources.xml file, if this wasn't changed when installing the mondrian web application.
  • Create a new environment variable called PROJECTS_DIR with the value c:\\openi-projects.
  • Using a browser, navigate to localhost:8080/openi
  • Login with username/password of openiadmin/password
  • You can now view the analyses and reports of the sample foodmart project.

Installing Mondrian 3.1.5

Mondrian is an open source ROLAP server. It uses the ROLAP scheme of storing data i.e. It doesn't have a data storage engine of its own. The data is stored in an external relational database.

Prerequisites
JRE 1.4+
Tomcat 5.5+ [with JDBC driver in the tomcat\lib directory]
RDMBS + JDBC driver

Versions used
JRE 1.6.0_18
Tomcat 6.0.20
MySQL 5.0.45
MySQL Connector/J 5.1.10

Steps
mysql> create database foodmart;
mysql> grant all on foodmart.* to foodmart@localhost identified by "foodmart";
mysql> use foodmart;
mysql> \. c:\temp\foodmart_mysql.sql
mysql> quit
  • Start tomcat
  • Copy c:\temp\mondrian-3.1.5.13307\lib\mondrian.war to the tomcat\webapps directory. This will cause the mondrian application to be deployed.
  • Edit the the fourhier.jsp, mondrian.jsp, colors.jsp and arrows.jsp files in the tomcat\webapps\mondrian\web-inf\queries directory. Edit the following line
<jp:mondrianQuery id="query01" jdbcDriver="sun.jdbc.odbc.JdbcOdbcDriver" jdbcUrl="jdbc:odbc:MondrianFoodMart" catalogUri="/WEB-INF/queries/FoodMart.xml">
  • Replace it with details of the mysql foodmart database you've just created
<jp:mondrianQuery id="query01" jdbcDriver="com.mysql.jdbc.Driver" jdbcUrl="jdbc:mysql://localhost/foodmart?user=foodmart&password=foodmart" catalogUri="/WEB-INF/queries/FoodMart.xml"> 
  • Edit the the testrole.jsp files in the tomcat\webapps\mondrian\web-inf\queries directory. Edit the following line
<jp:mondrianQuery id="query01" jdbcDriver="sun.jdbc.odbc.JdbcOdbcDriver" jdbcUrl="jdbc:odbc:MondrianFoodMart" catalogUri="/WEB-INF/queries/FoodMart.xml" role="California manager">
  • Replace it with details of the mysql foodmart database you've just created
<jp:mondrianQuery id="query01" jdbcDriver="com.mysql.jdbc.Driver" jdbcUrl="jdbc:mysql://localhost/foodmart?user=foodmart&password=foodmart" catalogUri="/WEB-INF/queries/FoodMart.xml" role="California manager">
  • Edit the tomcat\webapps\mondrian\web-inf\datasources.xml file. Edit the datasourceinfo tag of the default data source to have the details of the sample foodmart database. e.g.
<DataSourceInfo>Provider=mondrian;Jdbc=jdbc:mysql://localhost/foodmart;JdbcUser=foodmart;JdbcPassword=foodmart;JdbcDrivers=com.mysql.jdbc.Driver;</DataSourceInfo>
  • Edit the tomcat\webapps\mondrian\web-inf\mondrian.properties file. Edit the connectionstring property to have the details of the sample foodmart database. e.g.
mondrian.test.connectString=Provider=mondrian;Jdbc=jdbc:mysql://localhost/foodmart;JdbcUser=foodmart;JdbcPassword=foodmart;JdbcDrivers=com.mysql.jdbc.Driver;Catalog=/WEB-INF/queries/FoodMart.xml;
  • Edit the tomcat\webapps\mondrian\web-inf\web.xml file. Modify all occurrences of the string @mondrian.webapp.connectString@, replacing it with details for connecting to the sample foodmart database. This will be required for the connectString context parameter and the MDXQueryServlet servlet sections of the file e.g
<context-param>
    <param-name>connectString</param-name>
    <param-value>Provider=mondrian;Jdbc=jdbc:mysql://localhost/foodmart;JdbcUser=foodmart;JdbcPassword=foodmart;Catalog=/WEB-INF/queries/FoodMart.xml;JdbcDrivers=com.mysql.jdbc.Driver;</param-value>
  </context-param>

  <servlet>
    <servlet-name>MDXQueryServlet</servlet-name>
    <servlet-class>mondrian.web.servlet.MdxQueryServlet</servlet-class>
    <init-param>
      <param-name>connectString</param-name>
      <param-value>Provider=mondrian;Jdbc=jdbc:mysql://localhost/foodmart;JdbcUser=foodmart;JdbcPassword=foodmart;JdbcDrivers=com.mysql.jdbc.Driver;Catalog=/WEB-INF/queries/FoodMart.xml;</param-value>
    </init-param>
  </servlet>
  • Stop tomcat
  • Download the binary distribution of xalan 2.7.1 from http://xml.apache.org/xalan-j/downloads.html
  • Unzip the package to a temporary folder e.g. c:\temp
  • Delete the file tomcat\webapps\mondrian\web-inf\lib\xalan.jar
  • Copy the files xalan.jar, xercesImpl.jar, xml-apis.jar and serializer.jar from c:\temp\xalan-j_2_7_1 to the folder tomcat\webapps\mondrian\WEB-INF\lib\
  • Start tomcat
  • Using your browser, navigate to localhost:8080/mondrian
  • You can now get a feel of the examples using the links provided.


Using the schema workbench
In order to create OLAP cubes, you can use the mondrian schema workbench. The schema workbench is a Java desktop application allows you to
  • Visually create and test Mondrian OLAP cube schemas, validating the schema against the cube database
  • Run example MDX queries using the schema and the database
  • Browse the cube database
Steps
  1. Download the schema workbench zip package from sourceforge, http://sourceforge.net/projects/mondrian/files/
  2. Extract the zip file to c:\
  3. Place jdbc drivers to connect to the source database in the c:\schema-workbench\drivers folder
  4. Double-click the file c:\schema-workbench\workbench.bat to start the schema workbench. You'll need to have defined a JAVA_HOME or JRE_HOME environment variable pointing to the java location.
  5. Click on the Tools | Connection menu
  6. Enter the connection details for the database
  7. You can then open the xml file that contains a mondrian schema definition for editing, or create a new schema definition.

Installing Pentaho BI Server 3.5.0

The Pentaho BI Suite Community Edition [CE] is an open source business intelligence package that includes ETL, analysis, metadata, and reporting capabilities. The suite is composed of server components and client tools. The server components [also referred to as the BI Platform] consist of the BI Server, the administration console and the user console. The BI server is responsible for management and delivery of reports.

Some of the Pentaho client tools include:
  • Report Designer: Used to create formatted reports. Report Designer offers far more flexibility and functionality
    than the ad hoc reporting capabilities of the Pentaho User Console.
  • Design Studio: An Eclipse-based tool that enables you to hand-edit a report or analysis view
    xaction file. Generally, people use Design Studio to add modifications to an existing report that
    cannot be added with Report Designer. Design Studio is also required to enable report scheduling, e-mail distribution, dynamic and static prompting, and more.
  • Metadata Editor: Enables you to add a custom metadata layer to an existing data source.
    Usually you would do this for a data source that you intend to use for analysis or reporting; it's
    not required, but it makes it easier for business users to parse the database when building a
    query.
  • Pentaho Data Integration: Also known as Kettle. An extract, transform, and load (ETL) tool, which enables
    you to access and prepare data sources for analysis, data mining, or reporting.
  • Schema Workbench: A graphical tool that helps you create ROLAP schemas for analysis.

These steps are for setting up the server components.

Prerequisites
JRE or JDK 1.5+

Versions used
Pentaho BI Server 3.5.0
Pentaho Report Designer 3.5.0
JRE – 1.6.0.17

Steps
  • Download the business intelligence server zip file from SourceForge, http://sourceforge.net/projects/pentaho/files/
  • Download the report designer zip file from the same SourceForge location
  • Create a folder c:\pentaho\server and extract the BI server zip file here.
  • Create a folder c:\pentaho\design-tools and extract the report designer zip file here.
  • Go to Start > Control Panel > System > Advanced System Settings. Select the Advanced tab and click on the Environment Variables button. Click on the new button and create a variable named JRE_HOME with the value set to the path of the JRE directory e.g. C:\Program Files\Java\jre6. If you have JDK installed, create a variable named JAVA_HOME instead with the value set to the path of the JDK directory.
  • Note that the BI server package seems to come with it's own JRE which will be located in C:\Pentaho\server\biserver-ce\jre.
  • Edit the file C:\Pentaho\server\biserver-ce\tomcat\bin\setclasspath.bat. Modify the first four lines of the gotJreHome label so that they appear as follows. [tools.jar comes with JDK, not JRE]
:gotJreHome
if not exist "%JRE_HOME%\bin\java.exe" goto noJavaHome
if not exist "%JRE_HOME%\bin\javaw.exe" goto noJavaHome
REM if not exist "%JRE_HOME%\lib\tools.jar" goto noJreToolsJar
REM set CLASSPATH=%JRE_HOME%\lib\tools.jar
  • Edit the files start-pentaho.bat and stop-pentaho.bat located in C:\Pentaho\server\biserver-ce\. Comment out the line setting the value of the JAVA_HOME variable so that it looks as below
REM set JAVA_HOME=%_PENTAHO_JAVA_HOME%
  • The preceding two steps are only required if you only have JRE and don't have JDK
  • Edit the file C:\Pentaho\server\biserver-ce\pentaho-solutions\system\publisher_config.xml. Enter a password [in clear text] in the element. This is the password that will be used when publishing reports from the report designer to the BI server. Don't leave it blank.
  • Open a command prompt window and navigate to c:\Pentaho\server\biserver-ce. Type start-pentaho and hit enter. This will start the HSQLDB database the BI server uses internally in a new command prompt window and start the tomcat server bundled with the BI server also in a new command window.
  • Wait for the tomcat server to finish starting up. When finished the tomcat command window will display something like INFO: Server startup in 77980 ms
  • Open a command prompt window and navigate to c:\Pentaho\server\administration-console. Type start-pac and hit enter. This will start the pentaho administration console.
  • Open a browser window and navigate to http://localhost:8099 to access the pentaho administration console. If prompted for login credentials, use “admin” for the username and “password” for the password.
  • Open a browser window and navigate to http://localhost:8080/pentaho to access the pentaho user console
  • If port 8080 is already in use, for instance by another web server, modify the file C:\Pentaho\server\biserver-ce\tomcat\conf\server.xml. Search for 8080 and replace the value for the HTTP/1.1 connector with another port number that's not in use. Restart the server and include the new port number in the URL to access the user console.
  • Click on the login button in the user console and select the sample user Joe (admin) to login. The username and password are automatically filled in the form. This user has a username of “Joe” and a password of “password”.
  • If you'll need to access the user console from different machines, edit the file C:\Pentaho\server\biserver-ce\tomcat\webapps\pentaho\WEB-INF\web.xml. Change the base-url parameter, replacing “localhost” with the server's hostname or IP address.
  • To start the report designer, open a command prompt window and navigate to C:\Pentaho\design-tools\report-designer. Type report-designer and hit enter.
  • To stop the BI server, open a command prompt window and navigate to c:\Pentaho\server\biserver-ce. Type stop-pentaho and hit enter. OR double click on the stop-pentaho.bat file.
  • To stop the administration console, double click the file c:\Pentaho\server\administration-console\stop-pentaho.bat file.
  • Note that if you use IE8 for the browser, intranet settings may not be enabled for localhost, and some features of the user console will not work properly. To correct this, select the Tools | Internet Options menu. If the main menu [File, Edit etc] isn't displayed on IE, press the alt key to get it to display. Select the security tab, then the Local intranet zone and click on the sites button. Uncheck the Automatically detect intranet network box and click on the Advanced button. Type in http://localhost and click on the Add button.
  • To enable emailing of reports, edit the file C:\Pentaho\server\biserver-ce\pentaho-solutions\system\smtp-email\email_config.xml, adding the details of the email server.

Installing Bugzilla 3.2

Bugzilla is an open source, web-based bug-tracking application.



Prerequisites
Web server configured to process CGI requests
Perl 5.8.1 and above
MySQL 4.2.1 and above
Internet connection

Versions used
Apache 2.2.8
MySQL 5.0.45
ActivePerl 5.8.8.820

Steps
  • Download the package [tarball] from the bugzilla website, bugzilla.org.
  • Unzip the package to a folder in the web server's document root, e.g. Bugzilla
  • Create a database on the MySQL server e.g.
mysql> create database bugs;
mysql> grant all on bugs.* to bugs@localhost' identified by 'password';
mysql> quit;
  • Confirm/enable CGI support in Apache by including the following line in the section of the httpd.conf file
AddHandler cgi-script .cgi
  • Allow running of .cgi scripts by adding the ExecCGI option to the section of the the httpd.conf file
Options Indexes FollowSymLinks ExecCGI
  • Allow Bugzilla's .htaccess file to restrict access to sensitive documents by allowing it to override the defaults. This involves changing AllowOverride None to AllowOverride All
  • To tell Apache to use Perl to execute .cgi files, use the ScriptInterpreterSource directive. Add ScriptInterpreterSource Registry-Strict to the httpd.conf file. In order for ScriptInterpreterSource Registry-Strict to work, you also need to add an entry to the Registry. Create a key HKEY_CLASSES_ROOT\.cgi\Shell\ExecCGI\Command with the default value of the full path of perl.exe with a -T parameter e.g. C:\Perl\bin\perl.exe -T . This will cause this path to be used to run the cgi scripts rather than the path specified in the first line of the scripts themselves. Bugzilla's cgi scripts specify the path of the perl executable as /usr/bin/perl
  • Add index.cgi to the DirectoryIndex list in the httpd.conf file
  • Restart Apache
  • To confirm that perl cgi scripts process OK, create a file test.cgi in the document root folder with the following contents and then navigate to localhost/test.cgi. If Hello, World is displayed on the browser, cgi configuration was successful
#!/perl/bin/perl
# test cgi execution of perl script
print "Content-type: text/html\r\n\r\n";
print "Hello, World.";
  • Open a command prompt window and run checksetup.pl in the bugzilla folder. This checks for perl modules required for bugzilla and guides on which ones to install if they aren't present
cd \apache\htdocs\bugzilla
perl checksetup.pl
  • With an internet connection available, run the commands given to install the relevant perl packages/modules using PPM [Perl Package Manager]. Add the suggested repository and install at least the mandatory packages. Alternatively download and unzip the individual packages from the suggested website e.g. theoryx5.uwinnipeg.ca/ppms for perl 5.8 packages or ppm.activestate.com/PPMPackages/zips/, and then use PPM to install them offline. e.g. ppm install c:\tmp\TimeDate.ppd
  • After all mandatory packages are installed and the script has read the ./localconfig file, edit the file C:\apache\htdocs\bugzilla\localconfig, updating the database variables, $db_driver, $db_name, $db_user, $db_pass, with details bugzilla will use to connect to the database created.
  • Run checksetup.pl again. This time it will build your database tables and initialise Bugzilla. Enter the hostname of the SMTP server to use [or localhost to continue installation]. Also enter the admin email, name and password. Installation is now complete.
  • Navigate to yourserver/bugzilla/ using your browser and login using the administrator account created. Use the email address as the login.
  • Click on the parameters link to update some required settings. Set at least the maintainer email address and urlbase. This is the final configuration step and after this bugzilla is ready for use.
 
  • Add a Scheduled Task to run collectstats.pl nightly
  • Add a Scheduled Task to run whineatnews.pl nightly
  • Add a Scheduled Task to run whine.pl nightly. whine.pl needs to run in Perl's Taint mode. The command line needs to include the -T option e.g. C:\Perl\bin\perl.exe -T C:\apache\htdocs\bugzilla\whine.pl
  • Backup the entire Bugzilla directory
  • Backup the Bugzilla Database. It contains all the Bugs, Users, Attachments etc. Schedule the mysqldump utility to create the database dump [backup file], and add the resulting file to your backup media 

Note
If the main bugzilla page doesn't load, check that the web server is properly configured by running the perl script testserver.pl in the bugzilla folder to get an idea of what may be wrong e.g.
cd \apache\htdocs\bugzilla
perl testserver.pl http://localhost/bugzilla

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 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

Tuesday, March 23, 2010

Installing SquirrelMail 1.4.20 RC2

SquirrelMail is an application that provides web-based access to POP or IMAP email servers.

Prerequsites
Web server enabled to server php pages
PHP
Email server
Perl

Versions used
Apache 2.2.8
PHP 5.2.8
Hmailserver 5.3
Perl 2.6

Steps
  1. Download the zip package from the website, squirrelmail.org
  2. Extract the zip file to a temporary location e.g. C:\temp
  3. Create a new folder named squirrelmail in the webroot folder of the web server e.g. In c:\apache\htdocs
  4. Copy the contents of c:\temp\squirrelmail-1.4.20-RC2 to c:\apache\htdocs\squirrelmail
  5. Create the folders c:\squirrelmail\data and c:\squirrelmail\attachments
  6. Open a command prompt window and change directory to c:\apache\htdocs\squirrelmail\config
  7. Type perl conf.pl
  8. A menu driven command interface is displayed
  9. Review the different options. Modify the server settings [domain name, imap server, smtp server [use IP e.g. 127.0.0.1 for the last two]] and general settings [data directory, attachment directory. Set them to the directories created above]
  10. Save data when finished and quit
  11. This will create a new file, c:\apache\htdocs\squirrelmail\config\config.php with the appropriate config information
  12. Using a browser, navigate to localhost/squirrelmail
  13. To log in, use the credentials of an available email account on the configured mail server

Installing Roundcube 0.3.1

Roundcube is an application that provides web-based access to IMAP email servers.

Prerequisites
Web server with php configured
PHP
Email server
RDBMS

Versions used
Apache 2.2.8
PHP 5.2.8
Hmailserver 5.3
MySQL 5.0.45

Steps
  • Download the roundcube tar.gzip package from the roundcube website, roundcube.net
  • Unzip the zip and tar to a temporary location e.g. C:\temp
  • Create a new folder named roundcubemail in the webroot folder of the web server e.g. In c:\apache\htdocs
  • copy the contents of c:\temp\roundcubemail-0.3.1 to c:\apache\htdocs\roundcubemail
  • Open a command prompt window
  • Type mysql -u root -p
  • Enter the password for the mysql root user
mysql> create database roundcube;
mysql> grant all privileges on roundcube.* to roundcube@localhost identified by "roundcube";
> quit
  • Using a browser, navigate to localhost/roundcubemail/installer/
  • Click on the start installation button
  • Click on the next button
  • Disable spell checking, set details for the database and IMAP server
  • Click on the create config button
  • Create a new file named main.inc.php in c:\apache\htdocs\roundcubemail\config and paste the contents of the main.inc.php section to it
  • Edit this file, main.inc.php, setting the smtp authentication details [for servers that require smtp authentication].
// SMTP username (if required) if you use %u as the username RoundCube
// will use the current username for login
$rcmail_config['smtp_user'] = 'valid user account';

// SMTP password (if required) if you use %p as the password RoundCube
// will use the current user's password for login
$rcmail_config['smtp_pass'] = 'valid password';

// SMTP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
// best server supported one)
$rcmail_config['smtp_auth_type'] = 'LOGIN';
  • Create a new file named db.inc.php in c:\apache\htdocs\roundcubemail\config and paste the contents of the db.inc.php section to it
  • Click on the continue button
  • Click on the initialize database button
  • Fill in appropriate details for testing smtp settings and click on the send test mail button
  • Fill in appropriate details for testing the imap configuration and click on the check login button
  • Open a new browser window and navigate to localhost/roundcubemail
  • Log in with details of a valid email account

Installing phpMyAdmin 3.1.1

phpMyAdmin is a web-based application used to administer MySQL databases.

Prerequisites
Web server configured to process PHP pages
PHP

Versions used
PHP 5.2.8
Apache  2.2.8

Steps
  1. Download the package from the phpMyAdmin website, phpmyadmin.net.
  2. Unzip the package to a folder in the web server's document root, e.g. phpMyAdmin
  3. Create a folder named config in this home folder
  4. Navigate to http://yourserver/phpmyadmin/setup/ to set up the config.inc.php file in the config folder
  5. Click on the New Server to specify the details of the MySQL server to administer. Specify the hostname for the server. Other options can be left as default. Save these options.
  6. Save the new configuration
  7. Edit the newly created file ./config/config.inc.php. Change the blowfish_secret value to a different string that must contain numbers, letters and special characters e.g. my2blowfish$ecret.
  8. Move the file to the root of the phpmyadmin directory.
  9. The installation is complete and you can navigate to yourwebserver/phpmyadmin to start using it. Login with a valid MySQL login to the server configured for administration.
  10. If you are upgrading your installation, copy the config.inc.php file to your new installation/folder.

Installing Mantis 1.1.6

Mantis is an open source web-based bug tracking system.

Prerequisites
Web server configured to process PHP pages
PHP
MySQL

Versions used
PHP – 5.2.8
Apache -  2.2.8
Mantis – 1.1.6

Steps

  • Download the package from the mantis website, mantisbt.org
  • Unzip the package to a folder in the web server's document root, e.g. Mantis
  • Create a database on the MySQL server e.g.
mysql> create database mantis;
mysql> grant all on mantis.* to mantis@localhost identified by 'password';
mysql> flush privileges;
mysql> quit;
  • Open your browser and navigate to yourserver/mantis/admin/install.php. This will run the installer. Provide database connection details
  • Installation is complete. Login as the admin user with the username administrator and password root. Change the default password once logged in.
  • Delete the \mantis\admin folder so that install scripts are not re-run by mistake.
Configuring mantis
To configure mantis e.g. to send email, edit the c:\apache\mantis\config_inc.php file. Add the following.
// Setting up the mail 
    $g_phpMailer_method='2'; //smtp
    $g_smtp_host='smtp.server.address';

//for smtp authentication. If not required, set to ''
    $g_smtp_username='email address';
    $g_smtp_password='password';

// Configure email addresses system 
        $g_administrator_email='email address';
        $g_webmaster_email=$g_administrator_email; //shown on mantis pages
        $g_from_email='email address'; //from address for emails generated by mantis
$g_from_name= 'Mantis Bug Tracker';
    $g_return_path_email='email address';

// Setting the language and date format
        $g_default_language='english';
        $g_short_date_format='d-m-Y';
        $g_normal_date_format='d-m-Y H:i';
        $g_complete_date_format='d-m-Y H:i';
// Customizing Mantis
        $g_window_title='My Mantis';

Installing AtMail open 1.03

AtMail is an application that provides web-based access to IMAP email servers.

Prerequisites
Web server with php configured
PHP
Email server
RDBMS

Versions used
Apache 2.2.8
PHP 5.2.8
Hmailserver 5.3
MySQL 5.0.45

Steps
  1. Download the installation package from artmail.org
  2. Unzip the zip and tar to a temporary location e.g. C:\temp
  3. Create a new folder named atmail in the webroot folder of the web server e.g. In c:\apache\htdocs
  4. Copy the contents of c:\temp\atmail to c:\apache\htdocs\atmail
  5. Using a browser, navigate to localhost/atmail
  6. Follow the configuration steps given
  7. Log in using appropriate email details

Installing Apache HTTP server 2.2.8

Apache HTTP server is an open source web server.

Prerequisites
None

Steps
  1. Download package from Apache HTTP server website, http://httpd.apache.org/
  2. Uninstall any previously installed version of Apache and delete all the folders where Apache was installed.
  3. Ensure no service is listening to port 80. Stop/disable any that are, e.g. IIS, Skype. This isn't mandatory as the port that Apache will listen to can be updated after the installation is done.
  4. Run the installer.
  5. On the Server Information page, put in “localhost” for the network domain and server name. Put anything for the administrator's address e.g. admin@localhost.com. Leave the default selection to install for all users to port 80 as a service.
  6. Click Next and choose Typical Installation
  7. Click Next and change the destination folder to C:\Apache instead of the default installation path. This is to avoid permission inconveniences when making updates if one installs to the Program Files folder.
  8. The Apache Service Monitor [feather icon] should show on the task bar after installation is complete.
  9. Navigate to http://localhost. If the page says “It works!”, then installation was successful.

To change the port on which Apache should listen e.g. if IIS was already listening on port 80 and it isn't desired to change this, update the httpd.conf file in the conf directory within the Apache install path. Change instances of port 80 to another unused port e.g. 8080. The editor needs to be run as administrator to be able to save the changes if installation was done to the Program Files folder. Restart Apache using the Apache monitor and navigate to http://localhost:8080 to confirm the changes work OK.



Setting up SSL (for https access)
  • Create an environment variable named OPENSSL_CONF with the value C:\Apache\conf\openssl.cnf
  • Open a command prompt window and navigate to c:\apache\bin
  • Type the following command sequence
openssl genrsa -des3 -out server.key 1024
  • Provide a pass phrase when prompted (4-500 characters)
openssl rsa -in server.key -out server.pem
openssl req -new -key server.key -out server.csr
  • After providing the passphrase, provide the requested information. Set the common name to localhost (or the fully qualified domain name for the web server). The other fields can be set as appropriate or left blank. Leave the extra information fields blank.
openssl x509 -req -days 999 -in server.csr -signkey server.key -out server.crt
  • Copy the files server.crt and server.pem from the c:\apache\bin folder to the c:\apache\conf folder

  • Edit the c:\apache\conf\http.conf file
  • Uncomment the line for loading the ssl module
LoadModule ssl_module modules/mod_ssl.so
  • Uncomment the line that includes ssl configuration
Include conf/extra/httpd-ssl.conf
  • Edit the c:\apache\conf\extra\httpd-ssl.conf
  • Set the SSLCertificateKeyFile attribute
SSLCertificateKeyFile "C:/Apache/conf/server.pem"
  • Also ensure the SSLCertificateFile attribute points to the server.crt file just created
SSLCertificateFile "C:/Apache/conf/server.crt"
  • Restart apache and try to access a website via https e.g. https://localhost/myapp/ (no need to specify the port number e.g. https://localhost/443/myapp)