Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ CentOS / Linux NIC set IP address configuration     - Linux file content inspection - cat, tac, no, more, less, head, tail, od (Linux)

- To install Internet security firewall Raiders (Linux)

- Learning the Linux powerful network management capabilities (Linux)

- The bulk batch multiple rows of data collect (Database)

- CentOS 6.7 install Nagios Tutorials (Server)

- Linux disk partition batch format mount script (Linux)

- MySQL + Heartbeat + DRBD deployment architecture (Server)

- MySQL Error Code Complete (Database)

- CentOS6.5 installation Docker (Linux)

- To install the Oracle 10.2.0.1.0 process notes on Oracle Linux 4u4 (Database)

- Cancel Root Command History under Linux (Linux)

- How do you change the default browser and Email Client in Ubuntu (Linux)

- Linux boot process (Linux)

- Linux FAQ - How to fix tar:Exitingwith failure status due to previous errors (Linux)

- Java objects are taking up much space (Programming)

- Linux system installation and usage instructions Wetty (Linux)

- Use XtraBackup be physical standby database MySQL (Database)

- To control based on IP address routing policy under Linux (Linux)

- RHEL5 stalled due to power service error system can not start (Linux)

- Linux network monitoring strategy (Linux)

 
         
  CentOS / Linux NIC set IP address configuration
     
  Add Date : 2017-08-31      
         
         
         
  Set the IP address of the next CentOS / Linux

1: Temporary Review:
1.1: Modify IP address
# Ifconfig eth0 192.168.100.100

1.2: Modify the gateway address
# Route add default gw 192.168.100.1 dev eth0

1.3: Edit DNS
# Echo "nameserver 8.8.8.8" >> /etc/resolv.conf

This time on the Internet, the Internet's IP address is 192.168.100.100, gateway address 192.168.100.1. But this setting is temporary, once the card restart or reboot the server, in addition to other actions 1.3 will be reduced, this approach is only suitable for temporary IP changes, you want to permanently modify the network card configuration file, you need to modify the appropriate file

2: Permanently Review:
2.1: Modify IP address
Modify / etc / sysconfig / network-scripts / ifcfg-eth0 file, if multiple network cards, modify the corresponding card
# Vi / etc / sysconfig / network-scripts / ifcfg-eth0
DEVICE = eth0 # NIC corresponding device alias
Information BOOTPROTO = static # NIC obtain ip address (the default is dhcp, showing automatically obtain)
HWADDR = 00: 07: E9: 05: E8: B4 # MAC address (physical address)
IPADDR = 192.168.100.100 #IP address
NETMASK = 255.255.255.0 # Subnet Mask
ONBOOT = yes # system is activated when the device starts


2.2: Modify the gateway address
Modify / etc / sysconfig / network file
# Vi / etc / sysconfig / network
NETWORKING = yes # indicates whether the system is using the network, no network that they can not use
HOSTNAME = doiido # Set the host name of the machine, and to / etc / hosts set the same host name
GATEWAY = 192.168.100.1 # Set the gateway IP address

This time can already ping the IP address, but can not ping the domain name, and therefore need to modify the DNS

2.3: Edit DNS
Modify /etc/resolv.conf file
# Vi /etc/resolv.conf
nameserver 8.8.8.8 #google domain name server
domestic domain name server nameserver 114.144.114.114 #

2.4: Restart NIC
# Service network restart
Turning off the interface eth0: [OK]
Close the loopback interface: [OK]
Pop the loopback interface: [OK]
Pop-up interface eth0: [OK]

This time, the system can normally get online

# Note: In fact, gateway address, and DNS can also write in ifcfg-eth0, but for regulatory purposes, they will write separately
     
         
         
         
  More:      
 
- HTTPS and SSH and use the difference between the way: Git User's Manual (Linux)
- Install Redis 2.6 5.5 32 position CentOS error resolved (Linux)
- Setting up Linux machine through a proxy firewall (Linux)
- Upgrade installation manual CentOS6.5 GCC4.8.2 (Linux)
- JIRA 3.6.2 Upgrade from older version to the new version 6.0.8 (Linux)
- stat - Get more information than ls (Linux)
- Easy to install Ubuntu 15.04 and Ubuntu 15.04 GNOME on Wayland trial (Linux)
- MySQL Tutorial: Building MySQL Cluster under Linux (Database)
- Hanoi problem Java Solution (Programming)
- Linux Shell Understanding and Learning (Linux)
- sudo command scenario analysis (Linux)
- Linux server data backup (Server)
- Ubuntu 14.10 / 14.04 how to install Quick Start tool Mutate 2.2 (Linux)
- Linux virtual memory and physical memory (Linux)
- Ubuntu install VMware Workstation 11 tutorials at 14.04 / 14.10 (Linux)
- Ten linux version of the system (Linux)
- Nginx + ownCloud + PHP + MySQL to build personal private cloud under CentOS7 (Server)
- CentOS 6.5 set under Oracle 12c at startup (Database)
- SELinux multi-level security (Linux)
- ORA-14400: inserted partition key does not map to any partition (Database)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.