一, /boot分区备份
二,网络配置
修改主机名:
- #vi /etc/sysconfig/network
- NETWORKING=yes
- #HOSTNAME=localhost.localdomain
- HOSTNAME=CentOS-1
- #也可以在这里设置网关
- #GATEWAY=192。168.30.1
设置网络为DHCP获取
- vi /etc/sysconfig/network-scrip/ifcfg-eth0
- DEVICE="eth0"
- BOOTPROTO="dhcp"
- HWADDR="08:00:27:A7:AB:97"
- NM_CONTROLLED="no"
- ONBOOT="no"
- TYPE="Ethernet"
- UUID="9622f9e1-6218-4c56-9f45-7ae29b477e89"
设置静态IP
- vi /etc/sysconfig/network-scrip/ifcfg-eth0
- [root@CentOS-3 ssh]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
- DEVICE=eth0
- BOOTPROTO=none
- HWADDR=08:00:27:e2:62:9b
- NM_CONTROLLED=no
- ONBOOT=yes
- TYPE=Ethernet
- IPADDR=192.168.30.223
- NETMASK=255.255.255.0
- GATEWAY=192.168.30.1
- DNS=8.8.8.8
- USERCTL=no
- IPV6INIT=no
三,安装wget、setup工具
- yum install wget
- yum install setuptool
- yum install system-config-network-tui #网络配置工具
- yum install ntsysv system-config-firewall-tui #按自己需要安装
四,源配置
- cd /etc/yum.repos.d
- mv CentOS-Base.repo bak-CentOS-Base.repo
- wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
- yum clean all
- yum makecache
五,ssh密钥配置
- http://fengzhige.blog.51cto.com/3691377/999693
六,sudo配置
七,编译环境和工具的安装
- yum groupinstall "Development Libraries" "Development Tools" #CentOS 5.8
- yum groupinstall "Compatibility libraries" "Development Tools" #CentOS 6.3
八,安装配置sudo
- # yum install sudo
- #visudo
- 找到这句"root ALL=(ALL) ALL"
- 用户名 哪里 命令
- 如:
- fengzhige ALL(ALL) ALL