|
InstallGuide
IntroductionThis document describes how to install the Gaixie Micrite software.
Ready?First, let's make sure you have everything you need to install and run Micrite. Micrite is a database-driven Java web application. To run it you need Java, a Java Servlet container such as Tomcat and a database such as MySQL. More specifically, here's what you need to install and run Micrite:
Download and un-package MicriteDownload the Gaixie Micrite release file from http://code.google.com/p/micrite/downloads/list and use your favorite ZIP program to unzip the release into a directory on your computer's disk. Installation directory layoutOnce you've unpackaged the files you'll find a directory structure like this: gaixie-micrite-x.x
|--README.txt
|--LICENSE.txt
|--src
|--dbscripts
|--webapp
|--micriteThe Micrite WarThe Micrite application itself is in the directory webapp/micrite and is organized using the standard Java EE WAR directory structure.Generally speaking, you won't need to modify and files in side the director. You can deploy it as is, in directory form, or you can package it up as a .war if you prefer to deploy as a file. For example, here's how you'd package it up as a WAR: % cd gaixie-micrite/webapp/micrite % jar cvf ../micrite.war *
Prepare your database for MicriteBefore you can install Micrite you'll probably need to some work to prepare your database for Micrite. You need some place to put the Micrite tables. Some folks call this a table-space, but we refer to it as a database. Note: If you want take a glance at micrite v0.11 or higher, you can use hsqldb in memory, just skip to Deploy Micrite Create a database for MicriteIf you're luck enough to have your own database administrator, ask them to setup a database for Micrite. When they are done, ask them to provide you with this information, you'll need it later:
If you don't have a database administrator then you'll have to refer to the documentation for your database and do it yourself. You need to create a database for Micrite, protected by username and password.
gaixie-micrite-x.x> java -cp webapp/micrite/WEB-INF/lib/derbytools-10.4.2.0.jar:webapp/micrite/WEB-INF/lib/derby-10.4.2.0.jar -Dderby.ui.codeset=utf8 org.apache.derby.tools.ij # Windows users need replace “:” (colon) with “;” (semi-colon), like this: gaixie-micrite-x.x> java -cp webapp/micrite/WEB-INF/lib/derbytools-10.4.2.0.jar;webapp/micrite/WEB-INF/lib/derby-10.4.2.0.jar -Dderby.ui.codeset=utf8 org.apache.derby.tools.ij ij> connect 'jdbc:derby:micritedb;create=true;user=micrite;password=micrite'; ij> run 'dbscripts/derby/createdb.sql'; ij> exit; gaixie-micrite-x.x
|--README.txt
|--LICENSE.txt
|--src
|--dbscripts
|--micritedb
|--webapp
|--micrite
$ mysql -u root -p
password: *****
mysql> create database micritedb;
mysql> grant all on micritedb.* to micrite@'%' identified by 'micrite';
mysql> use micritedb;
mysql> source {project_home}/dbscripts/mysql/createdb.sql
$createdb -h localhost -p 5432 --encoding=utf8 -U postgres micritedb
# login database use postgresql admin account
$ psql -h localhost -p 5432 -U postgres
postgres>CREATE USER micrite_user WITH PASSWORD 'yourpassowrd';
postgres>ALTER DATABASE micritedb OWNER TO micrite_user;
postgres>\q
#relogin as micrite_user
$ psql -h localhost -p 5432 -U micrite_user micritedb
# execute script file
micritedb>\i {project_home}/dbscripts/postgresql/createdb.sqlCheck your JDBC driver setupMake sure that you have the correct JDBC driver installed in your server. Usually, this is as simple as downloading the JDBC driver jar(s) and placing it (or them) into your server's classpath. For example, on Tomcat 5.5 you place them in common/lib, on Tomcat 6.0 in lib.
Configure MicriteHere is how to configure database connection for Micrite.
<property name="driverClassName" value="org.apache.derby.jdbc.EmbeddedDriver"/>
<property name="url" value="jdbc:derby:{ProjectHome}/micritedb" />
<property name="username" value="micrite" />
<property name="password" value="micrite" />## Derby hibernate.dialect org.hibernate.dialect.DerbyDialect ## PostgreSQL #hibernate.dialect org.hibernate.dialect.PostgreSQLDialect
Deploy MicriteUse your server's administration console to deploy the Micrite web application. You can deploy as a directory, in which case you'll have to enter the path to your Micrite installation's webapp/micrite directory. Or you can deploy as a WAR file, in which case you will have to have created a WAR file as we described in Section The Micrite War. Deploying to Apache Tomcat 6.0You can deploy to Tomcat as either a directory or a WAR file.
Context Path : /micrite WAR or Directory URL : c:\gaixie-micrite-0.9\webapp\micrite Just select micrite.war file to deploy. Once Micrite is deployed, you'll see that it's listed among the other applications. There's a /micrite link to Micrite itself and there are options to start, stop, reload and undeploy.
Getting started with MicriteVisit http://localhost:8080/micrite with following default account.
| |||||||||
In the latest version there is no WEB-INF/classes/databaseResource-hibernate.xml
In v0.11+ you don't need to configure anything, just Deploy Micrite