zoukankan      html  css  js  c++  java
  • Linux questions

    1.can not use ifconfig

    http://blog.csdn.net/zjt289198457/article/details/6918644

       add this : export PATH=$PATH:/sbinc

       at the end of file /etc/profile

       and then execute : source /etc/profile to make the change effect

    2.change to static ip
    http://wkm.iteye.com/blog/1308528
    2.1 change hostname to hadoop

    NETWORKING=yes
    NETWORKING_IPV6=no
    HOSTNAME=hadoop

    2.2  Change ip address and Gateway 

    path:/etc/sysconfig/network-scripts/ifcfg-eth0

    old file:

    # Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)

    DEVICE=eth0
    BOOTPROTO=none
    HWADDR=00:0c:29:d3:48:0e
    ONBOOT=yes
    NETMASK=255.255.0.0
    IPADDR=172.27.35.222
    GATEWAY=172.27.35.1
    TYPE=Ethernet

    new file

    # Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)
    DEVICE=eth0
    BOOTPROTO=none
    HWADDR=00:0c:29:d3:48:0e
    ONBOOT=yes
    NETMASK=255.255.0.0
    IPADDR=192.168.1.10
    GATEWAY=192.168.1.100
    TYPE=Ethernet

    restart server :

     ifdown ech0

     ifup ech0  [same function : service network restart]

    4.change hostname

    hostname show host name

    hostname hadoop --change one time

    permenet change :

    change file /etc/sysconfig/network

    [root@localhost sysconfig]# cat network
    NETWORKING=yes
    NETWORKING_IPV6=no
    HOSTNAME=hadoop

    5.ip bind with hostname

    vi /etc/hosts

    add a line :192.168.1.10  hadoop

    6.close firewall

    6.1.server iptable status

      [root@hadoop etc]# service iptables status Table: filter Chain INPUT (policy ACCEPT) num  target     prot opt source               destination         1    RH-              Firewall-1-INPUT  all  --  0.0.0.0/0            0.0.0.0/0          

      Chain FORWARD (policy ACCEPT) num  target     prot opt source               destination         1    RH-Firewall-1-INPUT  all  --  0.0.0.0/0              

          0.0.0.0/0          

         Chain OUTPUT (policy ACCEPT) num  target     prot opt source               destination        

    6.2 service iptables start/stop

         iptables {start|stop|restart|condrestart|status|panic|save}

    7.check firewall server is run or not

       7.1  grep iptables server's status

        [root@hadoop etc]# chkconfig --list |grep iptables
          iptables        0:off   1:off   2:on    3:on    4:on    5:on    6:off

    7.2 close all firewall's service  and check status

    [root@hadoop etc]# chkconfig iptables off
    [root@hadoop etc]# chkconfig --list |grep iptables
    iptables        0:off   1:off   2:off   3:off   4:off   5:off   6:off
    [root@hadoop etc]#


     

  • 相关阅读:
    bootmgr is conmpressed联想Z485
    数据库中用开窗函数和复制表结构
    左连接新认识
    sql中的日期查询
    一个数据表通过另一个表更新数据(在UPDAT语句中使用FROM子句)
    StarUML安装与Win7不兼容解决
    SQL中VARCHAR与NVARCHAR存储区别
    Cannot start service SPUserCodeV4 on computer
    SQL中空值与NULL区别
    验证码破解分析
  • 原文地址:https://www.cnblogs.com/fjsnail/p/4324904.html
Copyright © 2011-2022 走看看