当前位置: > CentOS > CentOS教程 >

CentOs7上配置Mesos+Zookeeper

时间:2015-08-27 13:30来源:linux.it.net.cn 作者:IT
1.安装jdk1.8并配置环境变量

export JAVA_HOME=/usr/local/opt/jdk1.8.0_51

PATH=$JAVA_HOME/bin:$PATH



2.zookeeper安装与配置
    
      a) 安装zookeeper

          $ wget http://mirrors.cnnic.cn/apache/zookeeper/zookeeper-3.4.6/zookeeper-3.4.6.tar.gz

          $ tar zxf zookeeper-3.4.6.tar.gz -C /usr/local/opt/

      b) 启动zookeeper
         
          $ mv conf/zoo_sample.cfg conf/zoo.cfg(将zookeeper/conf/目录下zoo_sample.cfg 更名为 zoo.cfg)

          $ ./bin/zkServer.sh start
         

3.mesos安装与配置

     a) 安装mesos

     $ wget http://www.apache.org/dist/mesos/0.22.1/mesos-0.22.1.tar.gz

     $ tar zxf mesos-0.22.1.tar.gz -C /usr/local/opt/

     b) 安装mesos依赖

     $ sudo yum groupinstall -y "Development Tools"

     $ sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo

     $ sudo yum install -y apache-maven python-devel zlib-devel libcurl-devel openssl-devel cyrus-sasl-devel cyrus-sasl-md5 apr-devel subversion-devel apr-util-devel

     c) 配置mesos环境变量
         
               export MESOS_NATIVE_JAVA_LIBRARY=/usr/local/lib/libmesos.so

               export MESOS_NATIVE_LIBRARY=/usr/local/lib/libmesos.so
      
     d) Build mesos

           1. Add the WANdisco SVN repo file: '/etc/yum.repos.d/wandisco-svn.repo' with content:

      [WANdiscoSVN]
      name=WANdisco SVN Repo 1.9
      enabled=1
      baseurl=http://opensource.wandisco.com/centos/7/svn-1.9/RPMS/$basearch/
      gpgcheck=1
      gpgkey=http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco

              
2. 构建mesos

$ cd mesos
$ mkdir build
$ cd build
$ ../configure
$ make
$ make check
$ make install
             
     e) 启动mesos

          在mesos/build/目录下执行 (log_dir,work_dir目录自行修改):

            $ ./bin/mesos-master.sh --zk=zk://localhost:2181/mesos --log_dir=/home/yaowang/WorkAndLog/mesos/log --work_dir=/home/yaowang/WorkAndLog/mesos/work --quorum=1
              
               $ ./bin/mesos-slave.sh --master=zk://localhost:2181/mesos --log_dir=/home/yaowang/WorkAndLog/mesos/log --work_dir=/home/yaowang/WorkAndLog/mesos/work


localhost:5050查看当前master与slave运行情况 (责任编辑:IT)
------分隔线----------------------------
栏目列表
推荐内容