Mesos 安装与运行

Download Mesos 0.9.0-incubating

System Requirements:

  • g++ 4.1 or higher.
  • Python 2.6 (for the Mesosweb UI). On Mac OS X 10.6 or earlier, get Python from MacPortsvia portinstall python26,because OS X's version of Python is not 64-bit.
  • Python 2.6 developerpackages (on red-hat - sudo yum install python26-devel python-devel)
  • cppunit (for buildingzookeeper) (on red-hat - sudo yum install cppunit-devel)sudo 
  • Java JDK 1.6 or higher. MacOS X 10.6 users will need to install the JDK fromhttp://connect.apple.com/and setJAVA_HEADERS=/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers.

Process:

  • 安装libtool和automake
sudo apt-get install libtool
sudo apt-get install automake 
  • g++

sudo apt-get install g++

  • 安装Python2.6,版本2.7可能会报libpython2.6.so.1 cannot find error
  • 安装Python2.6 developer packages
sudo apt-get install python-dev
  • 安装cppunit
sudo apt-get install libcppunit-dev
  • 安装JavaJDK 1.6 or higher

Build Mesos

./bootstrap
./configure --with-webui --with-included-zookeeper --with-java-home=DIR
make
make check

Alternatively (and recommended), use a remote build directory:

mkdir build
cd build
../configure
make
make check
make install
也可以不安装,所以最后一步 make install 可以不执行,这样就需要手动启动master和slaves

Run and Test

Currently, in order to run the example frameworks (in src/examples), you must first build the test suite, as instructed below.

After you build Mesos by running the make command, you can build and run its example frameworks and unit tests (which use the example frameworks) by issuing the make check command from the directory where you ran the make command.

After you have done this, you can also set up a small Mesos cluster and run a job on it as follows:

  1. Go into the directory where you built Mesos.
  2. Type bin/mesos-master.sh to launch the master.
  3. Take note of the IP and port that the master is running on, which will look something like 192.168.0.1:5050. Note: In this example the IP address of master is 192.168.0.1, and the port is 5050. We will continue to use the URL shown here for the rest of this example; however when you run the following commands replace all instances of it with the URL of your master.
  4. URL of master: 192.168.0.1:5050
  5. View the master's web UI at http://[hostname of master]:8080.
  6. Launch a slave by typing bin/mesos-slave.sh --master=192.168.0.1:5050. The slave will show up on the master's web UI if you refresh it.
  7. Run the C++ test framework (a sample that just runs five tasks on the cluster) using src/test-framework 192.168.0.1:5050. It should successfully exit after running five tasks.
  8. You can also try the example python or Java frameworks, with commands like the following:
    1. src/examples/java/test-framework 192.168.0.1:5050
    2. src/examples/python/test-framework 192.168.0.1:5050
Note:c++ test framework will halt and master node needs set some environment variable and add following lines into .profile

export MESOS_HOME=$HOME/mesos-0.9.0
export MESOS_NATIVE_LIBRARY=$MESOS_HOME/src/.libs/libmesos.so
export LD_LIBRARY_PATH=$MESOS_HOME/src/.libs



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值