Mesos 安装环境
1、meso
UBUNTU 14.04 LTS 64位版本,AMD64的内核
内核版本号为 3.13.0
2、下载
wget http://www.apache.org/dist/mesos/0.20.1/mesos-0.20.1.tar.gz
3、依赖
# Ensure apt-get is up to date.
$ sudo apt-get update
# Install build tools.
$ sudo apt-get install build-essential
# Install OpenJDK java.
$ sudo apt-get install openjdk-6-jdk
# Install devel python.
$ sudo apt-get install python-dev python-boto
# Install devel libcurl
$ sudo apt-get install libcurl4-nss-dev
# Install devel libsasl (Only required for Mesos 0.14.0 or newer).
$ sudo apt-get install libsasl2-dev
# Install Maven (Only required for Mesos 0.18.1 or newer).
$ sudo apt-get install maven
# Install devel libapr1 (Only required for Mesos 0.21.0 or newer)
$ sudo apt-get install libapr1-dev
# Install devel libsvn (Only required for Mesos 0.21.0 or newer)
$ sudo apt-get install libsvn-dev
# 官方文档里少了这个
$ sudo apt-get install libcurl4-openssl-dev
4、构建
Change working directory.
$ cd mesos
Bootstrap (Skip this if you are not building from git repo).
$ ./bootstrap
Configure and build.
mkdirbuild
cd build
../configure
make
Run test suite.
$ make check
Install (Optional).
$ make install
5、运行
# Change into build directory.
$ cd build
Start mesos master (Ensure work directory exists and has proper permissions).
$ ./bin/mesos-master.sh –ip=127.0.0.1 –work_dir=/var/lib/mesos
Start mesos slave.
$ ./bin/mesos-slave.sh –master=127.0.0.1:5050
./bin/mesos-slave.sh –master=0.0.0.0:5050
Visit the mesos web page.
$ http://127.0.0.1:5050
Run C++ framework (Exits after successfully running some tasks.).
$ ./src/test-framework –master=127.0.0.1:5050
Run Java framework (Exits after successfully running some tasks.).
$ ./src/examples/java/test-framework 127.0.0.1:5050
# Run Python framework (Exits after successfully running some tasks.).
$ ./src/examples/python/test-framework 127.0.0.1:5050
7、meso的生态圈
http://mesos.apache.org/documentation/latest/mesos-frameworks/
8、marathon
https://github.com/mesosphere/marathon
9、踩过的坑
libcurl is required for mesos to build
这时候单纯执行:sudo apt-get install libcurl4-openssl-dev
可能会出现以下问题:
Depends: libcurl4-openssl-dev but it is not going to be installed
这样说明安装出现了conflicts。我的解决方法是:
sudo vi /etc/apt/sources.list
3将以下内容复制到里面:
[html] view plain copy
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
测试版源
deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
源码
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
测试版源
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
Canonical 合作伙伴和附加
deb http://archive.canonical.com/ubuntu/ xenial partner
deb http://extras.ubuntu.com/ubuntu/ xenial main
然后sudo apt-get update
再次安装既可。