gembin

OSGi, Eclipse Equinox, ECF, Virgo, Gemini, Apache Felix, Karaf, Aires, Camel, Eclipse RCP

HBase, Hadoop, ZooKeeper, Cassandra

Flex4, AS3, Swiz framework, GraniteDS, BlazeDS etc.

There is nothing that software can't fix. Unfortunately, there is also nothing that software can't completely fuck up. That gap is called talent.

About Me

 

CentOS 6 安装后基本配置

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 <language>-support

在 上面的命令中,<language> 是下列之一: assamese, bengali, chinese, gujarati, hindi, japanese, kannada, korean, malayalam, marathi, oriya, punjabi, sinhala, tamil, thai, 或 telegu。

4.解压缩软件 
#yum install unrar unzip p7zip-full

posted on 2012-12-23 22:57 gembin 阅读(753) 评论(0)  编辑  收藏 所属分类: CentOS


只有注册用户登录后才能发表评论。


网站导航:
 

导航

统计

常用链接

留言簿(6)

随笔分类(440)

随笔档案(378)

文章档案(6)

新闻档案(1)

相册

收藏夹(9)

Adobe

Android

AS3

Blog-Links

Build

Design Pattern

Eclipse

Favorite Links

Flickr

Game Dev

HBase

Identity Management

IT resources

JEE

Language

OpenID

OSGi

SOA

Version Control

最新随笔

搜索

积分与排名

最新评论

阅读排行榜

评论排行榜

free counters