Linux configure static IP, set DNS and host name 1: static IP # vi/etc/syssconfig/network-scripts/ifcfg-eth0 DEVICE = eth0 BOOTPROTO = static HWADDR =; here is the physical address of your network card, you do not need to enter ONBOOT = yes IPADDR = 192.168.0.1 NETMASK = 255
the database server requires a static IP address. The steps for modifying the configuration file are as follows:
First open terminal
Edit Nic configuration fileVI/etc/sysconfig/network-script/ifcfg-eth0Enter edit modePress I to editModifyDevice = eth0 # physical device nameIpaddr = 192.168.1.100 # IP AddressNetmask = 255.255.255.0 # mask ValueNetwork =
=192.168.1.211netmask=255.255.255.0Ipv6init=nodns1=8.8.8.86) Restart the network card.# Service Network Restart7) Detect the network is normal.1) Whether the virtual machine can ping the extranet. (Can ping through www.baidu.com).2) Whether the local host can ping the virtual machine in CMD. (Can ping through 192.168.1.211).Copyright Notice:1) original works, from "Clevercode's blog" , please be sure to mention the following original address when r
:# Vi/etc/udev/rules.d/70-persistent-net.rules# This file is automatically generated by the/lib/udev/write_net_rules# program, run by the Persistent-net-generator.rules rules file.## can modify it, as long as you keep each rule to a single# line, and change is only the value of the Name= key.# PCI Device 0x1022:0x2000 (Pcnet32)subsystem== "NET", action== "Add", drivers== "? *", attr{address}== "00:0c:29:8f:89:97 ", attr{type}==" 1 ", kernel==" eth* ", name=" eth0 "# PCI Device 0x1022:0x2000 (Pcn
This article is mainly about setting up a static IP address method in a Linux system.Tools/Materials
redhat6.4 x64
Method/Step
Input in Terminal: Vi/etc/sysconfig/network-scripts/ifcfg-eth0
Start editing, fill in the IP address, subnet mask, gateway, DNS, and so on. Where "the information inside the red box" is necessary.
When you are finish
In Linux (Debian), set static IP addresses of Intranet and Internet NICs. Modify vim/etc/network/interfaces for a single Nic as follows: [plain] # This file describes the network interfaces available on your system # and how to activate them. for more information, see interfaces (5 ). authorization # The loopback network interface auto lo iface lo inet loopback # The primary network interface allow-hotplug
Title: How to set a static IP address for a Linux system
Centos OS 6.5Vi/etc/sysconfig/network-scripts/ifcfg-Default modification:/etc/sysconfig/network-scripts/ifcfg-eth0File:/etc/sysconfig/network-scripts/ifcfg-eth0 for eth0device=Eth0bootproto= none# This line ensures that the interface would be isbrought up during boot. Onboot= for most outbound connections.# the address, netmask, and gateway is all
1. Set the virtual machine to use bridge mode2. Open the configuration file with Vi/etc/sysconfig/network-scripts/ifcfg-enp0s3 (where Enp0s3 is the name of your Linux network adapter, use IP addr in the shell) command to view its own name and change it to its own, immediately after the number of the argument is, not lo that)Modify the following parametersChange bootproute= "DHCP" to bootproute= "static"Chan
Tags: config ifcfg-eth study modified conf TTY ETH local imagesUsing the VMWARE+CENTOS6 environment, you can log in to the virtual machine using putty ssh, and don't know why you can't connect to it every time.Under study, the IP address of CentOS eth0 in virtual machine is changed automatically once every time (automatically plus 1).Baffled, today suddenly think of possible reasons, look, sure enough: VMware configured DHCP, as follows:。Learning envi
Ubuntu Configuration Static IPStatic IP configurationUbuntu Network configuration information is placed in the /etc/network/interfaces If the configuration dynamically gets the IP , add the following to the above file:Open the network configuration information file using the following command:sudo gedit/etc/network/interfacesEdit the file (pay attention to prosec
First make sure that the virtual network card (VMware Network Adapter VMnet8) is turned on, and then enter "Ipconfig/all" on the Windows command line to find the VMware network Adapter VMnet8 's IPv4 address (for example: 192.168.16.1), such as:Then make sure that the network configuration of the virtual machine CentOS is NAT, such as:Finally, set the static IP as follows:Start and enter the CentOS system,
We have completed most of the work before configuring static IP addresses, DNS settings, and host names in Linux. However, a small part of the work will be continued here. Continue with the article for configuration, soon you will complete a server host.
③ Configure the secondary DNS Server
Configure the server 11.0.0.2 as the 21php.com secondary dns Server
The secondary DNS Server transfers a complete set
Set up a static network as follows[Email protected] network-scripts]# pwdGo under this path/etc/sysconfig/network-scripts[Roo[email protected] network-scripts]# cat Ifcfg-ens33[Email protected] network-scripts]# VI ifcfg-ens33#配置如下Proxy_method=noneBrowser_only=noDefroute=yesIpv4_failure_fatal=noIpv6init=yesIpv6_autoconf=yesIpv6_defroute=yesIpv6_failure_fatal=noIpv6_addr_gen_mode=stable-privacyName=ens33Uuid=882b023e-01ac-44bf-b044-df92f3af27c5Device=e
First, modify the network card configuration fileExecute vi/etc/sysconfig/network-scripts/ifcfg-eth0 to enter the network card configuration file and edit the following six items. (There is a modification, none is added.) )bootproto= "Static"onboot= "Yes"dns1=192.168.0.1ipaddr=192.168.30.245netmask=255.255.255.0gateway=192.168.30.254650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/87/02/wKiom1fRCASTW4oKAAAmSDt1NBo394.png "title=" vh3}9d [Me0
Information to set:
The code is as follows
Copy Code
IP Address: 198.9.146.131Subnet Mask: 255.255.255.0Gateway: 198.9.146.254dns:198.9.9.1 198.9.9.2
First edit/etc/network/interfaces set IP address and gateway, it is best to back up first, if you want to configure the Eth0 network card, set the following
The code is as follows
Copy Code
Au
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.