码迷,mamicode.com
首页 > 其他好文 > 详细

centos系统使用技巧

时间:2016-04-22 18:40:35      阅读:140      评论:0      收藏:0      [点我收藏+]

标签:

===============================网络配置===============================
1 eth0 接口配置:/etc/sysconfig/network-scipts/ifcfg-eth0
DEVICE=eth0
HWADDR=C8:60:00:69:CE:04
TYPE=Ethernet
UUID=ff105f76-baaa-4a8d-95c2-efe85fd9ab23
#接口随网络启动而自启动
ONBOOT=yes
NM_CONTROLLED=yes
#静态ip
BOOTPROTO=static
IPADDR=192.168.20.51
NETMASK=255.255.255.0
GATEWAY=192.168.20.254
#若无法解析域名,请配置DNS值
DNS1=202.96.128.86
DNS2=202.96.128.166
#PEERDNS=yes
2 DNS服务器配置: /etc/resolv.conf
nameserver 202.96.128.86
nameserver 202.96.128.166

 

================================vbox安装====================================
1 vim /etc/yum.repo.d/virtualbox.repo  添加如下行:
[virtualbox]
name=Oracle Linux / RHEL / CentOS-$releasever / $basearch - VirtualBox
baseurl=http://download.virtualbox.org/virtualbox/rpm/el/$releasever/$basearch
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://www.virtualbox.org/download/oracle_vbox.asc
2 yum install VirtualBox-5.0
3 yum install -y gcc kernel kernel-devel kernel-headers   // 查找kernel安装位置
4 重启电脑 // 或:KERN_DIR=/usr/src/kernels/2.6.32-573.22.1.el6.x86_64 /etc/init.d/vbox  // KERN_DIR填实际安装的位置

 

==================安装增强工具===================
1 sudo yum install kernel-devel gcc gcc-c++ make
2 sudo yum groupinstall “Deveplement Tools”
3 reboot
4 cd /media/VBOXADDITIONS_4.3.6_91406
5 export MAKE=‘/usr/bin/gmake -i‘
6 ./VBoxLinuxAdditions.run

====================更新yum包源======================
1 wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
2 cd /etc/yum.repos.d/
3 mv CentOS-Base.repo CentOS-Base.repo.bak
4 mv CentOS6-Base-163.repo CentOS-Base.repo
5 yum clean all
6 yum makecache
7 yum update

centos系统使用技巧

标签:

原文地址:http://www.cnblogs.com/--xiaoyao--/p/5422139.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!