1

カスタム OData サービスを Denodo 5.5 の組み込み Tomcat Web コンテナーにインストールしたいと考えています。

Denodo が提供する指示はやや紛らわしいことがわかったので、stackoverflow に投稿し、他の誰かが役立つことを願って回答を含めます。

4

1 に答える 1

2

シャットダウン・デノド

$DENODO_HOME/bin/vqlserver_shutdown.sh
sleep 15
ps -ef | grep denodo | grep -v grep

Denodo OData Service.zip を取得します。

Denodo OData Service.zipファイルをダウンロードし、次の/tmpように解凍します。

/tmp/denodo-odata2-service-5.5-20160129

OData サービスの「インストール」

# copy the war file to the webapps folder
cp /tmp/denodo-odata2-service-5.5-20160129/denodo-odata2-service-5.5.war $DENODO_HOME/resources/apache-tomcat/webapps/

# Copy the odata xml to the embedded tomcat container
cp /tmp/denodo-odata2-service-5.5-20160129/scripts/denodo-odata2-service-5.5.xml $DENODO_HOME/resources/apache-tomcat/conf/DenodoPlatform-5.5/localhost/

# Copy the startup/shutdown scripts to the bin folder
cp /tmp/denodo-odata2-service-5.5-20160129/scripts/*.sh $DENODO_HOME/bin
chmod u+rwx $DENODO_HOME/bin/odata*.sh

# change the DENODO_HOME directory in the $DENODO_HOME/bin/odata*.sh scripts
vi $DENODO_HOME/bin/odata_service_startup.sh   # look for DENODO_HOME and update it
vi $DENODO_HOME/bin/odata_service_shutdown.sh  # look for DENODO_HOME and update it

適切な構成変更を行う

# Add a reference to the Denodo JAR in the catalina.properties file
vi $DENODO_HOME/resources/apache-tomcat/conf/catalina.properties
# Look for shared.loader
# Add this to the end of the shared.loader line:
${catalina.base}/../../lib/vdp-jdbcdriver-core/denodo-vdp-jdbcdriver.jar

# update the server.xml.template file to include a JNDI resource by putting the following in the <GlobalNamingResources> section
vi $DENODO_HOME/resources/apache-tomcat/conf/server.xml.template

<Resource name="jdbc/VDPdatabase"
    auth="Container"
    type="javax.sql.DataSource"
    username="admin" password="***********"
    url="jdbc:vdb://localhost:9999/admin"
    driverClassName="com.denodo.vdp.jdbc.Driver"
    initialSize="5" maxWait="5000"
    maxActive="120" maxIdle="5"
    validationQuery="select * from dual()"
    poolPreparedStatements="true"/>

# Change the permissions on server.xml.template so other people can't read your denodo admin password:
chmod go-rwx $DENODO_HOME/resources/apache-tomcat/conf/server.xml.template
chmod go-rwx $DENODO_HOME/resources/apache-tomcat/conf/server.xml

# update the context.xml to point to the JNDI resource in and also add the properties to the <Context> section (add all of the below to the <Context> section)
vi $DENODO_HOME/resources/apache-tomcat/conf/context.xml

<ResourceLink name="jdbc/VDPdatabase"
    global="jdbc/VDPdatabase"
    type="javax.sql.DataSource"/>

<Environment type="java.lang.String" name="odataserver.address" value="/denodo-odata.svc"/>
<Environment type="java.lang.Integer" name="server.pageSize" value="1000"/>
<Environment type="java.lang.Boolean" name="enable.adminUser" value="true"/>

起動して動作確認

$DENODO_HOME/bin/vqlserver_startup.sh
# wait for Denodo and Tomcat to start

# deploy/start the odata webapp
$DENODO_HOME/bin/odata_service_startup.sh

# Go to 
http://hostname:9090/denodo-odata2-service-5.5/denodo-odata.svc/databasename
(but change "databasename" to your virtual database name)

その他の考慮事項

現在、組み込みの Tomcat Web コンテナーを使用しており、odata サービスがその中で実行されているため、Denodo を停止/開始するたびに、OData サービスも停止/開始する必要があります。

電童を止める

  1. まず、OData サービスを停止します。$DENODO_HOME/bin/odata_service_shutdown.sh
  2. 次に、経由で Denodo を停止します。$DENODO_HOME/bin/vqlserver_shutdown.sh

でんどうをはじめる

  1. まず、Denodo を次の方法で起動します。$DENODO_HOME/bin/vqlserver_startup.sh
  2. 次に、OData サービスを開始します。$DENODO_HOME/bin/odata_service_startup.sh

管理者ユーザー アクセス

管理者ユーザーが odata 経由でアクセスできないようにする場合は、$DENODO_HOME/resources/apache-tomcat/conf/context.xmlファイルの設定を変更して再起動します。

于 2016-03-02T17:19:06.280 に答える