分类 默认分类 下的文章

MAC OSX Hadoop+Hive环境快速搭建

环境

brew安装 : http://brew.sh

安装

brew install hadoop hive

环境配置

vim ~/.zshrc

#java
export JAVA_HOME=`/usr/libexec/java_home`
#hadoop & hive
export HADOOP_HOME=$(brew --prefix hadoop)
export HIVE_HOME=$(brew --prefix hive)/libexec
export HCAT_HOME=$(brew --prefix hive)/libexec/hcatalog
export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native
export HADOOP_OPTS="-Djava.library.path=$HADOOP_HOME/lib"

source ~/.zshrc

测试

hadoop version  && hive -h

小团队作战之Docker Compose

application.yml 配置:

#db实例1
mysql001:
    image: "mysql:latest"
    environment:
        - MYSQL_ROOT_PASSWORD=123
    volumes:
        - /data/docker/mysql001_Data:/var/lib/mysql

#团队内部文档系统
devMediawiki:
    image: 'synctree/mediawiki'
    ports:
        - "10080:80"
    links:
        - mysql001:mysql
    volumes:
        - /data/docker/mediawiki:/var/www/html
    restart: always

#web移动端调试工具
weinre:
    image: "logankoester/weinre"
    command: --boundHost -all-
    ports:
        - "8080:8080"

monitor.yml 配置:

#cadvisor docker服务监控
cadvisor:
    image: "google/cadvisor:latest"
    ports:
        - "11080:8080"
    volumes:
        - /:/rootfs:ro
        - /var/run:/var/run:rw
        - /sys:/sys:ro
        - /var/lib/docker/:/var/lib/docker:ro

execute:
sudo docker-compose -f /data/docker-compose/application.yml up -d
sudo docker-compose -f /data/docker-compose/monitor.yml up -d

enjoy!