标签:
# set JAVA declare JAVA_HOME=/usr/java/jdk1.8.0_31 CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/lib PATH=$JAVA_HOME/bin:$PATH export JAVA_HOME CLASSPATH PATH |
<property name="port">8066</property> #监听端口 <!-- bind ipAddress --> <property name="ipAddress">192.168.32.130</property> #监听IP <property name="user">amoeba</property> #连接帐号 <property name="password">amoeba</property> <property name="writePool">server2</property> #定义写组 <property name="readPool">server1</property> #定义读组 |
<!-- mysql port --> <property name="port">3306</property> #连接后端数据库使用的用户,密码 <!-- mysql schema --> <property name="schema">test</property> #定义适用数据库 <property name="schema">testing</property> <!-- mysql user --> <property name="user">proxy</property> <property name="password">proxy</property> <dbServer name="server1" parent="abstractServer"> #定义后端2台server信息 <factoryConfig> <!-- mysql ip --> <property name="ipAddress">192.168.32.131</property> </factoryConfig> </dbServer> <dbServer name="server2" parent="abstractServer"> <factoryConfig> <!-- mysql ip --> <property name="ipAddress">192.168.32.132</property> </factoryConfig> </dbServer> <dbServer name="multiPool" virtual="true"> #集群和负载均衡 <poolConfig class="com.meidusa.amoeba.server.MultipleServerPool"> <!-- Load balancing strategy: 1=ROUNDROBIN , 2=WEIGHTBASED , 3=HA--> <property name="loadbalance">1</property> <!-- Separated by commas,such as: server1,server2,server1 --> <property name="poolNames">server1</property> </poolConfig> </dbServer> |
标签:
原文地址:http://my.oschina.net/chenxu/blog/408688