首页 > 代码库 > Tachyon基本使用02-----Tachyon本地模式安装
Tachyon基本使用02-----Tachyon本地模式安装
一、配置系统环境
1.清除默认防火墙规则
# service iptables save iptables:将防火墙规则保存到 /etc/sysconfig/iptables: [确定]
2.关闭Selinux
# cat /etc/sysconfig/selinux |grep SELINUX|grep -v ^# SELINUX=disabled SELINUXTYPE=targeted #
3.配置ip地址
# cat /etc/sysconfig/network-scripts/ifcfg-eth0 |grep IPADDR IPADDR=192.168.1.1 #
4.配置主机名
# cat /etc/sysconfig/network|grep HOSTNAME HOSTNAME=node1 #
5.配置hosts
# cat /etc/hosts |tail -n 1 192.168.1.1 node1 #
6.时间同步
# ntpdate 192.168.1.254
7.本机ssh免密码登录
# ssh-keygen -t rsa -f ~/.ssh/id_rsa -P ‘‘ # ssh-copy-id -i node1 The authenticity of host ‘node1 (::1)‘can‘t be established. RSA key fingerprint is23:2a:43:2d:a7:81:a3:56:a4:a8:65:35:03:8b:05:8b. Are you sure you want to continueconnecting (yes/no)? yes Warning: Permanently added ‘node1‘ (RSA) tothe list of known hosts. root@node1‘s password: Now try logging into the machine, with"ssh ‘node1‘", and check in: .ssh/authorized_keys to make sure we haven‘t added extra keysthat you weren‘t expecting. #
二、配置JAVA环境
1.安装JDK
# rpm -ivh jdk-7-linux-x64.rpm
2.配置JAVA环境变量
# cat /etc/profile.d/java.sh JAVA_HOME=/usr/java/default PATH=$JAVA_HOME/bin:$PATH # source /etc/profile.d/java.sh
3.测试JAVA环境
# java -version java version "1.7.0_09-icedtea" OpenJDK Runtime Environment (rhel-2.3.4.1.el6_3-x86_64) OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode) #
三、本地模式安装Tachyon
1.下载并解压Tachyon
# wgethttp://tachyon-project.org/downloads/tachyon-0.5.0-bin.tar.gz # tar -zxf tachyon-0.5.0-bin.tar.gz -C /usr/local/ # ln -s /usr/local/tachyon-0.5.0//usr/local/tachyon
2.配置Tachyon环境变量
# cat /etc/profile.d/tachyon.sh TACHYON_HOME=/usr/local/tachyon PATH=$TACHYON_HOME/bin:$PATH # source /etc/profile.d/tachyon.sh
3.复制tachyon配置文件
# pwd /usr/local/tachyon/conf # cp tachyon-env.sh.template tachyon-env.sh
4.配置tachyon
# cat tachyon-env.sh |egrep ‘JAVA_HOME|TACHYON_MASTER_ADDRESS|TACHYON_UNDERFS_ADDRESS|TACHYON_WORKER_MEMORY_SIZE‘|grep-v ^#|grep -v ^‘ ‘ JAVA_HOME=/usr/java/default export JAVA="$JAVA_HOME/bin/java" export TACHYON_MASTER_ADDRESS=node1 export TACHYON_UNDERFS_ADDRESS=$TACHYON_HOME/underfs export TACHYON_WORKER_MEMORY_SIZE=512MB #
5.配置slaves
# pwd /usr/local/tachyon/conf # cat slaves |grep -v ^# node1 #
6.初始化文件系统
# tachyon format Connection to node1... Formatting Tachyon Worker @ localhost.localdomain Removing local data under folder: /mnt/ramdisk/tachyonworker/ Connection to node1 closed. Formatting Tachyon Master @ node1 Formatting JOURNAL_FOLDER: /usr/local/tachyon-0.5.0/libexec/../journal/ Formatting UNDERFS_DATA_FOLDER: /usr/local/tachyon-0.5.0/libexec/../underfs/tmp/tachyon/data Formatting UNDERFS_WORKERS_FOLDER: /usr/local/tachyon-0.5.0/libexec/../underfs/tmp/tachyon/workers #
7.启动tachyon的local模式
# tachyon-start.sh local Killed 0 processes Killed 0 processes Connection to node1... Killed 0 processes Connection to node1 closed. Formatting RamFS: /mnt/ramdisk (512mb) Starting master @ node1 Starting worker @ localhost.localdomain #
8.查看tachyon进程
# jps 33403 TachyonWorker 33782 Jps 33367 TachyonMaster #
9.测试tachyon
# tachyon runTest Basic CACHE_THROUGH
10.停止tachyon
# tachyon-stop.sh Killed 1 processes Killed 1 processes Connection to node1... Killed 0 processes Connection to node1 closed. #
本文出自 “tachyon” 博客,请务必保留此出处http://ucloud.blog.51cto.com/3869454/1563958
Tachyon基本使用02-----Tachyon本地模式安装
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。