Installing eTB Manager (Windows server)¶
Requirements¶
The e-TB Manager is a java we based application that uses the JBOSS AS as the application server. Although the JBOSS server is also a web server, it’s recommended to use another web server (IIS or Apache) to make the application available. Along this document, you will find instructions on how to install eTB Manager and create a bridge between JBOSS server and the Apache Web Server. Below are the software required to install eTB Manager:
- Java JRE 1.6 (Because of issues with version 1.7, it’s better to use version 1.6);
- MySQL Server 5.5 or higher;
- JBOSS AS 4.2.3.GA customized;
- Apache Web Service with mod_jk
Database¶
1. Download MySQL Server from www.mysql.com
2. Install MySQL in the server computer where database will be hosted;
3. Remember to set default database as InnoDB and to use UTF8 as the default database engine;
4. It’s also recommended to download any tool to administer MySQL Server (also available in www.mysql.com)
5. Create a new database called etbmanager;
6. Restore the database backup in this database. There are several ways of restoring the database backup. Through the mysql command line:
C:\ mysql –u [username] -p[password] etbmanager < etbmanager.bkp.sql
JBOSS AS¶
The JBOSS is the application server in use by eTB Manager. The version in use is the JBOSS 4.2.3.GA, but it was adapted to run with eTB Manager, so it’s highly recommended to download the JBOSS server from the eTB Manager site.
1. Download JBOSS server from
http://www.etbmanager.org/download/package/jboss-4.2.3.ga.zip
2. Uncompress the content of this file in an empty directory;
3. Check if JBOSS can be properly instantiated. Go to the <jboss>\bin folder and execute the following command:
C:\ run.batb. When it finishes execution, open the page
http://localhost:8080
And make sure the following page is displayed
JBOSS is working fine. Stop it with Ctrl-C and move to the next steps.
Installing JBOSS as a Windows service¶
1. Go to the <jboss>/bin folder and run the following command:
C:\ service.bat install
You’ll see a new service called “JBoss Application Server 4.2.3” in your Services window:
Configuring eTB Manager Database Access¶
In order to configure the database connection of eTB manager, follow the instructions bellow:
1. Go to the <jboss-dir>\server\default\deploy\MSH and open the file etbmanager-ds.xml in a text editor of your choice;
<!DOCTYPE datasources
PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
"http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
<datasources>
<local-tx-datasource>
<jndi-name>mdrtbDatasource</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/sitetb</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>root</user-name>
<password>admin</password>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
<metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
2. Edit the lines 12, 14 and 15 entering the right configuration for your database server;
3. Save the file and close the text editor;
Configuring eTB Manager to send e-mail messages¶
You must inform a valid e-mail user account in order to have eTB Manager dispatching e-mail messages (for example, a new password to a user). To do that, follow the steps below:
1. In the <jboss>\server\default\deploy\MSH folder, open the file etbmanager-service.xml
<!DOCTYPE server>
<server>
<mbean code="org.jboss.mail.MailService"
name="jboss:service=mail/etbMail">
<attribute name="JNDIName">java:/mail/etbMail</attribute>
<!-- Use these if your outgoing server requires authentication -->
<attribute name="User">mail-user</attribute>
<attribute name="Password">mail-password</attribute>
<attribute name="Configuration">
<configuration>
<property name="mail.transport.protocol" value="smtp"/>
<property name="mail.smtp.host" value="smtp.server"/>
<property name="mail.from" value="from@mail.com"/>
<property name="mail.debug" value="false"/>
<property name="mail.smtp.auth" value="true"/>
<property name="mail.smtp.user" value="mail-user"/>
<property name="mail.smtp.password" value="password"/>
</configuration>
</attribute>
</mbean>
</server>
2. Update lines 8,9, 13, 14, 15, 17, 18 and 19 in order to have the mail configured
Using your WEB server¶
You may already have a different WEB server (like IIS or Apache), and the JBOSS default port is 8080. So you may want to install a bridge linking your web server to the JBOSS, so the users will access the drugman system using an URL pointing to your WEB server.
To do that, you must use the “Apache Tomcat Connector”. This link explain how to use it with IIS server
http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html