Installing CentOS 6.4 on a virtual machine is a breeze compared to the first installation of Google with various problems. In line with the principle of automating one task more than two times, write the initial settings as a script to run.
First, configure the network. Here I use a static IP address. The sed and-I parameters in the script can write changes to the file.
#! /Bin/bash
# Static
Cd/etc/sysconfig/network-scripts
Sed-I's/ONBOOT = no/ONBOOT = yes/G' ifcfg-eth0
Sed-I's/dhcp/static/G' ifcfg-eth0
Echo IPADDR = 10.14.112. ***> ifcfg-eth0
Echo NETMASK = 255.255.255.0> ifcfg-eth0
Echo GATEWAY = 10.14.112.1> ifcfg-eth0
Echo DNS1 = 10.10.0. **> ifcfg-eth0
Service network restart
Configure the yum source to use the on-campus source.
#! /Bin/bash
#
SHELL_HOME = 'CD $ RELATIVE_PATH; pwd'
Cd/etc/yum. repos. d/
Mv CentOS-Base.repo CentOS-Base.repo.backup
Cp $ {SHELL_HOME}/CentOS-Base-zju.repo CentOS-Base.repo
Sed-I's/enabled = 1/enabled = 0/G'/etc/yum/pluginconf. d/fastestmirror. conf
Yum makecache
Yum update-y
After running these two scripts, you can use them. Of course, install vim and other common software.
The following are common software installed by Google:
Install the nslookup, traceroute, wget, man, sudo, ntp, and ntpdate components, and install screen, patch, make gcc, gcc-c ++, flex, and bison.
Yum install-y bind-utils traceroute wget man sudo ntp ntpdate screen patch make gcc-c ++ flex bison zip unzip ftp -- skip-broken
If you can connect to the Internet, you can also add Repoforge support.
Iptables is not set yet, so you can continue to improve the script after you understand it.
Basic operations after CentOS 6.4x64 minimal installation