美文网首页
大数据环境初始化

大数据环境初始化

作者: 后知不觉1 | 来源:发表于2023-08-17 12:23 被阅读0次

    大数据底盘基础环境初始化

    1. 安装zip

    yum install zip

    1、设置selinux状态

    
     setenforce 0   #临时设置i
     sed -i 's#SELINUX=enforcing#SELINUX=disabled#' /etc/selinux/config   #防止重启失败
    
    

    1、调整linux 参数

    *    soft   nproc     524288    #进程
    *    hard  nproc     524288
    *    soft    nofile     524288    #打开文件数
    *    hard    nofile     524288
    *    soft   sigpending    1030568    
    *    hard  sigpending     1030568
    

    1、时间同步

    yum install chrony -y
    systemctl status chronyd
    systemctl enable chronyd
    systemctl start chronyd
    

    2、java安装

    ansible cluster -mcopy -a "src=/tmp/jdk-8u261-linux-x64.tar.gz dest=/tmp"           
    ansible cluster -mshell -a "tar -xvf /tmp/jdk-8u261-linux-x64.tar.gz -C /usr/local/"
    ansible cluster -mshell -a "ln -s /usr/local/jdk1.8.0_261 /usr/local/java"
    ansible cluster -mshell -a "echo -e 'export JAVA_HOME="/usr/local/java"\nexport PATH=\${JAVA_HOME}/bin:\${PATH}' > /etc/profile.d/java.sh"
    ansible cluster -mshell -a "source /etc/profile && java -version"
    

    3、 文件数修改

    ansible cluster -m shell -a "mv /etc/security/limits.d/20-nproc.conf /etc/security/20-nproc.confbak"
    ansible cluster -m shell -a "cp /etc/security/limits.conf  /etc/security/limits.confbak"
    ansible cluster -m shell -a "echo -e '*    soft   nproc     524288\n*    hard  nproc     524288\n*    soft    nofile     524288\n*    hard    nofile     524288\n*    soft   sigpending    1030568\n*    hard  sigpending     1030568\n' >> /etc/security/limits.conf"
    ansible cluster -m shell -a "sysctl -p" 
    
    重新登录即生效
    

    4、hosts修改

    export temp_group=tmp
    ansible $temp_group -m shell -a "cp /etc/hostname /etc/hostnamebak" 
    ansible $temp_group -m shell -a "echo {{ inventory_hostname }}> /etc/hostname" 
    ansible $temp_group -m shell -a "hostnamectl set-hostname {{ inventory_hostname }}" 
    ansible $temp_group -m shell -a "hostname"
    

    5. 基础环境配置

    
    *              soft    nproc   524288
    *              hard    nproc   524288
    *              soft    nofile  524288
    *              hard    nofile  524288
    *              soft sigpending 1030568
    *              hard sigpending 1030568
    

    5、ranger安装需要用root账号

    root账号必须需要远程链接

    host添加mysql信息

    密码规则修改

    去掉弱密码限制

    安装完成后再改回来

    6、hive初始化sql完毕需要修改

    ALTER table COLUMNS_V2 modify COMMENT varchar(256) character set utf8mb4 collate utf8mb4_general_ci;
    ALTER table DATABASE_PARAMS modify COMMENT varchar(256) character set utf8mb4 collate utf8mb4_general_ci;
    

    相关文章

      网友评论

          本文标题:大数据环境初始化

          本文链接:https://www.haomeiwen.com/subject/kwmmpdtx.html