Tungsten Replicator 的安装 2.0.6

回复 收藏

基本系统要求见2.0.4版本安装
http://www.lishiming.net/thread-5291-1-1.html


Tungsten Replicator 的安装 2.0.6
  1. wget http://tungsten-replicator.googlecode.com/files/tungsten-replicator-2.0.6.tar.gz
  2. tar zxvf  tungsten-replicator-2.0.6.tar.gz
  3. mv tungsten-replicator-2.0.6 /usr/local/tungsten
  4. cd /usr/local/tungsten
  5. chown -R tungsten /usr/local/tungsten
cookbook为2.0.6新增的功能,主要省去手动执行./tools/tungsten-installer,只要在cookbook的脚本中修改相应参数,通过cookbook中的脚本执行
  1. # ls
  2. clear_cluster_all_masters.sh   clear_cluster_star.sh   install_master_slave.sh  NODES_ALL_MASTERS.sh   README               show_master_slave.sh  test_cluster.sh       USER_VALUES.sh
  3. clear_cluster_fan_in.sh        deploy_cookbook.sh      install_star.sh          NODES_FAN_IN.sh        show_all_masters.sh  show_star.sh          test_fan_in.sh
  4. clear_cluster_master_slave.sh  install_all_masters.sh  make_package.sh          NODES_MASTER_SLAVE.sh  show_cluster.sh      simple_services       test_master_slave.sh
  5. clear_cluster.sh               install_fan-in.sh       MANIFEST                 NODES_STAR.sh          show_fan_in.sh       test_all_masters.sh   test_star.sh
应用cookbook选择要安装的拓扑结构
支持以下四种拓扑

1、master/slave (one master, many slaves)
2、fan-in (many masters, one slave)
3、all-masters (many masters, with slave services for all nodes)
4、star schema (many masters, interconnected through a hub)
选用一种方式master-slave安装,安装前要修改相应.sh文件内容,包括
修改必要信息,配置文件等
  1. vi ./cookbook/USER_VALUES.sh
  2. export DATABASE_USER=tungsten
  3. export DATABASE_PASSWORD=password
  4. export DATABASE_PORT=3306
  5. export TUNGSTEN_SERVICE=cookbook
  1. vi ./cookbook/NODES_MASTER_SLAVE.sh
  2. 加入master 与slave
  3. export NODE1=192.168.0.12
  4. export NODE2=192.168.0.19
  5. ...
  6. export MASTERS=($NODE1)
  7. #export SLAVES=($NODE2 $NODE3 $NODE4)
  8. export SLAVES=($NODE2)
  1. vi ./cookbook/install_master_slave.sh
  2. 加入--net-ssh-option=port=1111 \
此上一项为,如果 SSH端口不为默认的22端口,要在此处加上端口信息--net-ssh-option=port=port_number

安装完成工具后,执行./cookbook/install_master_slave.sh (注:一定要在外层目录中执行./cookbook/install_master_slave.sh ,不可进入cookbook中执行。/install_fan-in.sh,因SH文件中写了相对路径)
  1. # ./cookbook/install_master_slave.sh
  2. ./cookbook/USER_VALUES.sh: line 10: simple_services: command not found
  3. simple_services is not installed.
  4. While not strictly necessary for the recipes installation, it is needed to run the auxuliary scripts.
  5. Please get it from http://code.google.com/p/tungsten-toolbox/ and put it in the $PATH
需要安装simple_services与tungsten-toolbox工具
  1. cd /usr/local/tungsten
  2. wget http://tungsten-toolbox.googlecode.com/files/simple_services-1.0.1
  3. wget http://tungsten-toolbox.googlecode.com/files/tungsten-sandbox-2.0.12
  4. mv   simple_services-1.0.1 simple_services
  5. mv tungsten-sandbox-2.0.12 tungsten-sandbox
  6. chmod 755 simple_services
  7. chmod 755 tungsten-sandbox
工具下载后无需安装,要将路径写入$PATH中
  1. vi /etc/profile
  2. export  PATH=$PATH:/usr/local/tungsten/
  3. source /etc/profile
  4. # echo $PATH
  5. /usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/etc/tungsten-toolbox:/usr/local/tungsten/
完成后测试是否可用
  1. tungsten-sandbox --help
  2. tungsten-sandbox --manual
  3. simple_services [options]
  4. options:
  5. -a, --action ={show|list|name} (show)
  6. -r, --role   ={master|slave}   (all)
  7. -s, --service =service_name    (all)
  8. -h, --help
安装完成后重新执行./cookbook/install_master_slave.sh
安装完成后启动
./tungsten-replicator/bin/replicator start
如果启动失败(netstat -lnp |grep 10000),查看日志
less tungsten-replicator/log/trepsvc.log
2013-02-19 11:08 举报
已邀请:

回复帖子,请先登录注册

退出全屏模式 全屏模式 回复
评分
可选评分理由: