zoukankan      html  css  js  c++  java
  • (二)Spark-Linux环境准备-Java&Python版Spark

    Spark-Linux环境准备

    视频教程:

    1、优酷

    2、YouTube

    硬软件环境

    1、虚拟机:VMware Workstation 12

    2、虚拟机操作系统:RedHat5u4,单核,1G内存,2两台

    3、虚拟机运行环境:

    java version "1.7.0_79" 64

    Scala version 2.10.5

    hadoop-2.6.0

    spark-2.0.0-bin-hadoop2.6

    Python 2.7.12

    配置IP     

    192.168.3.100 master

    192.168.3.101 slave

    配置主机名

    [root@localhost ~]# vim /etc/sysconfig/network

    NETWORKING=yes

    NETWORKING_IPV6=no

    HOSTNAME=master

    [root@localhost ~]# hostname master

    三台主机都配置主机名

    [root@localhost ~]# vim /etc/sysconfig/network

    NETWORKING=yes

    NETWORKING_IPV6=no

    HOSTNAME= slave

    [root@localhost ~]# hostname slave

    重启生效

    关闭防火墙和selinux

    [root@master ~]# vim /etc/sysconfig/selinux

    # This file controls the state of SELinux on the system.

    # SELINUX= can take one of these three values:

    #       enforcing - SELinux security policy is enforced.

    #       permissive - SELinux prints warnings instead of enforcing.

    #       disabled - SELinux is fully disabled.

    SELINUX=disabled

    # SELINUXTYPE= type of policy in use. Possible values are:

    #       targeted - Only targeted network daemons are protected.

    #       strict - Full SELinux protection.

    SELINUXTYPE=targeted

    [root@master ~]# service iptables status

    表格:filter

    Chain INPUT (policy ACCEPT)

    num  target     prot opt source               destination         

    Chain FORWARD (policy ACCEPT)

    num  target     prot opt source               destination         

    Chain OUTPUT (policy ACCEPT)

    num  target     prot opt source               destination    

    域名解析

    使得masterslave互相连接对方

    [root@master ~]# vim /etc/hosts

    # Do not remove the following line, or various programs

    # that require network functionality will fail.

    127.0.0.1               localhost.localdomain localhost

    ::1             localhost6.localdomain6 localhost6

    192.168.3.100 master

    192.168.3.101 slave

    [root@slave ~]# vim /etc/hosts

    # Do not remove the following line, or various programs

    # that require network functionality will fail.

    127.0.0.1               localhost.localdomain localhost

    ::1             localhost6.localdomain6 localhost6

    192.168.3.100 master

    192.168.3.101 slave

  • 相关阅读:
    创建zabbix监控,添加监控机(server、agent、windows)
    KVM虚拟化平台简介及环境部署
    利用nginx的stream模块实现内网端口的转发代理
    Mysql主主同步+keepalived实现高可用
    基于 MHA 的 MySQL 高可用方案
    mysql基于Amoeba(变形虫)实现读写分离
    mysql主从异步复制
    基于mysqld_multi实现MySQL多实例多进程配置
    基于Haproxy+Keepalived构建高可用负载均衡集群
    yum 安装报错The GPG keys listed for the "CentOS-7
  • 原文地址:https://www.cnblogs.com/LgyBean/p/6251211.html
Copyright © 2011-2022 走看看