基本系统要求见2.0.4版本安装
http://www.lishiming.net/thread-5291-1-1.html
Tungsten Replicator 的安装 2.0.6
- wget http://tungsten-replicator.googlecode.com/files/tungsten-replicator-2.0.6.tar.gz
- tar zxvf tungsten-replicator-2.0.6.tar.gz
- mv tungsten-replicator-2.0.6 /usr/local/tungsten
- cd /usr/local/tungsten
- chown -R tungsten /usr/local/tungsten
- # ls
- 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
- 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
- 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
- clear_cluster.sh install_fan-in.sh MANIFEST NODES_STAR.sh show_fan_in.sh test_all_masters.sh test_star.sh
支持以下四种拓扑
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文件内容,包括
修改必要信息,配置文件等
- vi ./cookbook/USER_VALUES.sh
- export DATABASE_USER=tungsten
- export DATABASE_PASSWORD=password
- export DATABASE_PORT=3306
- export TUNGSTEN_SERVICE=cookbook
- vi ./cookbook/NODES_MASTER_SLAVE.sh
- 加入master 与slave
- export NODE1=192.168.0.12
- export NODE2=192.168.0.19
- ...
- export MASTERS=($NODE1)
- #export SLAVES=($NODE2 $NODE3 $NODE4)
- export SLAVES=($NODE2)
- vi ./cookbook/install_master_slave.sh
- 加入--net-ssh-option=port=1111 \
安装完成工具后,执行./cookbook/install_master_slave.sh (注:一定要在外层目录中执行./cookbook/install_master_slave.sh ,不可进入cookbook中执行。/install_fan-in.sh,因SH文件中写了相对路径)
- # ./cookbook/install_master_slave.sh
- ./cookbook/USER_VALUES.sh: line 10: simple_services: command not found
- simple_services is not installed.
- While not strictly necessary for the recipes installation, it is needed to run the auxuliary scripts.
- Please get it from http://code.google.com/p/tungsten-toolbox/ and put it in the $PATH
- cd /usr/local/tungsten
- wget http://tungsten-toolbox.googlecode.com/files/simple_services-1.0.1
- wget http://tungsten-toolbox.googlecode.com/files/tungsten-sandbox-2.0.12
- mv simple_services-1.0.1 simple_services
- mv tungsten-sandbox-2.0.12 tungsten-sandbox
- chmod 755 simple_services
- chmod 755 tungsten-sandbox
- vi /etc/profile
- export PATH=$PATH:/usr/local/tungsten/
- source /etc/profile
- # echo $PATH
- /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/
- tungsten-sandbox --help
- tungsten-sandbox --manual
- simple_services [options]
- options:
- -a, --action ={show|list|name} (show)
- -r, --role ={master|slave} (all)
- -s, --service =service_name (all)
- -h, --help
安装完成后启动
./tungsten-replicator/bin/replicator start
如果启动失败(netstat -lnp |grep 10000),查看日志
less tungsten-replicator/log/trepsvc.log
编辑回复