CentOS mini版安装后基本设置

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

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

01# cat /etc/redhat-release
02CentOS Linux release 7.1.1503 (Core)
03 
04# uname -a
05Linux 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
06 
07 
08/etc/sysconfig/network-scripts/ifcfg-enp5s0  #开机启动网卡
09ONBOOT=yes
10 
11systemctl restart network.service      #重启网络服务
12#或
13/etc/rc.d/init.d/network restart
14 
15 
16 
17 
18yum -y install wget    #安装wget
19 
20#更换阿里云yum源
21mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
22 
23wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
24 
25#第三方源
26yum install http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
27#或
28yum install http://mirrors.ustc.edu.cn/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
29 
30#生成缓存
31yum makecache
32 
33#安装常用软件、工具
34yum -y install vim htop
35 
36#add command ifconfig
37yum -y net-tools
38 
39#add command nslookup、dig
40yum -y install bind-utils
41 
42#设置vim 别名
43vi .bashrc 
44alias vi='vim'

 

 

发表回复