zoukankan      html  css  js  c++  java
  • centos7 最小化安装后的配置优化

    echo #CENTOS7
    echo #1.最小化安装之后需要做的事
    echo 2.配置
    echo 2.1 安装网络
    yum install net-tools -y

    echo 2.2 更新机器名
    echo hdp1.student >/etc/hostname
     
    echo 2.3.配置防火墙  
    echo #关闭防火墙
    systemctl stop firewalld.service #停止firewall
    systemctl disable firewalld.service #禁止firewall开机启动

    echo 2.4 关闭selinux
    sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
    setenforce 0  #临时禁用selinux

    echo 2.5 安装ssh 服务器 客户端 并启动服务
    yum -y install openssh-server openssh-clients
    systemctl enable sshd  
    systemctl start sshd
    #firewall-cmd --zone=public --add-port=22/tcp --permanent  

    echo 2.6 安装 wget
    yum -y install wget

    echo 2.7 替换repo源为阿里repo
    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    echo  #重建源数据缓存
    yum clean all
    yum makecache

    echo 2.8 更新并升级系统
    yum -y update && yum -y upgrade

    echo create ambari repo
    cat >/etc/yum.repos.d/ambari.repo <<EOF
    [Updates-ambari-2.5.2.0]
    name=ambari-2.5.2.0 - Updates
    baseurl=http://192.168.217.1:8080/ambari/centos7/
    gpgcheck=1
    gpgkey=http://192.168.217.1:8080/ambari/centos7/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
    enabled=1
    priority=1
    EOF

     
    yum install ambari-server -y

    mariadb root Root_123
    需要注意的两点:
    复制mysql-connector-java.jar 到/usr/share/java/
    启动设置的时候指定jdbc

    cat >>/etc/hosts <<EOF
    192.168.217.128 hdp1.student hdp1
    192.168.217.129 hdp2.student hdp2
    192.168.217.130 hdp3.student hdp3
    EOF

    http://192.168.217.1:8080/HDP-UTILS/centos7/
    http://192.168.217.1:8080/HDP/centos7/

    安装hdp的时候需要注意的是:
    1.修改日志默认配置位置
    安装WPS之后无法输入中文的解决方法:

    在/usr/bin/wps /usr/bin/wpp /usr/bin/et

    中分别加入

    export XIM="ibus"
    export XIM_PROGRAM="ibus"
    export XMODIFIERS="@im=ibus"
    export GTK_IM_MODULE="ibus"
    export QT_IM_MODULE="ibus"
  • 相关阅读:
    程序活动记录&程序调试&多线程编程
    数据结构与算法
    C/C++
    Information Retrieval --- Retrieval Comment
    Information Retrieval --- Clustering
    Information Retrieval --- Classification
    Information Retrieval --- Web Search
    Information Retrieval --- Retrieval Enforce:Relevance Feedback & Query Expansion
    Information Retrieval --- Retrieval Model
    ubuntu server 安装vnc
  • 原文地址:https://www.cnblogs.com/huaxiaoyao/p/7537815.html
Copyright © 2011-2022 走看看