mesos 安装
2016-03-29 06:42
375 查看
软件需求:
g++(gcc-c++)
gcc
sun-jdk6
python2.6
python26-devel
git
subversion
环境变量JAVA_HOME也需要设置下
环境一定要干净
安装:
./configure.template.centos-5.4-64 基本上就差不多了,但是configure.template.centos-5.4-64中的第一行export LDFLAGS=-lunwind-x86_64 需要去掉,否则在配置的时候会出错。
$(dirname $0)/configure \
--with-python-headers=/usr/include/python2.6 \
--with-java-home=$JAVA_HOME\
--with-java-headers=$JAVA_HOME/include\
--with-webui \
--with-included-zookeeper $@
然后就make, make install
make的时候不能为了图速度就使用并行编译,有时候会出错的。
mesos就安装在/usr/local/mesos/ 下
可以用三种方式配置mesos
1. 启动参数,直接在MESOS_HOME/bin/mesos-master –conf=”….” –failover_timeout=…. …..
2. 环境变量,使用MESOS_*作为开头
3. 使用配置文件MESOS_HOME/conf是配置目录。将配置文件写在这个文件夹中。
运行:
启动Master:
–conf 指定配置目录,默认使用 <install location>/conf
–failover_timeout failover 的超时时间,单位秒。默认 86400秒
–ip 侦听ip地址
–log_buf_secs 缓冲多少秒的日志消息
–log_dir 日志存放目录(默认: MESOS_HOME/logs)
–port or -p 侦听端口,默认5050
–[no-]quiet (or [no-]q) 不打印标准错误输出stderr (默认: false)
–[no-]root_submissions root用户能启动mesosr(默认: true)
–slaves Initial slaves that should be considered part of this cluster (or if using ZooKeeper a URL) (default: *)
–url or -u URL used for leader election
–webui_port or -w Web UI port (default: 8080)
eg:
bin/mesos-master –log_dir=/home/yuquan.nq/dev/log/mesos &
启动slave:
bin/mesos-slave –help
Usage: bin/mesos-slave –master=URL [...]
URL may be one of:
mesos://id@host:port
zoo://host1:port1,host2:port2,…
zoofile://file where file contains a host:port pair per line
Supported options:
–attributes=VAL Attributes of machine
–conf=VAL Specifies a config directory from which to read Mesos config files. The Mesos binaries use <install location>/conf by default
–executor_shutdown_timeout_seconds=VAL Amount of time (in seconds) to wait for an executor to shut down (default: 5)
–frameworks_home=VAL Directory prepended to relative executor paths (default: MESOS_HOME/frameworks)
//--------------------------------
192.168.1.111 master2
192.168.1.112 master3
g++(gcc-c++)
gcc
sun-jdk6
python2.6
python26-devel
git
subversion
环境变量JAVA_HOME也需要设置下
环境一定要干净
安装:
./configure.template.centos-5.4-64 基本上就差不多了,但是configure.template.centos-5.4-64中的第一行export LDFLAGS=-lunwind-x86_64 需要去掉,否则在配置的时候会出错。
$(dirname $0)/configure \
--with-python-headers=/usr/include/python2.6 \
--with-java-home=$JAVA_HOME\
--with-java-headers=$JAVA_HOME/include\
--with-webui \
--with-included-zookeeper $@
然后就make, make install
make的时候不能为了图速度就使用并行编译,有时候会出错的。
mesos就安装在/usr/local/mesos/ 下
可以用三种方式配置mesos
1. 启动参数,直接在MESOS_HOME/bin/mesos-master –conf=”….” –failover_timeout=…. …..
2. 环境变量,使用MESOS_*作为开头
3. 使用配置文件MESOS_HOME/conf是配置目录。将配置文件写在这个文件夹中。
运行:
启动Master:
–conf 指定配置目录,默认使用 <install location>/conf
–failover_timeout failover 的超时时间,单位秒。默认 86400秒
–ip 侦听ip地址
–log_buf_secs 缓冲多少秒的日志消息
–log_dir 日志存放目录(默认: MESOS_HOME/logs)
–port or -p 侦听端口,默认5050
–[no-]quiet (or [no-]q) 不打印标准错误输出stderr (默认: false)
–[no-]root_submissions root用户能启动mesosr(默认: true)
–slaves Initial slaves that should be considered part of this cluster (or if using ZooKeeper a URL) (default: *)
–url or -u URL used for leader election
–webui_port or -w Web UI port (default: 8080)
eg:
bin/mesos-master –log_dir=/home/yuquan.nq/dev/log/mesos &
启动slave:
bin/mesos-slave –help
Usage: bin/mesos-slave –master=URL [...]
URL may be one of:
mesos://id@host:port
zoo://host1:port1,host2:port2,…
zoofile://file where file contains a host:port pair per line
Supported options:
–attributes=VAL Attributes of machine
–conf=VAL Specifies a config directory from which to read Mesos config files. The Mesos binaries use <install location>/conf by default
–executor_shutdown_timeout_seconds=VAL Amount of time (in seconds) to wait for an executor to shut down (default: 5)
–frameworks_home=VAL Directory prepended to relative executor paths (default: MESOS_HOME/frameworks)
//--------------------------------
1 Apache Mesos简介
Apache Mesos据说是云计算的未来,利用Mesos可轻易实现一个PaaS云平台。请参考http://mesos.apache.org/和
http://mesosphere.com/查看详细
2 Master节点安装
规划
192.168.1.110 master1192.168.1.111 master2
192.168.1.112 master3
关闭防火墙
master1,master2,master3systemctl stop firewalld && systemctl disable firewalld
添加 mesos的yum源
master1,master2,master3sudo rpm -Uvh http://repos.mesosphere.io/el/7/noarch/RPMS/mesosphere-el-repo-7-1.noarch.rpm[/code]安装mesos及相关软件
master1,master2,master3yum -y install mesos marathon yum -y install mesosphere-zookeeper配置zookeeper
master1touch /var/lib/zookeeper/myid echo 1 > /var/lib/zookeeper/myidmaster2touch /var/lib/zookeeper/myid echo 2 > /var/lib/zookeeper/myidmaster3touch /var/lib/zookeeper/myid echo 3 > /var/lib/zookeeper/myidmaster1,master2,master3vi /etc/zookeeper/conf/zoo.cfg添加server.1=192.168.1.110:2888:3888 server.2=192.168.1.111:2888:3888 server.3=192.168.1.112:2888:3888master1,master2,master3vi /etc/mesos/zk增加内容:zk://192.168.1.110:2181,192.168.1.111:2181,192.168.1.112:2181/mesos
master1,master2,master3vi /etc/mesos-master/quorum
增加内容:2配置mesos和marathon
master1echo 192.168.1.110 | sudo tee /etc/mesos-master/hostname mkdir -p /etc/marathon/conf/ && touch hostname echo 192.168.1.110 | sudo tee /etc/marathon/conf/hostnamemaster2echo 192.168.1.111 | sudo tee /etc/mesos-master/hostname mkdir -p /etc/marathon/conf/ && touch hostname echo 192.168.1.111 | sudo tee /etc/marathon/conf/hostnamemaster3echo 192.168.1.112 | sudo tee /etc/mesos-master/hostname mkdir -p /etc/marathon/conf/ && touch hostname echo 192.168.1.112 | sudo tee /etc/marathon/conf/hostname启动zookeeper mesos-master marathon
master1,master2,master3systemctl start zookeeper && systemctl start mesos-master && systemctl start marathon systemctl disable mesos-slave3 Slave节点安装
规划
192.168.1.113 client1关闭防火墙
systemctl stop firewalld && systemctl disable firewalld添加 mesos的yum源
sudo rpm -Uvh http://repos.mesosphere.io/el/7/noarch/RPMS/mesosphere-el-repo-7-1.noarch.rpm安装mesos
yum -y install mesos配置master信息
vi /etc/mesos/zk增加zk://192.168.1.110:2181,192.168.1.111:2181,192.168.1.112:2181/mesoscd /etc/mesos-slave/ touch hostname echo 192.168.1.113 | sudo tee /etc/mesos-slave/hostname启动mesos-slave
systemctl start mesos-slave && systemctl enable mesos-slave systemctl disable mesos-master4 测试
访问 http://192.168.1.110:5050 mesos地址
访问 http://192.168.1.110:8080 marathon地址,可利用其发布docker镜像并可调整应用数量![]()
相关文章推荐
- mesos + marathon + docker部署
- 【转】Singularity:基于Apache Mesos构建的服务部署和作业调度平台
- Mesos 配置(译)
- 在生产环境中使用Apache Mesos和Docker
- 译 | 像使用一台主机一样管理集群
- Mesos Framework Failover
- Mesos Task Killed by OOM Killer
- 基于Mesos和Docker的分布式计算平台
- Apache Mesos make errors
- 安装mesos,报错:cannot find libsasl2【解决】
- 在MacOs上配置Mesos+Zookeeper
- 在CentOs7上配置Mesos+Zookeeper
- Ubuntu Server14.04下MESOS部署
- Mesos实战总结
- Apache Mesos:数据中心就是计算机
- 大数据:通过Mesos、Docker和Go,使用300行代码创建一个分布式系统
- Spark随谈
- Spark安装与学习
- Mesos入门介绍
- mesos+marathon+zookeeper的docker管理集群亲手搭建实例(详细)