一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

amoeba mysql的安装配置实例

时间:2014-08-05 编辑:简简单单 来源:一聚教程网

1、配置好mysql的主从环境,服务器如下:

 代码如下 复制代码

master:172.16.206.129
slave:172.16.206.130
amoeba:172.16.206.131

2、amoeba配置好JDK环境

可以去oracle的官网去下载JDK,安装目录一边不是标准的命名,使用如下命令做软连接:
ln -s /usr/java/jdk1.8.0_11/ /usr/java/jdk1.8
配置JDK环境:
在/etc/profile文件末尾添加以下环境参数

 代码如下 复制代码
export JAVA_HOME=/usr/java/jdk1.8
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH

PS:下载的JDK需要和平台对应,uname 可以查看平台类型

3、下载amoeba

网上搜索可以去一些开源软件的网站下载

4、安装amoeba

安装路径/usr/local/amoeba

5、修改amoeba配置参数

/usr/local/amoeba/conf/amoeba.xml 修改如下:

 代码如下 复制代码
1
2
3
4
5
6
7
8
9
10
11 8066
12
13
14
15172.16.206.129
16
17
18
19
20 128
21 64
22

23

24
25
26
27
28 amoeba
29
30word”>123456
31
32
33 AccessController”>
34 ${amoeba.home}/conf/access_list.conf
35

36

37

38

39
40

41
42
43
44
45 128
46
47
48 500
49
50
51 utf8
52
53
54 60
55

56
57

58
59 60 Each ConnectionManager will start as thread
61 manager responsible for the Connection IO read , Death Detection
62 –>
63
64
65 com.meidusa.toolkit.net.AuthingableConnectionManager
66

67

68
69
70
71 ${amoeba.home}/conf/dbServers.xml
72

73
74
75
76
77 ${amoeba.home}/conf/rule.xml
78 ${amoeba.home}/conf/ruleFunctionMap.xml
79

80

81 ${amoeba.home}/conf/functionMap.xml
82 1500
83master
84 master
85 multiPool
86true
87

88

/usr/local/amoeba/conf/dbServer.xml 修改如下:

 代码如下 复制代码
1
2
3
4
5
6 7 Each dbServer needs to be configured into a Pool,
8 If you need to configure multiple dbServer with load balancing that can be simplified by the following configuration:
9 add attribute with name virtual = “true” in dbServer, but the configuration does not allow the element with name factoryConfig
10 such as ‘multiPool’ dbServer
11 –>
12
13
14
15 ${defaultManager}
16 64
17 128
18
19
203306
21
22 数据库–>
23test
24
25
26 amoeba
27
28123456
29

30
31
32 500
33 500
34 1
35 600000
36 600000
37 true
38 true
39 true
40

41

42
43
44
45
46 172.16.206.129
47

48

49
50
51
52
53172.16.206.130
54

55

56
57
58
59
60 1
61
62
63 master,slave,slave
64
65

66

67
68

启动amoeba
/usr/local/amoeba/bin/launcher &

关闭amoeba
/usr/local/amoeba/bin/shutdown
amoeba不支持存储过程、不支持大数据量查询,这个比较讨厌,所以我最后还是没有用amoeba

热门栏目