Configure the IP address of ubuntu server

Source: Internet
Author: User

During this time, the hadoop cluster environment was deployed to linux, which involved some linux configurations and was recorded for later use. Linux IP addresses are divided into two types: DHCP Dynamic Allocation and Static address allocation. In the past, dynamic allocation was used. However, IP addresses were always changed due to system reasons, and they were configured as Static IP addresses. In ubuntu server 11.10, the configuration is as follows: Use the vi editor to open the/etc/network/interfaces file Java code 1. # The primary network interface 2. auto eth0 3. iface eth0 inet dhcp # The primary network interface auto eth0 iface eth0 inet dhcp modify The Java code 1 in The following way. # The primary network interface 2. auto eth0 3. iface eth0 inet static 4. 5. # The IP address to be configured. 6. address 192.168.182.130 7. 8. # gateway address 9. gateway 192.168.182.2 10. 11. # subnet mask 12. netmask 255.255.255.0 13. 14. # broadcast address 15. # broadcast 192.168.182.255 16. # network 192.168.182.0 # The primary network interface auto eth0 iface eth0 inet static # IP address to be configured address 192.168.182.130 # gateway address gateway 192.168.182.2 # subnet mask netmask 255.255.255.0 # broadcast address # broadcast 192.168.182.255 # network 192.168.182.0 then execute the following command to make the configuration take effect Java code 1. root @ wenbo00: // #/etc/init. d/networking restart author zllz5230

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.