前往顾页
以后地位: 主页 > 精通Office > Ubuntu教程 >

CentOS 6 装置后根基建设根本教程

时候:2012-07-09 16:16来源:知行网www.zhixing123.cn 编辑:麦田守望者

1.收集建设
(1)号令建设
# ifconfig eth0 192.168.0.2 netmask 255.255.255.0   //ip地点、子网掩码
# route add default gw 192.168.0.1 dev eth0  //网关
# hostname centos   //计较机名
(2)文件建设
<1>点窜IP地点
点窜对应网卡的IP地点的建设文件
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 (描述网卡对应的装备别号,比方ifcfg-eth0的文件中它为eth0)
BOOTPROTO=static (设置网卡获得ip地点的体例,可能的选项为static,dhcp或bootp,别离对应静态指定的ip地点,经由过程dhcp和谈获得的ip地点,经由过程bootp和谈获得的ip地点)
BROADCAST=192.168.0.255 (对应的子网播送地点)
HWADDR=00:07:E9:05:E8:B4  (对应的网卡物理地点)
IPADDR=12.168.1.2 (如果设置网卡获得ip地点的体例为静态指定,此字段就指定了网卡对应的ip地点)
IPV6INIT=no  (开启或封闭IPv6;封闭no,开启yes)
IPV6_AUTOCONF=no  (开启或封闭IPv6主动建设;封闭no,开启yes)
NETMASK=255.255.255.0 (网卡对应的收集掩码)
NETWORK=192.168.1.0 (网卡对应的收集地点)
ONBOOT=yes (体系启动时是不是设置此收集接口,设置为yes时,体系启动时激活此装备)

<2>点窜网关
点窜对应网卡的网关的建设文件
# vi /etc/sysconfig/network
NETWORKING=yes (表示体系是不是利用收集,一般设置为yes。如果设为no,则不克不及利用收集,并且很多体系办事法度将无法启动)
HOSTNAME=centos (设置本机的主机名,这里设置的主机名要和/etc/hosts中设置的主机名对应)
GATEWAY=192.168.1.1 (设置本机连接的网关的IP地点。比方,网关为10.0.0.2)

<3>点窜DNS
点窜对应网卡的DNS的建设文件
# vi /etc/resolv.conf
nameserver 202.101.224.68 (域名办事器)
nameserver 202.101.224.69 (域名办事器)

<4>从头启动收集建设
# service network restart

# /etc/init.d/network restart

2.软件源建设
海内速率较快的常常利用更新源以下:
http://mirrors.163.com/centos/ 163-网易
http://mirrors.ta139.com/centos/ 中国挪动通信(山东挪动)
http://centos.ustc.edu.cn/centos/ 中国迷信技术年夜学
http://mirror.neu.edu.cn/centos/ 西南年夜学
编辑yum建设文件:
#vi /etc/yum.repos.d/CentOS-Base.repo
[base]
name=CentOS-$releasever – Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/

http://mirrors.ta139.com/centos/$releasever/os/$basearch/

http://centos.ustc.edu.cn/centos/$releasever/os/$basearch/

http://mirror.neu.edu.cn/centos/$releasever/os/$basearch/

gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-$releasever – Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
baseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/

http://mirrors.ta139.com/centos/$releasever/updates/$basearch/

http://centos.ustc.edu.cn/centos/$releasever/updates/$basearch/

http://mirror.neu.edu.cn/centos/$releasever/updates/$basearch/

gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-$releasever – Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
baseurl=http://mirrors.163.com/centos/$releasever/extras/$basearch/

http://mirrors.ta139.com/centos/$releasever/extras/$basearch/

http://centos.ustc.edu.cn/centos/$releasever/extras/$basearch/

http://mirror.neu.edu.cn/centos/$releasever/extras/$basearch/

gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever – Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
baseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/

http://mirrors.ta139.com/centos/$releasever/centosplus/$basearch/

http://centos.ustc.edu.cn/centos/$releasever/centosplus/$basearch/

http://mirror.neu.edu.cn/centos/$releasever/centosplus/$basearch/

gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#contrib – packages by Centos Users
[contrib]
name=CentOS-$releasever – Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
baseurl=http://mirrors.163.com/centos/$releasever/contrib/$basearch/

http://mirrors.ta139.com/centos/$releasever/contrib/$basearch/

http://centos.ustc.edu.cn/centos/$releasever/contrib/$basearch/

http://mirror.neu.edu.cn/centos/$releasever/contrib/$basearch/

gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
然后利用以下号令更新到最新体系:
#rpm –import /etc/pki/rpm-gpg-key*
#yum upgrade
3.装置说话包
从装置盘进行装置,找到对应rpm包:
fonts-chinese-3.02-9.6.el5.noarch.rpm
fonts-ISO8859-2-75dpi-1.0-17.1.noarch.rpm
可以经由过程yum进行装置,装置体例为:
#yum groupinstall -support
在下面的号令中, 是以下之一: assamese, bengali, chinese, gujarati, hindi, japanese, kannada, korean, malayalam, marathi, oriya, punjabi, sinhala, tamil, thai, 或 telegu。
4.解紧缩软件
#yum install unrar unzip p7zip-full

顶一下
(1)
100%
踩一下
(0)
0%
------分开线----------------------------
标签(Tag):Linux Ubuntu 操纵体系 Unix Android fedora debian
------分开线----------------------------
颁发评论
请自发遵循互联网相关的政策法规,严禁公布色情、暴力、革命的谈吐。
评价:
神色:
考证码:点击我更换图片
猜你感兴趣