CentOS初始化
初始化网络(个人测试使用)
对于新装的CentOS--*-minimal.iso是无法正常访问网络的需要自己手动进行配置
vi /etc/sysconfig/network-scripts/ifcfg-eth0
删除 HWADDR
删除 UUID
删除 NM_CONTROLLED
onboot 修改为yes
service network restart 重启网卡获取ip
然后会获取新的ip 当你想固定ip的时候也需要更改此文件
需要修改
bootproto=static
ipaddr=192.168.0.111
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
service network restart 重启网卡
配置host
192.168.0.111 hostname
关闭防火墙 (真实环境中需开启)
service iptables stop
service ip6tables stop
chkconfig iptables off
chkconfig ip6tables off
vi /etc/selinux/config
SELINUX=disabled
安装zsh net-tools git wget net-tools
yum install zsh git wget net-tools vim -y && wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O - | sh && git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions && echo 'source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh' >> .zshrc