2018-06-05

对http://mesos.apache.org/documentation/latest/building/的实操。

下载的mesos包中的执行文件都为.sh.in文件且无执行权限,所以都要进行软件源安装。

0、命令精简
$ git clone https://git-wip-us.apache.org/repos/asf/mesos.git
$ 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 epel-release
$ sudo bash -c 'cat > /etc/yum.repos.d/wandisco-svn.repo <<EOF
[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
EOF'
$ sudo yum update systemd
$ sudo yum groupinstall -y "Development Tools"
$ sudo yum install -y apache-maven
$ sudo yum install -y python-devel
$ sudo yum install -y python-six
$ sudo yum install -y python-virtualenv
$ sudo yum install -y java-1.8.0-openjdk-devel
$ sudo yum install -y zlib-devel
$ sudo yum install -y libcurl-devel
$ sudo yum install -y openssl-devel
$ sudo yum install -y cyrus-sasl-devel
$ sudo yum install -y cyrus-sasl-md5
$ sudo yum install -y apr-devel
$ sudo yum install -y subversion-devel
$ sudo yum install -y apr-util-devel

$ cd mesos
$ ./bootstrap
$ mkdir build
$ cd build
$ ../configure
$ make clean
$ make
$ sudo make check
$ sudo make install

$ sudo ./bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/var/lib/mesos
$ ./bin/mesos-agent.sh --master=127.0.0.1:5050 --work_dir=/var/lib/mesos
$ http://127.0.0.1:5050
$ ./src/test-framework --master=127.0.0.1:5050
$ ./src/examples/java/test-framework 127.0.0.1:5050
$ ./src/examples/python/test-framework 127.0.0.1:5050

一、Downloading Mesos
There are different ways you can get Mesos:

方法1. Download the latest stable release from Apache (Recommended)
$ wget http://www.apache.org/dist/mesos/1.6.0/mesos-1.6.0.tar.gz
$ tar -zxf mesos-1.6.0.tar.gz

方法2. Clone the Mesos git repository (Advanced Users Only)。在当前目录下生成一个mesos文件
$ git clone https://git-wip-us.apache.org/repos/asf/mesos.git

NOTE: If you have problems running the above commands, you may need to first run through the System Requirements section below to install the wget, tar, and git utilities for your system.

二、System Requirements
Mesos runs on Linux (64 Bit) and Mac OS X (64 Bit). To build Mesos from source, GCC 4.8.1+ or Clang 3.5+ is required.
On Linux, a kernel version >= 2.6.28 is required at both build time and run time. For full support of process isolation under Linux a recent kernel >= 3.10 is required.
The Mesos agent also runs on Windows. To build Mesos from source, follow the instructions in the Windows section.
Make sure your hostname is resolvable via DNS or via /etc/hosts to allow full support of Docker’s host-networking capabilities, needed for some of the Mesos tests. When in doubt, please validate that /etc/hosts contains your hostname.

CentOS 7.1
Following are the instructions for stock CentOS 7.1. If you are using a different OS, please install the packages accordingly.

# Install a few utility tools。安装且更新到最新
# $ sudo yum install -y tar wget git

# Fetch the Apache Maven repo file。保存到/etc/yum.repos.d/epel-apache-maven.repo
$ sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo

# Install the EPEL repo so that we can pull in 'libserf-1' as part of our subversion install below。更新epel-release-7-11.noarch
$ sudo yum install -y epel-release

# 'Mesos > 0.21.0' requires 'subversion > 1.8' devel package, which is not available in the default repositories. Create a WANdisco SVN repo file to install the correct version:。默认库不可用,SVN安装需要自定义repo库
$ sudo bash -c 'cat > /etc/yum.repos.d/wandisco-svn.repo <<EOF
[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
EOF'

# Parts of Mesos require systemd in order to operate. However, Mesos only supports versions of systemd that contain the 'Delegate' flag. This flag was first introduced in 'systemd version 218', which is lower than the default version installed by centos. Luckily, centos 7.1 has a patched 'systemd < 218' that contains the 'Delegate' flag. Explicity update systemd to this patched version.。centos小于7.1版本时需要安装systemd命令。
$ sudo yum update systemd

# Install essential development tools.。安装更新软件群组"Development Tools"。
$ sudo yum groupinstall -y "Development Tools"
实操警告:分组 development 不包含任何可安装软件包。

# Install other Mesos dependencies.。安装更新Mesos的其他依赖
$ sudo yum install -y apache-maven python-devel python-six python-virtualenv java-1.8.0-openjdk-devel zlib-devel libcurl-devel openssl-devel cyrus-sasl-devel cyrus-sasl-md5 apr-devel subversion-devel apr-util-devel
报错:Error downloading packages:
  subversion-devel-1.9.7-1.x86_64: [Errno 256] No more mirrors to try.
  subversion-1.9.7-1.x86_64: [Errno 256] No more mirrors to try.
解决办法:分开下载:
sudo yum install -y apache-maven
sudo yum install -y python-devel
sudo yum install -y python-six
sudo yum install -y python-virtualenv
sudo yum install -y java-1.8.0-openjdk-devel
sudo yum install -y zlib-devel
sudo yum install -y libcurl-devel
sudo yum install -y openssl-devel
sudo yum install -y cyrus-sasl-devel
sudo yum install -y cyrus-sasl-md5
sudo yum install -y apr-devel
sudo yum install -y subversion-devel
sudo yum install -y apr-util-devel

三、Building Mesos (Posix)
# Change working directory.
$ cd mesos

# Bootstrap (Only required if building from git repository).
$ ./bootstrap

# Configure and build.
$ mkdir build
$ cd build
$ ../configure
执行时报错:configure: error: cannot find libapr-1 headers
原因是缺少apr-devel-1.3.9-3.el6.x86_64
需要下载相应的rpm,并安装:
rpm -ihv apr-1.3.9-3.el6.x86_64.rpm
rpm -ihv apr-devel-1.3.9-3.el6.x86_64.rpm
rpm -ihv  apr-util-1.3.9-3.el6.x86_64.rpm

$ make clean

$ make
报错:
Building mesos-1.7.0.jar ...
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-remote-resources-plugin:1.3:process (default) on project mesos: Execution default of goal org.apache.maven.plugins:maven-remote-resources-plugin:1.3:process failed: Plugin org.apache.maven.plugins:maven-remote-resources-plugin:1.3 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-remote-resources-plugin:jar:1.3 -> org.apache.maven.shared:maven-filtering:jar:1.0 -> org.codehaus.plexus:plexus-interpolation:jar:1.12: Failed to read artifact descriptor for org.codehaus.plexus:plexus-interpolation:jar:1.12: Could not transfer artifact org.codehaus.plexus:plexus-interpolation:pom:1.12 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org: Unknown host repo.maven.apache.org -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
make[1]: *** [java/target/mesos-1.7.0.jar] 错误 1
make[1]: 离开目录“/home/weis/mesos/build/src”
make: *** [all-recursive] 错误 1
整理:[ERROR] Failed to execute goal org.apache.maven.plugins:
maven-remote-resources-plugin:1.3:
process (default) on project mesos:
Execution default of goal org.apache.maven.plugins:
maven-remote-resources-plugin:
1.3:process failed:
Plugin org.apache.maven.plugins:
maven-remote-resources-plugin:
1.3 or one of its dependencies could not be resolved:
Failed to collect dependencies at org.apache.maven.plugins:
maven-remote-resources-plugin:
jar:1.3 -> org.apache.maven.shared:
maven-filtering:
jar:1.0 -> org.codehaus.plexus:
plexus-interpolation:
jar:1.12: Failed to read artifact descriptor for org.codehaus.plexus:
plexus-interpolation:
jar:1.12: Could not transfer artifact org.codehaus.plexus:
plexus-interpolation:
pom:
1.12 from/to central (https://repo.maven.apache.org/maven2):
repo.maven.apache.org:
Unknown host repo.maven.apache.org ->
[Help 1]
未能执行目标org.apache.maven插件
解决办法:保持网络连接
报错二:存储空间不足。解决办法:需要10G的空间来运行

In order to speed up the build and reduce verbosity of the logs, you can append -j <number of cores> V=0 to make.
# Run test suite.上述make命名成功后,执行以下两条命令
$ sudo make check

执行结果:

[----------] Global test environment tear-down
[==========] 1953 tests from 196 test cases ran. (857721 ms total)
[  PASSED  ] 1953 tests.
  YOU HAVE 22 DISABLED TESTS

# Install (Optional).
$ sudo make install

四、Examples
Mesos comes bundled with example frameworks written in C++, Java and Python. The framework binaries will only be available after running make check, as described in the Building Mesos section above.

# Change into build directory.
$ pwd
/home/weis/mesos/build

# Start Mesos master (ensure work directory exists and has proper permissions).。保持窗口打开,就可以访问了
$ sudo ./bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/var/lib/mesos
报错1:EXIT with status 1: Failed to initialize systemd: Failed to create systemd slice 'mesos_executors.slice': Failed to write systemd slice `/run/systemd/system/mesos_executors.slice`: Permission denied
报错2:EXIT with status 1: Failed to recover the log: IO error: /var/lib/mesos/replicated_log/LOCK: Permission denied
原因:当前帐号无/run目录的写权限。
解决办法:sudo命令下执行。

# Start Mesos agent (ensure work directory exists and has proper permissions).
$ ./bin/mesos-agent.sh --master=127.0.0.1:5050 --work_dir=/var/lib/mesos

# Visit the Mesos web page.
$ http://127.0.0.1:5050

# Run C++ framework (exits after successfully running some tasks).运行C++框架(成功运行某些任务后退出)。找不到此文件
$ ./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
报错:Failed to find /home/weis/mesos/build/src/examples.jar

# Run Python framework (exits after successfully running some tasks).
$ ./src/examples/python/test-framework 127.0.0.1:5050
报错:Failed to find /home/weis/mesos/build/src/examples.jar

Note: These examples assume you are running Mesos on your local machine. Following them will not allow you to access the Mesos web page in a production environment (e.g. on AWS). For that you will need to specify the actual IP of your host when launching the Mesos master and ensure your firewall settings allow access to port 5050 from the outside world.

转载于:https://www.cnblogs.com/shoubituling/p/9139426.html

mesos安装--软件源安装相关推荐

  1. linux安装方舟编译器,华为方舟编译器安装 软件源码地址,华为方舟编译器安装 软件源码地址预约 - 浏览器家园...

    华为方舟编译器下载安装 软件源码下载地址 2019华为全球开发者大会将在8月9日-11日在华为松山湖基地召开.本次开发者大会邀请了1500位合作伙伴.5000名全球开发者,将是华为历来规模最大的一次会 ...

  2. linux怎么给所有用户安装软件,Linux安装软件的几种方法

    一.rpm 包安装方式步骤: 1.找到相应的软件包,比如 soft.version.rpm,下载到本机某个目录: 2.打开一个终端,su - 成 root 用户: 3.cd soft.version. ...

  3. mysql安装无效安装源_(0.2.4)Mysql安装——yum源安装

    转自:https://www.cnblogs.com/jimboi/p/6405560.html 1.下载好对应版本的yum源文件 2.安装用来配置mysql的yum源的rpm包 可以用: yum r ...

  4. AppSync for iOS7安装教程、Cydia软件源安装AppSync补丁

    么是ipa补丁 ipa补丁在Cydia里的名称是ApPSync for iOS(版本号),是在越狱之后,通过同步itunes安装破解过的后缀名格式为.ipa软件,所用到的补丁. AppSync for ...

  5. 银河麒麟通过命令行安装软件没有安装上

    提要 安装软件时出现: nigulasi@nigulasi-virtual-machine:~$ dpkg -L fcitx-frontend-qt5 | grep .so dpkg-query: 软 ...

  6. windows10 设置禁止电脑自动安装软件,安装软件时会有提示

    禁止电脑自动安装软件的方法: 1.打开本地组策略编辑器,找到windows设置: 2.依次打开安全设置.本地策略.安全选项: 3.在本地安全设置中,设置[同意提示]即可. 本文操作环境:windows ...

  7. 苹果应用html安装app,iphoneX如何安装软件 iphoneX安装软件方法【详细教程】

    一些 iPhoneX 新用户拿到手机之后,常常会遇到这一些使用的问题,要熟练使用iphoneX还需要一段时间的琢磨和习惯.在使用iphoneX遇到的问题中,在iphoneX安装软件这一个问题被提问得非 ...

  8. 安卓系统怎么安装软件_VMware安装Android x86虚拟机,实现在PC电脑上运行安卓系统...

    在日常的使用中,有时需要在PC机上模拟安装运行安卓系统,如果你的电脑中安装有vmware或者VirtualBox虚拟机.安装Android x86虚拟机是一个不错的选择.可以在PC电脑中模拟出一个安卓 ...

  9. kali安装步骤失败 选择并安装软件_ug安装教程详细步骤ug怎么免费安装教程ug软件怎样安装步骤...

    大家好,我是西瓜大大,今天给大家分享ug安装教程详细步骤,希望对大家有所帮助. ugnx 10.0安装详细步骤.下面我们进入ug正式安装环节! 1.下载ugnx10.0安装包后,点击setup.exe ...

最新文章

  1. 古怪的ConfigurationManager类
  2. ​2018你不得不看的国内CRM软件排行榜
  3. PermissionError: [Errno 13] Permission denied: ‘name.pdf‘
  4. Oculus推出近场HRTF和立体声源,将打造真正身临其境的VR体验
  5. libgo 支持mysql,loadrunner通过使用libmysql.dll完成mysql的测试-Go语言中文社区
  6. Golang——error处理及panic、recover使用的正确姿势
  7. 2020国货彩妆市场研究报告
  8. 根据要求调参用matplotlib做一个一模一样的直方图(以及如何把成图变得更好看)
  9. python报错:Cannot run the event loop while another loop is running
  10. java 代码里设置环境变量_如何在一个java程序里设置环境变量
  11. java中String类的用法
  12. aix oracle版本查看命令,AIX 常用命令
  13. 使用NUnit进行DotNet程序测试
  14. windows搭建ABD环境 搭建ADB开发环境
  15. 微盾php脚本解密,微盾php解密(黑刀微盾解密专家)
  16. 程序猿段子_程序员的十个段子,能看懂的都是深有同感!
  17. 音乐计算机曲谱狂妄之人,【B】 Undertale Sans战斗曲 MEGALOVANIA狂妄之人
  18. python提取人物特征_基于图像人物面部表情识别的特征提取优化方法与流程
  19. Windows 服务监控工具
  20. 关于APP抓包,Mac就不配拥有姓名吗?

热门文章

  1. 年底买基金的六大建议!
  2. 基于ETH创建自己的代币
  3. pdf转word ocr_OCR免费识别撞上PDF免费转WORD,这下尴尬了!
  4. centos7无盘启动_centos启动tftp服务器
  5. oracle11gwin8,win8_oracle11g_64位连接32位PLSQL_Developer
  6. 微信小程序用户头像编辑上传
  7. ESP32 烧录出厂固件
  8. 主题模型(LDA)案例:分析人民网留言板数据
  9. CSS 笔记——定位尺寸
  10. win10计算机出现位置不可用desktop不可用,桌面只有此电脑几个图标,其它桌面图标都没有了