Linux static IP settings-modify the configuration file

Source: Internet
Author: User
Linux static IP settings-modify the configuration file database server requires the use of static IP, by modifying the configuration file steps are as follows: first open terminal edit Nic configuration file vi/etc/sysconfig/network-script/ifcfg-eth0 enter edit mode press I to edit modify DEVIC... linux static IP settings-modify the configuration file database server requires the use of static IP, by modifying the configuration file steps are as follows: first open terminal edit Nic configuration file vi/etc/sysconfig/network-script/ifcfg-eth0 enter edit mode press I to edit modify DEVICE = eth0 # physical DEVICE name IPADDR = 192.168.1.100 # IP address NETMASK = 255.255.255.0 # mask value NETWORK = 192.168.1.0 # NETWORK address (optional) BROADCAST = 192.168.1.255 # BROADCAST address (optional) GATEWAY = 192.168.1.1 # GATEWAY address ONBOOT = yes # [yes | no] (whether to activate the device during boot) USERCTL = no # [yes | no] (whether non-root users can control the device) BOOTPROTO = static # [none | static | bootp | dhcp] (no protocol used during boot | static allocation | BOOTP protocol | DHCP protocol) modify the DNS configuration file (if DNS exists) vi/etc/resolv. in the conf mode, press the I key to edit and modify nameserver 202.109.14.5 # master DNSnameserver 219.141.136.10 # DNSsearch localdomain. if only the IP address is configured, no DNS is configured, you can use the following method to make the configuration take effect:/sbin/ifdown eth0/sbin/ifup eth0 after all network configurations are completed, you need to restart the network service (notify the gateway to update information ): service network restart or/etc/init. d/network restart
Related Article

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.