Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1017525
  • 博文数量: 171
  • 博客积分: 55
  • 博客等级: 民兵
  • 技术积分: 2077
  • 用 户 组: 普通用户
  • 注册时间: 2012-01-04 10:11
个人简介

pugna

文章分类

全部博文(171)

文章存档

2021年(4)

2020年(1)

2019年(4)

2018年(5)

2017年(7)

2016年(9)

2015年(36)

2014年(8)

2013年(96)

2012年(1)

分类: LINUX

2013-02-17 23:10:35

CentOS6_mini_x64安装后基本配置



1.关闭SELinux
#vim /etc/selinux/config
***********************************************************
SELINUX=disabled
SELINUXTYPE=targeted
***********************************************************

#setenforce 0



2.配置网络
#id
#ifconfig
#vi /etc/sysconfig/network-scripts/ifcfg-eth0
***********************************************************
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
HWADDR=00:0B:2F:6C:D3:8F
IPADDR=192.1.1.8
GATEWAY=192.1.1.1

NETMASK=255.255.255.0
NETWORK=192.168.1.0
***********************************************************

#vi /etc/hosts
***********************************************************
192.1.1.8 test.centos
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
***********************************************************

#vi /etc/resolv.conf
***********************************************************
nameserver 192.1.1.1
nameserver 8.8.8.8
***********************************************************

#service network restart
#ifconfig
#ping 127.0.0.1
#ping localhost
#ping



3.更换更新源
#yum -y install wget
#cd /root
#pwd
#wget
#mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
#mv /root/CentOS6-Base-163.repo /etc/yum.repos.d/CentOS-Base.repo
#yum makecache



4.安装常用软件
#yum -y install openssh-server
#yum -y install sudo
#yum -y install vim
#yum -y install unzip



5.创建管理用户
#useradd -m -U test
#usermod -a -G root test
#passwd test
#id test

#visudo -f /etc/sudoers



6.服务启动配置
#chkconfig --level 2345 sshd on
#service sshd status

#chkconfig --level 2345 iptables on
#service iptables status

                                                                                 2013-02-17 23:10
阅读(1250) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~