标签:centos7基本配置
一、修改网卡名:TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=eth0
DEVICE=eth0
ONBOOT=yes
IPADDR=192.168.8.81
NETMASK=255.255.255.0
GATEWAY=192.168.8.1
DNS1=8.8.8.8
DNS2=114.114.114.114
mv /etc/sysconfig/network-scripts/ifcfg-ens33 /etc/sysconfig/network-scripts/ifcfg-eth0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed ‘s, release .*$,,g‘ /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet net.ifnames=0 biosdevname=0"
GRUB_DISABLE_RECOVERY="true"
grub2-mkconfig -o /boot/grub2/grub.cfg
reboot
ip addr
TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=eth1
DEVICE=eth1
ONBOOT=yes
IPADDR=192.168.8.201
NETMASK=255.255.255.0
GATEWAY=192.168.8.1
DNS1=8.8.8.8
DNS2=114.114.114.114
systemctl restart network
ip addr
date -s "2017-12-18 09:40:00"
hwclock -w
lee
hostname lee
hostname
export LANG="zh_CN.UTF-8"
或
export LANG="en_US.UTF-8"
LANG="zh_CN.UTF-8"
alias ll=‘ls -lah --color‘
unalias ll
标签:centos7基本配置
原文地址:http://blog.51cto.com/12173069/2121013