美文网首页
terracotta安装配置

terracotta安装配置

作者: 那脸憔悴 | 来源:发表于2017-03-24 13:47 被阅读0次
  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

相关文章

网友评论

      本文标题:terracotta安装配置

      本文链接:https://www.haomeiwen.com/subject/nrqfottx.html