• centos7 初体验


    centos7 https://linux.cn/tag-RHCSA|RHCSA.html

    #/etc/sysconfig/network
    NETWORKING=yes
    GATEWAY=192.168.48.1
    
    #/etc/sysconfig/network-scripts/ifcfg-em1
    DEVICE=em1
    NM_CONTROLLED=no
    ONBOOT=yes
    BOOTPROTO=static
    IPADDR=192.168.48.116
    NETMASK=255.255.255.0
    
    systemctl list-units |grep running
    systemctl list-unit-files 
    
    systemctl stop NetworkManager.service
    systemctl disable NetworkManager.service
    
    systemctl restart network.service
    systemctl enable network.service
    
    systemctl stop postfix.service
    systemctl disable postfix.service
    
    systemctl stop firewalld.service
    systemctl disable firewalld.service
    
    yum install iptables-services
    systemctl start iptables.service
    systemctl enable iptables.service
    
    #/etc/selinux/config
    SELINUX=enforcing -> SELINUX=disabled
    

    setenforce 0

    # sestatus 
    SELinux status:                 enabled
    SELinuxfs mount:                /sys/fs/selinux
    SELinux root directory:         /etc/selinux
    Loaded policy name:             targeted
    Current mode:                   #enforcing -> permissive
    Mode from config file:          disabled
    Policy MLS status:              enabled
    Policy deny_unknown status:     allowed
    Max kernel policy version:      28
    
    #/etc/yum.repos.d/centos.repo
    [base]
    name=CentOS-$releasever - Base
    baseurl=http://mirrors.sohu.com/centos/$releasever/os/$basearch/
    gpgcheck=0
    enabled=1
    
    [updates]
    name=CentOS-$releasever - Updates
    baseurl=http://mirrors.sohu.com/centos/$releasever/updates/$basearch/
    gpgcheck=0
    enabled=1
    
    [extras]
    name=CentOS-$releasever - Extras
    baseurl=http://mirrors.sohu.com/centos/$releasever/extras/$basearch/
    gpgcheck=0
    enabled=1
    
    [centosplus]
    name=CentOS-$releasever - Plus
    baseurl=http://mirrors.sohu.com/centos/$releasever/centosplus/$basearch/
    gpgcheck=0
    enabled=0
    
    #/etc/yum.repos.d/epel.repo
    [epel]
    name=Extra Packages for Enterprise Linux $releasever - $basearch
    baseurl=http://download.fedoraproject.org/pub/epel/$releasever/$basearch
    gpgcheck=0
    enabled=1
    
    [epel-debuginfo]
    name=Extra Packages for Enterprise Linux $releasever - $basearch - Debug
    baseurl=http://download.fedoraproject.org/pub/epel/$releasever/$basearch/debug
    gpgcheck=0
    enabled=0
    
    [epel-source]
    name=Extra Packages for Enterprise Linux $releasever - $basearch - Source
    baseurl=http://download.fedoraproject.org/pub/epel/$releasever/SRPMS
    gpgcheck=0
    enabled=0
    
    localectl list-locales |grep ^en
    
    # /etc/locale.conf
    LANG="en_US.UTF-8"
    
    localectl set-locale LANG=en_US.UTF-8
    localectl status   
    
    tzselect
    
    /etc/profile
    TZ='Asia/Shanghai'; export TZ
    
    hostnamectl set-hostname 'bjyh-48-116'
    hostnamectl status
    
  • 相关阅读:
    递归练习:走台阶
    递归练习:计算最大公约数和最小公倍数
    递归练习:逆序输出一个十进制数的各位数字
    m4, autoconf
    Makefile 和 CMakeLists.txt
    Java中的String pool
    小米路由Mini刷Breed, 潘多拉和LEDE
    Centos 编译LEDE/OpenWrt
    Centos6下编译安装gcc6.4.0
    IntelliJ IDEA遇到Unable to parse template “Class”错误
  • 原文地址:https://www.cnblogs.com/liujitao79/p/4904696.html
Copyright © 2020-2023  润新知