⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 install.html

📁 基于mondrian 开源框架进行OLAP多维分析
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<h2>3. Deploy and run the web application with a non-embedded database<a name="3_Deploy_and_run_the_web_app">&nbsp;</a></h2><ol>  <li>Install Tomcat (version 5.0.25 or later).</li>  <li>From the unzipped binary release, explode <code>lib/mondrian.war</code>to <code><i>TOMCAT_HOME</i>/webapps/mondrian</code></li>  <li>Open the mondrian.properties file in <code><i>TOMCAT_HOME</i>/webapps/mondrian</code> and customize the&nbsp;   <code>mondrian.jdbcDrivers</code>properties for the database you set up from the instructions above.</li>  <li>Open the web.xml file in <code><i>TOMCAT_HOME</i>/webapps/mondrian/WEB-INF</code> and customize the twoconnect strings there to the same database parameters for the FoodMart database   you installed as per the above instructions. That is,  <blockquote>    <code>Provider=mondrian;Jdbc=jdbc:odbc:MondrianFoodMart;Catalog=/WEB-INF/queries/FoodMart.xml;JdbcDrivers=sun.jdbc.odbc.JdbcOdbcDriver;</code>  </blockquote>    becomes    <blockquote>      <code>Provider=mondrian;Jdbc=jdbc:mysql://localhost/foodmart?user=foodmart&amp;#38;password=foodmart;Catalog=/WEB-INF/queries/FoodMart.xml;JdbcDrivers=com.mysql.jdbc.Driver;</code>  </blockquote>  </li>  <li>Modify the <code>fourheir.jsp</code>, <code>mondrian.jsp</code>, <code>colors.jsp</code>and <code>arrows.jsp </code>files in the <code><i>TOMCAT_HOME</i>/webapps/mondrian/WEB-INF/queries</code>   folder.   Modify the line<blockquote><code>&lt;jp:mondrianQuery id="query01"jdbcDriver="sun.jdbc.odbc.JdbcOdbcDriver"jdbcUrl="jdbc:odbc:MondrianFoodMart"catalogUri="/WEB-INF/queries/FoodMart.xml"&gt;</code></blockquote>  <p>to the same database parameters for the FoodMart database youinstalled as per the above instructions. For MySQL, this would besomething like the following:<blockquote><code>&lt;jp:mondrianQuery id="query01"jdbcDriver="com.mysql.jdbc.Driver"jdbcUrl="jdbc:mysql://localhost/foodmart?user=foodmart&amp;password=foodmart"catalogUri="/WEB-INF/queries/FoodMart.xml"&gt;</code></blockquote></p></li><li>Copy the following files:  <ul>    <li>If needed, copy your JDBC driver JAR to <code>TOMCAT_HOME/common/endorsed</code></li>    <li>Copy <code>xalan.jar</code> to <code><i>TOMCAT_HOME</i>/common/endorsed</code></li>  </ul>  </li>  <li>Start your database, if needed.</li>  <li>Hit <a href="http://localhost:8080/mondrian" target="_new">http://localhost:8080/mondrian</a>.</li></ol><h2>4. Deploy and run the web application with the embedded test database<a name="4_Deploy_and_run_the_embedded_web_app">&nbsp;</a></h2><ol>  <li>From the unzipped embedded database binary release, explode <code>lib/mondrian-embedded.war</code>to <code><i>TOMCAT_HOME</i>/webapps/mondrian-embedded</code></li>  <li>Start up Tomcat</li>  <li>Hit <a href="http://localhost:8080/mondrian-embedded" target="_new">http://localhost:8080/mondrian-embedded</a></li></ol><h2>5. How to configure Mondrian as an XML/A provider<a name="5_How_to_configure_Mondrian_as_an_XMLA_provider">&nbsp;</a></h2><p>To will setup XMLA service, follow these steps.</p><h3>1. Describe the data sources in <code>datasources.xml</code><a name="5_1_Describe_the_data_sources_in_datasources.xml">&nbsp;</a></h3><p>In WEB-INF directory of your webapp, create a file called <code>datasources.xml</code>, with content like this:</p><blockquote>	<code>&lt;?xml version="1.0"?&gt;<br>&lt;DataSources&gt;<br>&nbsp; &lt;DataSource&gt;<br>&nbsp;&nbsp;&nbsp;&lt;DataSourceName&gt;MondrianFoodMart&lt;/DataSourceName&gt;<br>&nbsp;&nbsp;&nbsp; &lt;DataSourceDescription&gt;FoodMart 2000 DataWarehouse From MS Analysis Services&lt;/DataSourceDescription&gt;<br>&nbsp;&nbsp;&nbsp;&lt;URL&gt;http://localhost:8080/mondrian/xmla&lt;/URL&gt;<br>&nbsp;&nbsp;&nbsp; &lt;DataSourceInfo&gt;Provider=mondrian;Jdbc=jdbc:odbc:MondrianFoodMart;JdbcDrivers=sun.jdbc.odbc.JdbcOdbcDriver&lt;/DataSourceInfo&gt;<br>&nbsp;&nbsp;&nbsp; &lt;ProviderType&gt;MDP&lt;/ProviderType&gt;<br>&nbsp;&nbsp;&nbsp; &lt;AuthenticationMode&gt;Unauthenticated&lt;/AuthenticationMode&gt;<br>&nbsp;&nbsp;&nbsp; &lt;Catalogs&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Catalog name=&quot;FoodMart&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Definition&gt;/WEB-INF/schema/FoodMart.xml&lt;/Definition&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Catalog&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Catalog name=&quot;Marketing&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;DataSourceInfo&gt;Provider=mondrian;Jdbc=jdbc:odbc:MarketingDB;JdbcDrivers=sun.jdbc.odbc.JdbcOdbcDriver&lt;/DataSourceInfo&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Definition&gt;/WEB-INF/schema/Marketing.xml&lt;/Definition&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Catalog&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/Catalogs&gt;<br>&nbsp; &lt;/DataSource&gt;<br>  <br>&nbsp; &lt;DataSource&gt;<br>&nbsp;&nbsp;&nbsp; &lt;DataSourceName&gt;PostgreSQLTest&lt;/DataSourceName&gt;<br>&nbsp;&nbsp;&nbsp; &lt;DataSourceDescription&gt;Test Data Warehouse On PostgreSQL&lt;/DataSourceDescription&gt;<br>&nbsp;&nbsp;&nbsp; &lt;URL&gt;http://localhost:8080/mondrian/xmla&lt;/URL&gt;<br>&nbsp;&nbsp;&nbsp; &lt;DataSourceInfo&gt;Provider=mondrian; Jdbc=jdbc:postgresql://localhost/olap; JdbcDrivers=org.postgresql.Driver; JdbcUser=pgsql; JdbcPassword=pgsql&lt;/DataSourceInfo&gt;<br>&nbsp;&nbsp;&nbsp; &lt;ProviderName&gt;Mondrian&lt;/ProviderName&gt;<br>&nbsp;&nbsp;&nbsp; &lt;ProviderType&gt;MDP&lt;/ProviderType&gt;<br>&nbsp;&nbsp;&nbsp; &lt;AuthenticationMode&gt;Unauthenticated&lt;/AuthenticationMode&gt;<br>&nbsp;&nbsp;&nbsp; &lt;Catalogs&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Catalog name=&quot;Test&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Definition&gt;/WEB-INF/schema/TestPgsql.xml&lt;/Definition&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Catalog&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/Catalogs&gt;<br>&nbsp; &lt;/DataSource&gt;<br>&lt;/DataSources&gt;</code></blockquote><p><code>&lt;ProviderType&gt;</code> and <code>&lt;AuthenticationMode&gt;</code>are ignored because the XML/A implementation currently only supports'MDP' and 'Unauthenticated'.</p><h4>Multiple data sources and multiple catalogs</h4><p>If you intend to use Mondrian with Microsoft's ADOMD.NET client library or<a href="http://www.simba.com/Technologies/odbotoxmla.htm">Simba's O2X bridge</a>, the data sources file must have precisely one <code>&lt;DataSource&gt;</code> element. These clients will ignore all but one data source. Other XML/A clients, such as<a href="http://sourceforge.net/projects/whex">Rex</a>, work fine with multiple data sources.</p><p>Note that each catalog has a name attribute, and the URI (path) of an XML schema file. The name of the catalog must match the name attribute in the schema file (for example <code>&lt;Schema name=&quot;FoodMart&quot;&gt;</code>).</p><p>Whether&nbsp; you use one data source or several, the catalogs in the <code>datasources.xml</code> file must have unique names.</p><h3>5.2. Configure XmlaServlet in your <code>web.xml</code><a name="5_2_Configure_XmlaServlet_in_your_web.xml">&nbsp;</a></h3><p>For example:</p><blockquote>	<code>&lt;servlet&gt;<br>&nbsp; &lt;servlet-name&gt;MondrianXmlaServlet&lt;/servlet-name&gt;<br>&nbsp;&lt;servlet-class&gt;mondrian.xmla.impl.DefaultXmlaServlet&lt;/servlet-class&gt;<br>&lt;/servlet&gt;</code></blockquote><h2>6. Miscellaneous<a name="6_Miscellaneous">&nbsp;</a></h2><h3>6.1. Configuring <code>mondrian.properties</code><a name="6_1_mondrian_properties">&nbsp;</a></h3><p>Properties are described in the <a href="configuration.html">Configuration Guide</a>.</p><h3>6.2. Cache setup<a name="6_2_Cache_setup">&nbsp;</a></h3><p>You will need to specify the amount of memory available to the cacheusing the -Xms Java VM option, for example -Xms256m for 256 megs of ramfor the Java VM.</p><h2>7. Database compatibility<a name="7_Database_compatibility">&nbsp;</a></h2><p>Mondrian is known to run on the following databases.</p><ol>  <li>Apache Derby (formerly known as Cloudscape)</li>  <li>Firebird</li>  <li>hsqldb</li>  <li>IBM DB2</li>  <li>Informix</li>  <li>Ingres</li>  <li>Interbase</li>  <li>LucidDB</li>  <li>Microsoft Access</li>  <li>Microsoft SQL Server</li>  <li>MySQL</li>  <li>Oracle</li>  <li>PostgreSQL</li>  <li>Sybase</li>  <li>Teradata</li></ol><p>Mondrian can work on almost any JDBC data source, so even if yourdatabase doesn't appear in the above list, give it a try. Mondrian cangenerally figure out the capabilities of the database from the JDBCdriver, and generate SQL accordingly.</p><p>If you get Mondrian working on another database, drop us aline. Let us know which driver you used, the version of your database,property settings, and any other tweaks which were required.</p><h3>General database tips</h3><p>For sample connect strings, look in<code><a href="http://p4web.eigenbase.org/open/mondrian/mondrian.properties">mondrian.properties</a></code>.  There are are sample connectstrings for most databases in there.</p><h3>PostgreSQL</h3><p>To install PostgreSQL 8.2 and its JDBC driver on Ubuntu, I typed:</p><blockquote><code>$ sudo apt-get install postgresql libpg-java</code></blockquote><p>The JDBC driver can be found at <code>/usr/share/java/postgresql.jar</code>.</p><p>Change password:</p><blockquote><code>    $ sudo -u postgres psql postgres<br/>    # ALTER USER postgres WITH ENCRYPTED PASSWORD ' <***password***> ';<br/>    # \q</code></blockquote><p>Create a user and a database:</p><blockquote><code>    $ sudo -u postgres  createuser -D -A -P foodmart<br/>    $ sudo -u postgres createdb -O foodmart foodmart</code></blockquote><h3>Ingres</h3><p>Andy Grimm writes:</p><blockquote>    <p>In addition, I had to run a perl script against the demo sql file:<br>    <br>    &gt; <code>perl -pi -e &quot;s/:00\.0/:00/g&quot; FoodMartCreateData.sql</code><br>    <br>    That drops the &quot;.0&quot; off each timestamp to make it a valid DATE. Our next     release will support timestamps, so this is a short-term fix that could go     into Release Notes.</p></blockquote><h3>&nbsp;</h3><h3>Sybase</h3><p><a href="http://forums.pentaho.org/showthread.php?t=47918">mizar_sf writes</a>:</p><blockquote>  <p>I tried some solutions to get mondrian (I used 2.1RC) connected with a Sybase   ASE [version 12.5] server. Finally I found this solutions:</p>  <ul>    <li>Downloaded a jdbc3 compliant driver like jtds-1.2.jar from sourceforge.</li>    <li>Placed the driver in TOMCAT_HOME/common/endorsed</li>    <li>In configuration files like <ul>        <li>mondrian/WEB-INF/datasources.xml</li>        <li>mondrian/WEB-INF/web.xml</li></ul>    I modified the parameters line in this way:<blockquote>      <code>Provider=mondrian; JdbcUser=userName; JdbcPassword=userPass; Jdbc=jdbc:jtds:sybase://xxx.xxx.xxx.xxx:port/dbName; JdbcDrivers=net.sourceforge.jtds.jdbc.Driver; Catalog=/WEB-INF/queries/myCatalog.xml</code>    </blockquote>    (The datasources.xml doesn't need to be modified if you are only testing     the db, but if you are using something like OPENI you have to.)</li>  </ul></blockquote><h2>8. Compatibility issues<a name="8_Compatibility_issues">&nbsp;</a></h2><h3>8.1. Weblogic 6.1 and Xerces<a name="8_1_Weblogic_6_1_and_Xerces">&nbsp;</a></h3><p>Weblogic 6.1 ships with an older, incompatible, version of Xerces.The symptom is the error</p><blockquote>  <code>java.lang.VerifyError: (class: org/eigenbase/xom/wrappers/XercesDOMParser, method: parse signature: (Lorg/xml/sax/InputSource;)Lorg/w3c/dom/Document;) Incompatible object argument for function call<br>at java.lang.Class.forName0(Native Method)<br>at java.lang.Class.forName(Class.java:120)<br>at org.eigenbase.xom.XOMUtil.createDefaultParser(XOMUtil.java:165)<br>at org.eigenbase.resgen.Util.load(Util.java:49)<br>...</code></blockquote><p>The solution is to place <code>xml-apis.jar</code> and <code>xercesImpl.jar</code>before <code>weblogic.jar</code> on your class-path.</p><p>Generally, Mondrian uses whichever JAXP-compliant XML parser isprovided bythe system. Unfortunately Weblogic's parser cannot be set tonon-validatingmode, and Mondrian needs this. Therefore, in a Weblogic environment,Mondrianexplicitly uses Xerces.&nbsp; Fyi,<a href="http://xml.apache.org/soap/faq/faq-for-WL6.1beta.html">thisnote</a>describes how to change Weblogic's default XML parser.</p><h3>8.2. Log4j and Tomcat<a name="8_2_Log4j_and_Tomcat">&nbsp;</a></h3><p>The Mondrian WARs come packaged with a version of log4j.jar. Thismay conflict with your app server, such as JBoss, and cause errors inthelog about log4j appenders. The fix is to remove the log4j.jar from theMondrian WAR.</p><p>&nbsp;</p><hr><p>    Author: Julian Hyde and others; last updated July, 2008.<br/>    Version: $Id: //open/mondrian-release/3.0/doc/install.html#3 $    (<a href="http://p4web.eigenbase.org/open/mondrian/doc/install.html?ac=22">log</a>)<br/>    Copyright (C) 2001-2002 Kana Software, Inc.<br/>    Copyright (C) 2002-2008 Julian Hyde and others</p><br/><!-- doc2web end --></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -