このガイドは、tc Server 2.9.3のセットアップ方法について説明しています。
解決策
- vfabric-tc-server-standard-2.9.3.RELEASE.zip という名前の tc Server の zip ファイルをダウンロードします。
- コマンドプロンプトを開き、
/../vfabric-tc-server-standard-2.9.3.RELEASE. この場所は、{tc Server Home}に短縮されます。 - コマンドの実行:
mkdir servers - コマンドを実行します。
tcruntime-instance.bat|sh create -i servers lp-server -
{tc Server Home}/servers/lp-server/confに移動します。**wrapper.conf**ファイルを開いてください。 -
'-Xmx'を1024mで変更wrapper.java.addition.8. - 変更点
`-Xss`から512kでwrapper.java.addition.9. -
wrapper.java.additional.10="-XX:MaxPermSize=256m" を追加. -
wrapper.java.additional.11="-Dfile.encoding=UTF-8" を追加. - ファイルを保存して閉じます。
-
{tc Server Home}/servers/lp-server/confに、**Catalina**という新しいフォルダーを作成します。 -
{tc Server Home}/servers/lp-server/conf/Catalinaに、 localhostという新しいフォルダを作成します。{tc Server Home}/servers/lp-server/conf/Catalina/localhostに、 ROOT.xml という新しいファイルを作成します。 -
ROOT.xmlに、以下のように入力します:<Context path="" crossContext="true"> <!-- JAAS --> <!--<Realm className="org.apache.catalina.realm.JAASRealm" appName="PortalRealm" userClassNames="com.liferay.portal.kernel.security.jaas.PortalPrincipal" roleClassNames="com.liferay.portal.kernel.security.jaas.PortalRole" />--> <!-- Uncomment the following to disable persistent sessions across reboots. --> <!-- Uncomment the following to not use sessions. See the property "session.disabled" in portal.properties. --> <!-- <Manager className="com.liferay.support.tomcat.session.SessionLessManagerBase" /> --> </Context> -
{tc Server Home}/servers/lp-server/confフォルダで、 server.xml ファイルを開いてください。 - Connector プロパティに
URIEncoding="UTF-8"を追加して、次のようにします:<Connector acceptCount="100" connectionTimeout="20000" executor="tomcatThreadPool" maxKeepAliveRequests="15" port="${bio.http.port}" protocol="org.apache.coyote.http11.Http11Protocol" redirectPort="${bio.https.port}" URIEncoding="UTF-8"/> - lib/ext' フォルダに依存関係が展開される Tomcat とは異なり、tc Server の依存関係は 'lib' フォルダに直接展開されます。 すべて 以下の.jarをコピーします:
activation.jarccpp.jarhsql.jarjta.jarjutf7.jarmail.jarmysql.jarpersistence.jarportal-service.jarportlet.jarpostgresql.jarscript-10.jar
- 次に、
{tc Server Home}/servers/lp-server/bin/setenv.bat|setenv.shを設定する。set JVM_OPTS=-Dfile.encoding=UTF-8 -Xmx1024M -Xss512K -XX:MaxPermSize=512mこのプロパティをファイルの最後に追加する。 - これで、ポータルのデプロイ準備が整いました。
{tc Server Home}/servers/lp-server/webapps/ROOTに移動します。 このフォルダーにあるデフォルトのコンテンツを削除する。 ここで Liferay の .war ファイルを解凍します。 なお、.war ファイルは、パッケージャーまたはソースフォルダで**ant -f build-dist.xml zip-portal-war**を実行することで入手できます。 -
{tc Server Home}/serversフォルダ内の/lp-serverに portal-ext.properties を並列に設定します。 MySQLで動作するようにportal-ext.propertiesを設定する。 -
portal-ext.propertiesでスタートアップウィザードの有効・無効を設定します。 -
/binフォルダーに次のように入力します。tcruntime-ctl.bat run |./tcruntime-ctl.sh run。 - シャットダウンするには、CTRL + Cで十分です