|
» Forgot Password? About
» What is hipergate» Functional Modules » Benefits » Architecture Demo
» Screenshots» Demo Documentation
» Install» Manuals » API Reference » Case Studies Support
» Forums» Development Weblog » SourceForge Tracker » Commercial Support Downloads
» License» Downloads » Subversion Partners
» Become a Partner» Find a Partner Private Area» Authors |
Installation Manual for v4.0- How to upgrade from v3.0 to v4.0- Old Installation Manual for v3.0 Introduction
You can get a more printer-friendly version of this page getting the HTML source. For the impatient...
Planning your installationIn order to get a working copy of hipergate you should install all JSP pages and .jar files to the proper location on your web server and launch the Setup Assistant. hipergate 4.x requires J2SE 1.6 or later, a servlet/JSP engine (Jakarta Tomcat, BEA WebLogic, Sun Web Server, WebSphere, etc), and either PostgreSQL 8.x, Oracle 10g/XE, MySQL 5.x or Miscrosoft SQL Server 2005/DE. You should plan the location of the following files prior to install:
Main differences between /storage and /webapp are than /storage doesn't need to be available through HTTP, as /webapp require. Both are visible through HTTP in the default installation process. Required components
You can run hipergate with a non-priviledged user account. There are some initial requirements for each database in order to load hipergate:
Contents of hipergate packagehipergate releases are distributed in a ZIP compressed package with the following contents:
This diagram shows the contents of the webapp.xx and storage directories:
webapp.xx directory contents
storage directory contents
Install and configure a sample web sitePlacing your JSP files is the first task to be done in the installation process. A working servlet/JSP engine must be available, and you should take note of configuration parameters and URLs where you place JSP pages as you will need them later when using the Setup Assistant.
It is recommended that you put hipergate directly under a domain like http://localhost:8080/ Installing on Tomcat 6.0You can install a copy of Apache Tomcat in /opt/tomcat/, and make it listen HTTP requests on port 8080 (default configuration). Check the following line in your $CATALINA_HOME/conf/server.xml file: <Connector className="org.apache.coyote.tomcat4.CoyoteConnector" port="8080" ... /> You can create a new <Context> for hipergate or use an existing one. For example, you can move the webapp.xx from hipergate's ZIP package to $CATALINA_HOME/webapps/hipergate and create a new <Context> in server.xml as follows:
<Server port="8005" shutdown="SHUTDOWN" debug="0">
<Service name="Tomcat-Standalone">
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="8080" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="100" debug="0" connectionTimeout="20000"
useURIValidationHack="false" disableUploadTimeout="true" />
<Host name="localhost" debug="0" appBase="$CATALINA_HOME/webapps/hipergate"
unpackWARs="true" autoDeploy="true">
<Context path="" docBase="" debug="0"
reloadable="true" crossContext="true">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="hipergate_log." suffix=".txt" timestamp="true"/>
</Context>
</Host>
</Engine>
</Service>
</Server>
Unicode file encoding
hipergate JSP files use UFT-8 encoding. It is neccessary to instruct Tomcat to expect Unicode source files by setting the -Dfile.encoding=UTF-8 parameter on CATALINA_OPTS environment variable. If file.encoding parameter is not set you may encounter an error like org.apache.jasper.compiler.CompileException: /common/desktop.jsp Cannot read file: ze file upon application startup. Servletshipergate includes three servlets used to download files from the storage directory. directory. To retrieve file descriptors from the database you should configure the following parameters in webapp.xx/WEB-INF/web.xml file. For each servlet (HttpBinaryServlet, HttpBLOBServlet and HttpQueryServlet) you should include the following parameters:
Database connection parameters for servlets from package com.knowgate.http (HttpBinaryServlet, HttpBLOBServlet and HttpQueryServlet) may be set at /WEB-INF/web.xml file or at /etc/hipergate.cnf. Information from web.xml will be prioritaire over hipergate.cnf so if both are different web.xmlwill be used. web.xml parameters may be left empty if only one instance of the application is running on the same server, but it is neccesary to fill them if several instances are running on the same server against different databases. If no connection parameters are found on web.xml the servlet will take those from hipergate.cnf, and not from other properties files such as real.cnf or portal.cnf. Last, check that http://hostname:8080/login.html works propertly. Installing libraries
Next you should install hipergate and all required libraries in a directory where the servlet/JSP engine can find them. Creating an empty database
Executing the setup AssistantFor starting-up hipergate there are three basic requisites :
The Setup Assistant writes hipergate.cnf properties file and creates the datamodel. Once the setup is done the assistant automaticaly jumps to hipergate login page. Configuring Security and WorkAreasFor creating new Domains, Users and WorkAreas read to the User Manual. It is strongly recommended to protect directory /web/admin with additional web server basic authentication after finishing the setup process. It is neccesary to grant write permissions to the operating system account executing the web server on /tmp or C:\TEMP or any other temporary directory set on hipergate.cnf. Connection test and first loginOnce database is loaded, check the following URL: http://myserver/admin/test_connect.jsp?profile=hipergate. If everything is OK you'll see a screen with the JDBC connection URL. Login to hipergate with the following URL: http://myserver/login.html. When you load the database some example users are created. hipergate creates two default domains with 5 users that must be kept, althought it is recommended to change their default passwords.
Aditionaly, the setup process generates three test domains with some users that can be used inmediately. Each domain (test, demo and real) can be used when testing some features of the application.
Configuring servlets
After running Setup Assistant it is convenient to check /WEB-INF/web.xml file.
<servlet>
<servlet-name>HttpBinaryServlet</servlet-name>
<servlet-class>com.knowgate.http.HttpBinaryServlet</servlet-class>
<init-param>
<param-name>jdbcDriverClassName</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>jdbcURL</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>dbUserName</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>dbUserPassword</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>id_product</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>id_location</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>id_category</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>id_user</param-name>
<param-value></param-value>
</init-param>
</servlet>
<servlet>
<servlet-name>HttpBLOBServlet</servlet-name>
<servlet-class>com.knowgate.http.HttpBLOBServlet</servlet-class>
<init-param>
<param-name>jdbcDriverClassName</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>jdbcURL</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>dbUserName</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>dbUserPassword</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>nm_table</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>nm_field</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>pk_field</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>pk_value</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>bin_field</param-name>
<param-value></param-value>
</init-param>
</servlet>
<servlet>
<servlet-name>HttpQueryServlet</servlet-name>
<servlet-class>com.knowgate.http.HttpQueryServlet</servlet-class>
<init-param>
<param-name>jdbcDriverClassName</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>jdbcURL</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>dbUserName</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>dbUserPassword</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>queryspec</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>columnlist</param-name>
<param-value>*</param-value>
</init-param>
<init-param>
<param-name>where</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>orderby</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>showas</param-name>
<param-value>XLS</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>HttpBinaryServlet</servlet-name>
<url-pattern>/servlet/HttpBinaryServlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>HttpBLOBServlet
</servlet-name>
<url-pattern>/servlet/HttpBLOBServlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>HttpQueryServlet</servlet-name>
<url-pattern>/servlet/HttpQueryServlet</url-pattern>
</servlet-mapping>
Configuring multiple instances of hipergate on the same machine
All servlet default parameters may be left blank except when using several instances of hipergate running on the same machine.
Multiple instances of hipergate on the same server
It is possible to have several instances of hipergate running on the same server against different databases.
Thus for using file test.cnf, the content of dbbind.jsp must be: Known IncompatibilitiesVersion 4.0
Additional Downloads
Administrative ToolsSQL Query Tools
There is a direct SQL query tool at /admin/sql.htm. Connection pool statusMay be seen by opening page /admin/connectionpool.jsp Environment variablesCan be inspected by opening page /admin/environment.jsp Session cookiesCan be readed by opening /admin/viewcookies.html Installing on JBossContributed by Nam Tu nguyen
<local-tx-datasource>
<jndi-name>KnowgateDS</jndi-name> <connection-url>jdbc:postgresql://127.0.0.1:5432/hgoltp8t</connection-url>
<!-- The driver class -->
<driver-class>org.postgresql.Driver</driver-class>
<!-- The login and password -->
<user-name>knowgate</user-name>
<password>knowgate</password>
<security-domain>PostgreSqlDbRealm</security-domain>
<metadata>
<type-mapping>Postgre SQL</type-mapping>
</metadata>
</local-tx-datasource>
Note that a service, mbean or anything is not needed; just to make sure of modifying /default/conf/login-config.xml proprietary because the <security-domain> above is used.
Appendix 1: hipergate.cnf properties filehipergate.cnf file contains the following parameters (WARNING, $CATALINA_HOME variables are not valid in this file, they are only place here for explaination purpouses): # [Database] # Database Connection Parameters driver=org.postgresql.Driver dburl=jdbc:postgresql://192.168.1.30:5432/test schema= dbuser=postgres dbpassword=postgres # [Connection Pool] # Parameters governing com.knowgate.jdc connection pool behaviour poolsize=32 maxconnections=100 logintimeout=20 connectiontimeout=60000 connectionreaperdelay=30000 # [Files] # Where to store temporal files temp=/tmp # How hipergate reads and writes files and directories # File/Directory access mode (PUREJAVA=0, UNIX=1, WINDOWS = 2) javamode=0 # Root URL to hipergate webserver=http://hostname:8080 # optional Root to static images imageserver=http://hostname:8080/images # Protocol, hostname, username and password to access workareas and storage fileprotocol=file:// fileserver=localhost fileuser= filepassword= # Private storage directory storage=$CATALINA_HOME/webapps/storage # External shell commands to perform shelldir=/tmp # Public storage directory workareasput=$CATALINA_HOME/webapps/hipergate/workareas # Public storage URL workareasget=http://hostname:8080/workareas # Maximum file size (bytes) maxfileupload=10485760 # [Misc] # Validate XML documents? setXMLValidation=1 # Task scheduler maximum running threads maxschedulerthreads=1 # SMTP mail configuration # Protocol names must be lowercase mail.transport.protocol=smtp mail.store.protocol=pop3 mail.incoming=pop3.yourserver.com mail.outgoing=smtp.yourserver.com mail.user= # LDAP ldapconnect=ldap://127.0.0.1:389/dc=hipergate,dc=org ldapuser=cn=Manager,dc=hipergate,dc=org ldappassword=manager ldapclass=com.knowgate.ldap.LDAPNovell
Appendix 2: Manually loading the databaseCreating the database by loading binary dumpsInstead of Setup Assistant, you can also use the binary database dumps provided with the hipergate package inside the database/ directory.
Creating the database with ModelManager Java class SQL-DDL scriptsTo install the initial database using ModelManager Java class first check JDCB connectivity parameters in the hipergate.cnf file. Database chosen with the dburl parameter must be created prior to installation. Database creation process will use the DBURL, username and password parameters from hipergate.cnf file. Use the following command to load the default database objects (case sensitive): java com.knowgate.hipergate.datamodel.ModelManager /etc/hipergate.cnf create database
WARNING: all required libraries must be available on your CLASSPATH. #!/bin/sh cp=`ls -1 /opt/tomcat/webapps/hipergate/WEB-INF/lib/*.jar | tr '\n' ':'` java -cp "$cp" com.knowgate.hipergate.datamodel.ModelManager $@ You can save this script at /usr/local/bin/modelmanager.sh and run modelmanager.sh create database. Appendix 3: Configuring Distributed cache for Web FarmsIntroductionThis configuration step is neccesary if and only if you have more than one web server running in parallel. When the application runs on several machines in parallel, it is neccesary to enable the Distributed Cache Coordinator. Each web server mantains a local cache of frecuently used information such as user passwords, lookups, menu options, etc. If more than one server provides service, it exists the possibility that one server updates information on the database that is localy cached on another server. This is why it is neccesary to install a Cache Coordinator. The coordinator itself does not store any actual information, but only acts as a ticket server for clients. It is not possible to pass information among client caches, if one of them modifies information on the database, that information become invalid on all othre nodes and has to be re-loaded from the database. The cache coordinator is divided in two parts: client and server. Client part is package com.knowgate.cache at hipergate.jar. This cliente is independent of the server side. Server Side may be either of one of two types: HTTP based or EJB based. An HTTP coordinator uses one Web Server for coordinating all the other ones. This is the simplest configuration. An EJB coordinator uses an application server (such as JBoss or WebLogic) as a ticket server for client web servers. Configuring coordinator over HTTPAny node of a web farm can act as coordinator of all the other ones. There may be only one coordinator, if this machine fails, all the other will stop working. For enabling an HTTP coordinator, open appserver.cnf on echa nodo and set properties: threetiers=enabled java.naming.provider.url=http://IP_ADDRESS:PORT/cache/server.jsp Configuring coordinator over an EJB containerInstalling the coordinator on an EJB container y more complex but it gives better performance, scalability and fault tolerance. Client Side (Web Servers)If you use JBoss, additional libraries must be installed on each web server:
Server Side (JBoss)Add the following to the standardjboss.xml file: <container-configuration> <container-name>Singleton Stateless SessionBean</container-name> <call-logging>false</call-logging> <container-invoker>org.jboss.proxy.ejb.ProxyFactory</container-invoker> <container-interceptors> <interceptor>org.jboss.ejb.plugins.LogInterceptor</interceptor> <interceptor>org.jboss.ejb.plugins.SecurityInterceptor</interceptor> <!-- BMT --> <interceptor transaction = "Bean"> org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor </interceptor> <interceptor transaction = "Bean"> org.jboss.ejb.plugins.TxInterceptorBMT </interceptor> <interceptor transaction = "Bean" metricsEnabled = "true"> org.jboss.ejb.plugins.MetricsInterceptor </interceptor> <interceptor> org.jboss.resource.connectionmanager.CachedConnectionInterceptor </interceptor> </container-interceptors> <client-interceptors> <home> <interceptor>org.jboss.proxy.ejb.HomeInterceptor</interceptor> <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor> <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor> <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor> </home> <bean> <interceptor>org.jboss.proxy.ejb.StatelessSessionInterceptor</interceptor> <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor> <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor> <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor> </bean> </client-interceptors> <instance-pool>org.jboss.ejb.plugins.StatelessSessionInstancePool</instance-pool> <instance-cache/> <persistence-manager/> <transaction-manager/> <container-pool-conf> <MaximumSize>1</MaximumSize> <MinimumSize>1</MinimumSize> <strictMaximumSize>true</strictMaximumSize> </container-pool-conf> </container-configuration> Start JBoss and deploy cachecoordinator-jboss30.jar. To do so:
Appendix 4: Third Party Libraries
Appendix 5: Debug librariesThe standard build comes with a special debug library called hipergate-debug.jar.This library writtes detailed low-level execution traces to /tmp/javatrc.txt (or C:\javatrc.txt on Windows). Do not leave traces activated on production systems since they may degrade performance or cause a disk full error. Appendix 6: Notes for compiling sourcescom.oreilly.servlet.CacheHttpServlet: Cannot resolve symbol method getContentType()For solving this error include library /lib/compile/servlet.jar when compiling the project. org.jibx.runtime.JiBXException: Unable to access binding information for class com.knowgate.hipergate.Menu For solving this error run JiBX post-compiler after compiling the project by executing from command line: C:\JRE\bin\java -cp C:\JAR\bcel.jar;C:\JAR\jibx-bind-1.1.5.jar;C:\JAR\jibx-extras.jar;C:\JAR\xpp3.jar org.jibx.binding.Compile C:\knowgate\storage\xslt\schemas\menu-def-jixb.xml Upgrading from version 3.0 to 4.0
Alternative manual upgradeThe SQL-DDL scripts for converting the datamodel from v3.0 to v4.0 are at /java/com/knowgate/hipergate/datamodel/upgrade/It is neccesary to run file 300-400.ddl para la base de datos correspondiente. 210-300.ddl can be run by calling class com.knowgate.hipergate.datamodel.ModelManager from the command line like : java [-cp ...] com.knowgate.hipergate.datamodel.ModelManager /etc/hipergate.cnf upgrade 300 400 Trouble shootingJavaMailcom.sun.mail.smtp.SMTPAddressFailedException: 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)This error is usually because the mail server requieres authentication when sending messages throught SMTP. See http://forum.java.sun.com/thread.jspa?threadID=586817&tstart=0 com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay for ... This error appears because the mail server does not allow message relay. See http://java.sun.com/products/javamail/FAQ.html#norelay No provider for SMTP Write smtp protocol name in lower case at mail.transport.protocol property of hipergate.cnf MySQLMessagingException Illegal mix of collations for operation 'UNION'This is because the database has been created with LATIN1 or other character set instead of UTF8. Access denied; you need the SUPER privilege for this operation During initial data model loading. Execute GRANT as specified at MySQL database creation section of this guide. PostgreSQLImpossible to get connection to the database relation "sql_features" does not existTry setting schema=public on hipergate.cnf SET AUTOCOMMIT TO OFF is no longer supported Your JDBC driver version does not match the database version ERROR: function k_sp_autenticate("unknown", "unknown") does not exist. The authentication service is temporaly unavailable. You must enable PL/pgSQL language support BEFORE starting the creation of the datamodel. SQL ServerFUNCTION dbo.k_sp_prj_cost does not existFrom a SQL query tool re-create Transact/SQL function k_sp_prj_cost over the right owner, usually dbo or db_accessadmin. The source code for k_sp_prj_cost maybe found at java\com\knowgate\hipergate\datamodel\procedures\mssql\projtrack.ddl GeneralPosted content length of XXX exceeds limit of YYY Increase the value of property maxfileupload at hipergate.cnf and re-start the web server. Look at the public forums for more information on setup problems. |
| Problems with this page?, email webmaster@hipergate.org |
| index.cgi | hipergate © 2003-2006 KnowGate. All rights reserved [Legal] [Contact] [Valid HTML 4.01] [Valid CSS!] | index.cgi |