2015年4月28日 星期二

CentOS 6.5 安裝

[ CentOS 6.5 安裝 ]


1.光碟片安裝
  •  2顆80GB硬碟,先做硬體Raid 1
  •  自定磁碟分割
              / boot     500MB
              /             10GB
              / home   50GB
              / swap    8GB      (自動變成延伸磁碟) 
  •  安裝時選 Basic Server
2.完成進入Centos
  •  /etc/sysconfig/network-scripts/ifcfg-eth0 設定網卡
         ONBOOT="yes"
         NM_controlled="no"
         BOOTPROTO=none
         IPADDR=172.18.x.x
         NETMASK=255.255.255.0
         GATEWAY=172.18.x.254  
  • /etc/sysconfig/resolv.conf   設定DNS
         nameserver  校內dns
         nameserver 168.95.1.1

      # /etc/init.d/network  restart
      # ping www.google.com
      # dig www.google.com    測試DNS是否順利運作了

3.  adduser  yuan
     passwd yuan

  • /etc/ssh/sshd_config    修正ssh安全
        PermitRootLogin no
        UseDNS no
        allowusers yuan

     # /etc/init.d/sshd restart   
     # netstat -tlnp | grep ssh     查看ssh是否啟用22 port了