CentOS安装配置之配置
本文仅以最小化安装为基础,不安装任何组件。
首先配置网络
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 |
设置DNS
vi /etc/resolv.conf
nameserver 202.101.172.47 |
关闭IP6
查看IPV6模块lsmod|grep ipv6
#vi /etc/modprobe.conf
alias net-pf-10 off
alias ipv6 off
service ip6tables off
修改计算机名字
1:vi /etc/sysconfig/network
2:vi /etc/hosts
升级软件包
yum update –y
安装必需的软件
yum install wget setuptool ntsysv -y |
设置第三方YUM源
wget ftp://ftp.pbone.net/mirror/download.fedora.redhat.com/pub/fedora/epel/5/x86_64/epel-release-5-3.noarch.rpm rpm -ivh epel-release-5-3.noarch.rpm |
SSH配置
vi /etc/ssh/sshd.config
#PermitRootLogin yes 改为
PermitRootLogin yes
#UseDNS yes 改为
UseDNS no
关闭selinux
运行命令setup,可以在图形化界面进行关闭
或vi /etc/sysconfig/selinux
SELINUX=enforcing 改成--> SELINUX=disabled