准备空机器
镜像
CentOS-6.5-x86_64-minimal.iso
- 官网仔细找能找到这个镜像地址
网络
DEVICE=eth0
#HWADDR=00:0C:29:13:29:63
TYPE=Ethernet
#UUID=60f4b40a-c9bf-4e06-a024-849c086502fa
ONBOOT=yes
NM_CONTROLLED=yes
# static
BOOTPROTO=static
# IP
IPADDR=192.168.48.21
# 网关
GATEWAY=192.168.48.2
# 阿里云DNS
DNS1=223.5.5.5
# 如果是克隆来的机器
rm -rf /etc/udev/rules.d/70-persistent-net.rules
防火墙
# 停止
service iptables stop
# 开机禁止启动
chkconfig iptables off
hostname
vim /etc/sysconfig/network
修改源
cd /etc/yum.repos.d/
# 替换yum源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
yum makecache
安装man
# 神器
yum install -y man man-pages
关闭selinux
- vim /etc/selinux/config
ntp
- yum install -y ntp
系统调用调用
man 命令用起来
socket
- socket() creates an endpoint for communication and returns a descriptor.返回了一个文件描述符。
select
- select() and pselect() allow a program to monitor multiple file descriptors, waiting until one or more of the file descriptors become "ready" for some class of I/O operation (e.g., input possible). A file descriptor is considered ready if it is possible to perform the corresponding I/O oper- ation (e.g., read(2)) without blocking.