CentOS mini版安装后基本设置

使用CentOS mini版,安装后一般做一些基本设置才能更好的使用。

版本:
http://mirrors.aliyun.com/centos/7.1.1503/isos/x86_64/CentOS-7-x86_64-Minimal-1503-01.iso

# cat /etc/redhat-release 
CentOS Linux release 7.1.1503 (Core) 

# uname -a
Linux localhost.localdomain 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux


/etc/sysconfig/network-scripts/ifcfg-enp5s0  #开机启动网卡
ONBOOT=yes

systemctl restart network.service      #重启网络服务
#或
/etc/rc.d/init.d/network restart




yum -y install wget    #安装wget

#更换阿里云yum源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

#第三方源
yum install http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
#或
yum install http://mirrors.ustc.edu.cn/epel/7/x86_64/e/epel-release-7-5.noarch.rpm

#生成缓存
yum makecache

#安装常用软件、工具
yum -y install vim htop

#add command ifconfig
yum -y net-tools 

#add command nslookup、dig
yum -y install bind-utils

#设置vim 别名
vi .bashrc  
alias vi='vim'

 

 

发表回复