zoukankan      html  css  js  c++  java
  • 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
    
  • 相关阅读:
    无废话设计模式(7)结构型模式--装饰模式
    无废话设计模式(6) 结构型模式--适配器模式
    无废话设计模式(5)结构型模式--桥接模式
    无废话设计模式(4)原型模式
    Java进阶--Map集合
    Java进阶--List接口
    Java进阶--集合泛型综合应用案例(斗地主)
    Java进阶--泛型
    Java进阶--Iterator迭代器
    Java进阶--Collection集合
  • 原文地址:https://www.cnblogs.com/liujitao79/p/4904696.html
Copyright © 2011-2022 走看看