大纲
安装
启动网卡
修改主机名
配置 163 yum 源
关闭 SElinux
关闭防火墙
安装常用工具,开发包
1 安装
全新最小化安装64位Centos6.4
1.1 分区 (20G 硬盘 ,1G 内存)
/boot ------ 500M
/ ------ 10G
/data ------- 剩余所有
swap ------ 2G
1.2 文件系统
系统默认 Ext4
2 启动网卡
2.1 Centos6.4 的网卡默认没有启动
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 #网卡接口名称 HWADDR=00:0C:29:31:70:CA #硬件地址(MAC地址) TYPE=Ethernet #网上类型 UUID=cc631091-18a2-4bde-b4f2-8ccac63a1788 #网卡唯一标识符 ONBOOT=no #开机是否启动 NM_CONTROLLED=yes #设备eth0是否可以由Network Manager图形管理工具托管 BOOTPROTO=dhcp #IP地址的获取方式
修改如下
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 #网卡接口名称 HWADDR=00:0C:29:87:9D:1D #硬件地址(MAC地址) TYPE=Ethernet #网上类型 UUID=3efbea06-751a-4add-bec7-13db4d19bc0d #网卡唯一标识符 ONBOOT=yes #开机是否启动 NM_CONTROLLED=no #设备eth0是否可以由Network Manager图形管理工具托管 BOOTPROTO=dhcp #IP地址的获取方式
NM_CONTROLLED=no 改为no 设备 etho 任由 network 服务 托管
[root@web ~]# service network restart Shutting down eth0: [ OK ] Shutting down loopback : [ OK ] Bringing up eth0:Determining IP information eth0... done. [ OK ]
修改后查看效果
网卡启动完成
3 修改主机名
vi /etc/sysconfig/networkNETWORKING=yesHOSTNAME=www.gaowen.com
vi /etc/hosts127.0.0.1 www www.gaowen.com localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
4 配置163的yum 源
4.1当前系统yum源
ls -l /etc/yum.repos.d/total 16-rw-r--r--. 1 root root 1926 Feb 25 2013 CentOS-Base.repo-rw-r--r--. 1 root root 638 Feb 25 2013 CentOS-Debuginfo.repo-rw-r--r--. 1 root root 630 Feb 25 2013 CentOS-Media.repo-rw-r--r--. 1 root root 3664 Feb 25 2013 CentOS-Vault.repo
4.2 安装 wget
yum install wget4.3 下载repo文件
[root@www ~]# wget http:lsanaconda-ks.cfg install.log install.log.syslog CentOS6-Base-163.repo [root@www ~]# cd /etc/yum.repos.d/[root@www ~]#mv Centos-Base.repo Centos-Base.repo.bak[root@www yum.repos.d]# mv /root/CentOS6-Base-163.repo CentOS-Base.repo[root@www yum.repos.d]# yum clean all[root@www yum.repos.d]# yum makecache
5 关闭SELinux
临时关闭
[root@www yum.repos.d]# cd[root@www ~]# getenforceEnforcing[root@www ~]# setenforce 0[root@www ~]# getenforcePermissive
完全关闭
vi /etc/sysconfig/selinux # This file controls the state of SELinux on the system.# SELINUX= can take one of these three values:# enforcing - SELinux security policy enforced.# permissive - SELinux prints warnings instead of enforcing.# disabled - No SELinux policy loaded.SELINUX=disabled# SELINUXTYPE= can take one of these two values:# targeted - Targeted processes are ,# mls - Multi Level Security protection.SELINUXTYPE=targeted
6关闭防火墙
root@www ~]# vi /etc/sysconfig/selinux [root@www ~]# service iptables stopiptables: Flushing firewall rules: [ OK ]iptables: Setting chains to policy ACCEPT: filter [ OK ]iptables: Unloading modules: [ OK ][root@www ~]# chkconfig iptables off[root@www ~]# chkconfig iptables --listiptables 0:off 1:off 2:off 3:off 4:off 5:off 6:off
7安装开发包 常用工具
[root@www ~]#yum install vim[root@www ~]#yum install man[root@www ~]#yum groupinstall "development tools" "server platform develpment "desktop platform development"[root@www ~]#yum install ntp