terracotta安装配置

  1. terracotta下载 terracotta
  2. terracotta配置
    解压terracotta,如解压到d盘。进入terracotta->config-samples,将tc-config-express-reference.xml复制为tc-config.xml并修改:
<?xml version="1.0" encoding="UTF-8" ?>
<tc:tc-config xmlns:tc="http://www.terracotta.org/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:schemaLocation="http://www.terracotta.org/schema/terracotta-6.xsd">
    <tc-properties>
        <property name="l2.nha.dirtydb.autoDelete" value="true"/>
        <property name="l1.cachemanager.enabled" value="true"/>
        <property name="logging.maxLogFileSize" value="1024"/>
        <property name="l2.l1reconnect.enabled" value="true"/> 
        <property name="l2.l1reconnect.timeout.millis" value="5000"/>
    </tc-properties>
    <system>
        <configuration-model>production</configuration-model>
    </system>
    <servers>
        <server host="192.168.1.91" name="tc_1" bind="0.0.0.0">
            <data>/opt/terracotta/server-data</data>
            <logs>/opt/terracotta/server-logs</logs>
            <index>/opt/terracotta/server-index</index>
            <statistics>/opt/terracotta/server-statistics</statistics>
            <dso-port>9510</dso-port>
            <jmx-port>9520</jmx-port>
            <dso>
                <client-reconnect-window>120</client-reconnect-window>
            </dso>
        </server>
    </servers>
    <clients>
        <logs>logs-%i</logs>
    </clients>
</tc:tc-config>

server的host可以为ip或主机名,如果为主机名时,需要修改hosts文件,加上:
主机名 localhost

  1. terracotta启动
    cd到terracotta/bin
    start-tc-server.bat -f ../config-samples/tc-config.xml
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容