源码安装mesos

源码安装mesos

源码安装mesos

1
2
3
4
5
6
7
8
9
10
11
wget http://archive.apache.org/dist/mesos/1.3.0/mesos-1.3.0.tar.gz

需要 mvn 环境 export MAVEN_HOME
yum groupinstall -y "Development Tools"
yum install apr* patch libcurl libcurl-devel path python-devel java-1.7.0-openjdk-devel zlib-devel libcurl-devel openssl-devel cyrus-sasl-devel cyrus-sasl-md5 apr-devel subversion-devel apr-util-devel subversion subversion-devel systemtap systemtap-client zlib-devel

tar -zxvf mesos-1.3.0.tar.gz
cd mesos-1.3.0
./configure --prefix=/home/mesos/mesos-slave
make
make install

官网安装说明 : http://mesos.apache.org/documentation/latest/building/

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Install a few utility tools
$ sudo yum install -y tar wget git

# Fetch the Apache Maven repo file.
$ 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.
$ 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:
$ 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.
$ sudo yum update systemd

# Install essential development tools.
$ sudo yum groupinstall -y "Development Tools"

# Install other Mesos dependencies.
$ 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

# Change working directory.
$ cd mesos

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

# Configure and build.
$ mkdir build
$ cd build
$ ../configure
$ make

# Run test suite.
$ make check

# Install (Optional).
$ make install

用super启动mesos-agent

1
2
3
4
5
6
7
8
9
10
11
12
13
[root@logstash00 conf]# cat mesos-agent.ini 
[program:mesos-agent]
command = /home/mesos/mesos-slave/sbin/mesos-agent --master=zk://10.0.0.52:2181,10.0.0.53:2181,10.0.0.54:2181/mesos --log_dir=/var/log/mesos --containerizers=docker,mesos --executor_registration_timeout=5mins --work_dir=/home/mesos/mesos --hostname=logstash00 --attributes=nginx:ok;service:nginx;test:ok;app:nginx;db:ok;server:nginx
autostart = true
autorestart = true
startsecs = 3
startretries = 3
stopwaitsecs = 5
user = root
redirect_stderr = true
stdout_logfile = /home/mesos/logs/supervisor/mesos-agent.log
stdout_logfile_maxbytes = 500MB
stdout_logfile_backups = 3

感觉文章还可以的话,帮忙点点下面的广告哦! 谢谢支持!

感谢您的支持!