vi /etc/sysconfig/network-scripts/ifcfg-eth0 #编辑配置文件,添加修改以下内容 
      BOOTPROTO=static #启用静态IP地址 
      ONBOOT=yes #开启自动启用网络连接 
      IPADDR=192.168.21.129 #设置IP地址 
      NETMASK=255.255.255.0 #设置子网掩码 
      GATEWAY=192.168.21.2 #设置网关 
      DNS1=8.8.8.8 #设置主DNS 
      DNS2=8.8.4.4 #设置备DNS 
      IPV6INIT=no #禁止IPV6 
      :wq! #保存退出 
      ---------------------------------- 
        service sshd restart #重启 
        netstat -lnp|grep 88 #88请换为你的apache需要的端口,如:80 
        ps 1777 
        kill -9 1777        #杀掉编号为1777的进程(请根据实际情况输入) 
        service httpd start #启动apache 
        ---------------------------------- 
        service ip6tables stop #停止IPV6服务 
        chkconfig ip6tables off #禁止IPV6开机启动 
        service yum-updatesd stop #关闭系统自动更新 
        chkconfig yum-updatesd off #禁止开启启动 
        service network restart #重启网络连接 
        ifconfig #查看IP地址 
       
      8.netstat 
        1) netstat -lnp 查看系统开启了哪些端口 
        2)netstat -an 查看哪些ip连接到系统上. 
      top 动态 shift+m 内存优先 按1显示cpu top -bn1 静态 
        free (后面可以跟 -k -m -g) 实际剩余内存是看第二行的free列的大小。 
        service iptables stop 把iptables关闭 
        iptables-save > 1.ipt 备份 
        iptalbes-restore < 1.ipt 恢复 
      1) chkconfig --list 查看系统服务 
        2) chkconfig -crond off 关闭开机启动 
        3)chkconfig --level 345 crond off 
        4) chkconfig --add crond 把crond加入到系统服务中 
        5)chkconfig --del crond 把crond从系统服务中删除 
        . 
        last命令用来查看登录Linux历史信息,从左至右依次为账户名称、登录终端、登录客户端ip、登录 日期及时长; 
        last head  |