zoukankan      html  css  js  c++  java
  • Redhat Enterprise Linux 7.4/CentOS 7.4 安装后初始化配置


    由于我是最小化安装,需要在安装后进行一些配置

    1. 设定启动级别

    [root@home ~]# systemctl set-default multi-user.target

    2. 设定网络

    [root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
    TYPE=Ethernet
    PROXY_METHOD=none
    BROWSER_ONLY=no
    BOOTPROTO=no
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=no
    IPV6INIT=yes
    IPV6_AUTOCONF=yes
    IPV6_DEFROUTE=yes
    IPV6_FAILURE_FATAL=no
    IPV6_ADDR_GEN_MODE=stable-privacy
    NAME=eth0
    UUID=54a33101-00eb-41223-9c65-cd7c03adb019
    DEVICE=eth0
    ONBOOT=yes
    IPADDR=10.108.1.15
    PREFIX=24
    GATEWAY=10.108.1.1
    DNS1=10.108.1.1
    IPV6_PRIVACY=no

    3. 由于我是在内网环境使用,所以关闭selinux

    [root@home ~]# vi /etc/selinux/config
    SELINUX=disabled

    4. 由于我是在内网环境使用,所以也关闭firewall

    [root@home ~]# systemctl stop firewalld.service
    [root@home ~]# systemctl disable firewalld.service

    5. 设定aliyun作为CentOS yum源

    mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
    curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    yum makecache

    6. 挂载ISO作为RHEL yum源 (Red Hat Enterprise Linux)

    [root@home ~]# mkdir /mnt/rhel
    [root@home ~]# mount -o loop -t iso9660 /opt/rhel-server-7.4-x86_64-dvd.iso /mnt/rhel
    [root@home ~]# vi /etc/yum.repos.d/rhel.repo
    [rhel]
    name=rhel
    baseurl=file:///mnt/rhel
    gpgcheck=0
    enabled=1
    [root@home ~]# yum repolist

    7. 安装常用的软件

    yum -y install yum-utils yum-priorities epel-release 
    yum -y install bind-utils wget vim htop


    8. 更新系统

    yum -y update
  • 相关阅读:
    P2154 [SDOI2009]虔诚的墓主人 树状数组
    P2564 [SCOI2009]生日礼物 贪心
    P2053 [SCOI2007]修车 费用流
    P1963 [NOI2009]变换序列 倒叙跑匈牙利算法
    P3705 [SDOI2017]新生舞会 分数规划 费用流
    gym/102091
    P2698 [USACO12MAR]花盆Flowerpot 单调队列
    乌龟棋
    旅行家的预算
    组合数问题
  • 原文地址:https://www.cnblogs.com/lightnear/p/8268020.html
Copyright © 2011-2022 走看看