201806-05 mesos安装--软件源安装

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

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

一、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命名成功后,执行以下两条命令
$ make check

# Install (Optional).
$ 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
报错: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
原因:当前帐号无/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

时间: 2024-07-30 01:29:37

201806-05 mesos安装--软件源安装的相关文章

本地Yum软件源安装Cloudera Manager 5

本地Yum软件源安装Cloudera Manager 5 (非原创,转自http://blog.csdn.net/yangzhaohui168/article/details/30118175) Cloudera Manager 5(以下简称CM)默认采用在线安装的方式,给不能联互联网或者网络不畅的用户带来了不便,由于网络问题,屡装屡败的挫折感,让初次学习CDH用户真心体验到万事开头难.本文讲解了在CentOS 6环境下搭建本地Yum软件源,局域网内的用户在完全不连互联网的情况下,完成CM的安装

CentOS 7 使用 Yum 软件源安装谷歌 Chrome 浏览器

Google Chrome是一款由 Google 公司开发的网页浏览器,新版的 Chrome 浏览器使用的是 Blink 内核,具有运行速度快,稳定的特性.Chrome 能够运行在 Windows,Linux,Mac 桌面系统中,同时也能运行在手机和平板上的iOS,Android系统上,是一款跨平台的浏览器. 本文章介绍在 CentOS 7 系统上使用谷歌 Yum 软件源安装 Chrome 浏览器,谷歌的官方软件源在中国可用,使用谷歌 Yum 软件源能够保证安装的 Chrome 浏览器是最新版本

centos的常用4个安装软件源

epel http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm rpmforge http://pkgs.repoforge.org/rpmforge-release/ (文件pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm) 这是remi(这个一般不太用,安装新版本软件时用这个) http://

CentOS下的编译源代码安装软件( 以安装python3为例 )

在 CentOS 下安装软件,可以使用 rpm软件包.yum工具.自行下载源代码进行编译安装,其中编译安装的定制性较高 对于一些在软件,自行下载源代码进行编译安装较为方便 程序:源代码 --> 编译 --> 链接 --> 运行 执行编译安装步骤: 获取源代码并解压 #tar xf xxx.tar.gz //或者: #tar xf xxx.tar.bz2 在解压完的源代码目录下执行 configure 脚本 #./configure [options] 选项: --help 查看该脚本帮助

HADOOP再进阶:本地Yum软件源安装Cloudera Manager 5

参考URL: http://blog.csdn.net/yangzhaohui168/article/details/30118175 http://blog.csdn.net/yangzhaohui168/article/details/33403555

Linux源码安装软件

Linux源码安装软件 源码安装:最原始最有效的安装方式 三部曲(1)—./configure xxx 生成makefile文件,随后需要的安装信息都是从这一步中获取 (2)make 根据makefile的指示开展编译工作,利用gcc将原始码编译为目标文件目标文件使用动态或静态函数库产生一个完整的可执行文件 (3)make install根据makefile文件里关于install的项目,将所编译完成的文件安装到指定目录一般有etc.lib.bin.man等目录 源码安装是费力不讨好的,这种方式

linux光盘使用、rpm软件包、yum软件仓库安装使用

一.光盘文件使用 1,RHEL5(x86_64)光盘结构 Cluster              //集群二进制包 ClusterStorage  //集群文件系统二进制包 Server               //核心服务器的二进制包产品 VT                    //虚拟化二进制包 image        //引导和驱动程序磁盘映像 isolinux        //图像引导文件 2,挂载光盘(放入光盘) /dev/cdrom = /dev/hdc 光盘驱动器设备

色差仪软件的安装和电池充电

现在的色差仪都是用标准的色彩信息分析和功能拓展类软件,目的就是色差仪的使用和分析更加完美.不同公司生产的色差仪和色彩管理软件大多数都是不通用的,只有软件开发商公司生产的色差仪才能一起使用.所以当顾客购买色差仪时一定要注意配套问题.三恩驰色差仪的软件都是免费赠送的的所以购买后检查产品配件是要注意是否含有软件. 色差仪软件的安装 软件是安装在PC机上的,所以当我们准备使用软件管理色彩时,首先要将软件安装在电脑上(要注意软件要求电脑配置).另外软件和仪器连接使用USB数据线实现的,软件为仪器和应用程序

nginx软件编译安装

第一个里程:软件依赖包安装pcre-devel: perl语言正则表达式兼容软件包openssl-devel:使系统支持https方式访问yum install -y pcre-devel openssl-devel 第二个里程:创建一个管理nginx进程的虚拟用户 useradd www -s /sbin/nologin/ -M 第三个里程:下载并解压nginx软件cd /server/toolswget http://nginx.org/download/nginx-1.12.2.tar.g