English |
  • 美国VPS主机推荐
  • |
  • 代购服务
  • |
  • 10美元以下VPS
  • |
  • VPS新手指南/教程
  • |
  • 留言板
  • |
  • 关于
  • | 登录 |

    Linode VPS 添加多IP/设置静态IP(Kloxo no_ip_address解决方法)

    2010年01月31日 下午 | 作者:VPS侦探

    Linode VPS默认情况下是通过DHCP自动获取IP的,所以在安装Kloxo完成设置Kloxo的时候会出现no_ip_address的提示,这个时候就需要手动设置上IP,这样才能添加域名。

    如果你设置Kloxo的时候出现no_ip_address的提示你可以按照下面步骤修改:

    使用编辑器编辑(如果不会用编辑器,可以使用winscp):/etc/sysconfig/network-scripts/ifcfg-eth0

    # Configuration for eth0
    DEVICE=eth0
    BOOTPROTO=none

    # This line ensures that the interface will be brought up during boot.
    ONBOOT=yes

    # eth0 - This is the main IP address.
    # The address, netmask and gateway are all necessary.
    IPADDR=12.34.56.78   #你的IP地址
    NETMASK=255.255.255.0  #子网掩码
    GATEWAY=12.34.56.1 #网关

    一般这样设置好,再执行命令:service network restart 重启网络就好了,如果还是不通,重启试一下。

    添加第2个IP,可以创建 /etc/sysconfig/network-scripts/ifcfg-eth0:0
    # Configuration for eth0:0
    DEVICE=eth0:0
    BOOTPROTO=none

    # This line ensures that the interface will be brought up during boot.
    ONBOOT=yes

    # eth0:0
    IPADDR=34.56.78.90
    NETMASK=255.255.255.0
    GATEWAY=12.34.56.1

    添加第3个IP,创建 /etc/sysconfig/network-scripts/ifcfg-eth0:1 按上面的内容添加到这个文件中,以此类推。

    以上办法都是在CentOS或者Fedora下添加IP的方法,如果是在Debian/Ubuntu下添加IP的方法(注,当然Kloxo没有Debian下的版本):

    修改 /etc/network/interfaces

    # The loopback interface
    auto lo
    iface lo inet loopback

    # Configuration for eth0 and aliases

    # This line ensures that the interface will be brought up during boot.
    auto eth0 eth0:0 eth0:1

    # eth0 - This is the main IP address that will be used for most outbound connections.
    # The address, netmask and gateway are all necessary.
    iface eth0 inet static
    address 12.34.56.78
    netmask 255.255.255.0
    gateway 12.34.56.1

    # eth0:0
    iface eth0:0 inet static
    address 34.56.78.90
    netmask 255.255.255.0

    # eth0:1 - Private IPs have no gateway (they are not publicly routable) so all you need to
    # specify is the address and netmask.
    iface eth0:1 inet static
    address 192.168.133.234
    netmask 255.255.128.0

    保存,重启网络,/etc/init.d/networking restart 即可。

    如果您觉得本文对您有所帮助,并想购买 Linode VPS [1GB内存, 20GB SSD硬盘, 1个独立IP, 1TB流量/月 = 5美元/月],请点击 [链接]访问官网,购买时在Referral Code栏填写:8dbfedc418b92f8c07e6f03860ece56ea1bd1ec6 谢谢。目前Linode仅支持Visa/Master信用卡,没有可以联系军哥代购,联系方式见右侧。
    >>转载请注明出处:VPS侦探 本文链接地址:https://www.vpser.net/manage/linode-vps-add-ip.html
    VPS侦探推荐:
    遨游主机VultrLinode搬瓦工LOCVPSKVMLAHOSTKVMHostXen80VPS美国VPS主机,国内推荐腾讯云阿里云
    欢迎加入VPS侦探论坛交流:https://bbs.vpser.net

    发表评论

    *必填

    *必填 (不会被公开)

    评论(6条评论)

    1. VPSer说道:

      @stone,我原来也试过不行

    2. stone说道:

      ifcfg-eth0-range 这样快速绑定的kloxo 认不出来吗?

      我的快速绑定的添加时no_ip_address的提示

    3. VPSer说道:

      @alpha2beta, 等Kloxo能支持Nginx了,不如等我的lnmpWeb版的面板,哈哈

    4. alpha2beta说道:

      Kloxo的问题是不方便用Nginx吧?

    5. whcoupon说道:

      收藏先

    6. 久酷说道:

      顶........