Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install Mesos in Centos7

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Centos7 how to install Mesos, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.

1. Add yum repository

Rpm-Uvh http://repos.mesosphere.io/el/7/noarch/RPMS/mesosphere-el-repo-7-3.noarch.rpm

2, install zookeeper

Yum-y install mesosphere-zookeeper

If there is a ready-made zookeeper, you can use it directly, or you can download zookeeper from apache.

3. Install mesos

Yum-y install mesos

4,docker

Yum-y install docker

If you don't use docker as a container, you don't have to install docker.

5. Start zookeeper

Systemctl start zookeeper

Zookeeper installed through yum comes with a default configuration file, which can be started directly.

6, configure the zookeeper address

Echo "zk://127.0.0.1:2181/mesos" > / etc/mesos/zk

Used for master to achieve high availability and master to interact with slave

7, configure master startup parameters

/ / master work path to store cluster persistence information. If it does not match, the startup will report an error. / / the minimum number of instances that have been automatically configured to / var/lib/mesosecho / var/lib/mesos/master > / etc/mesos-master/work_dir//master cluster to maintain high availability after installation. It is usually set to be greater than the majority and cardinality of the number of master instances, and there is currently only one instance, so it is configured to 1. / / if the parameter registry is set to in_memory, it means that the cluster persistence information is stored in memory, that is, in standalone mode, it can not be configured, otherwise it cannot be started. / / after installation, it has been automatically configured to 1echo 1 > / etc/mesos-master/quorum//master listening address, which must be configured, otherwise other machines cannot connect to echo 172.18.21.192 > / etc/mesos-master/ip

8, start mesos-master

Systemctl start mesos-master

9, the browser opens the master address http://192.168.2.151:5050, and you can see the mesos web page

10, configure slave startup parameters

/ / Container types supported by slave. Optional mesos (resource isolation based on LXC) and docker (need to install docker). Default working directory of mesosecho docker,mesos > / etc/mesos-slave/containerizers//slave For executor to save sandboxe and failover checkpoints / / automatically configured to / var/lib/mesos echo / var/lib/mesos > / etc/mesos-slave/work_dir after installation

11, start mesos-slave

Systemctl start mesos-slave

12, at this point, you can click Agents on the mesos web page to see that mesos has discovered slave. The name of the new version has been changed from slave to agent, but the names of the commands have not been changed. I don't know why.

The installation is complete.

There are a few points to add:

1. If the docker container is configured, dokcer must be installed, otherwise slave startup will report an error.

2. If zookeeper is a cluster, you need to configure the zk address as:

Echo "zk://192.168.2.151:2181192.168.2.152:2181192.168.2.153:2181/mesos" > / etc/mesos/zk

3. To build a master cluster, simply configure each master node with the same zookeeper address and set the quorum to the corresponding value. If there are three master nodes, you need to execute them on each machine:

Echo 2 > / etc/mesos-master/quorum

4. I have encountered that master has been reporting the loss of slave. It is speculated that it may be related to the mesos version or the network configuration of the operating system. It can be solved by configuring the slave listening address:

Echo 192.168.2.151 > / etc/mesos-master/ip

5. In some operating systems, using systemctl to start slave may cause errors, and you can start it directly with the command. Parameters can be viewed by performing mesos-slave-- help, and master is the same:

Mesos-slave-master=zk://127.0.0.1:5050/mesos-log_dir=/var/log/mesos-containerizers=docker,mesos-work_dir=/etc/mesos-slave/work_dir

6. In fact, to start the service with the systemctl command is to read the configuration file through the / usr/bin/mesos-init-wrapper script, and finally start by calling the mesos-master or mesos-slave command. For more information, you can see the content of the script.

7 if you can't start rm-f / var/lib/mesos/meta/slaves/latest solution, you can try to do it.

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report