In Linux, how do I set IP addresses? We can use commands to set the IP address, but the prerequisite for this method is that the user needs the root permission. The nic ip Address Configuration information is stored in the/etc/sysconfig/network-script/ifcfg-eth0 file of the Linux system. The specific format is:# Cat ifcfg-eth0 [root @ localhost network-Scripts] #
Device = eth0
Bootproto = none
Onboot = Yes
Type = Ethernet
Netmask = 255.255.2
specified module [plain] [root @ Think ~] # Grep 'Alias eth '/etc/modprobe. conf alias eth0 vmxnet alias eth1 e1000 alias eth2 e1000 if there is only one Nic, that is, only one Nic uses this module (driver), then in modprobe. if multiple NICs are mapped to one module at the same time, for example, in the preceding example, both eth1 and eth2 use the e1000 module, you must specify the HWADDR variable. you can specify [plain] [root @ Think ~] in/etc/sysconfig
This article transferred from: Http://www.cnblogs.com/kerrycode/archive/2012/12/17/2821836.html#commentformConfigure dynamic IPEnter setup in the Terminal Command window and the following window will pop up[[Email protected] ~]# SetupSelect Network Configuration, click Enter to enter the following screen,Select the Edit Devices option to enter the following screenClick Enter, the option to enter the following interface, press TAB to switch between options, select Use DHCP, press the space bar, w
In Linux, how can I modify the IP address information is always changed using ifconfig, and always had to be redone after restart. If you modify the configuration file, you don't have to worry about it ~ A. The IP address modification takes effect immediately: www.2cto.com # ifconfigeth0192.168.0.20netmask255.2... how can I modify the IP address information in Linux? I always use ifconfig to modify the IP address information. I always have to redo it after restart. If you modify the configuratio
rawdevices management method before RHEL6. After the system is installed, the/etc/init. d/rawdevices and/etc/sysconfig/rawdevices files exist by default.
# Cat/etc/redhat-releaseRed Hat Enterprise Linux Server release 5.8 (Tikanga) # rpm-qf/etc/init. d/rawdevices/etc/sysconfig/rawdevicesinitscripts-8.45.42-1.el5initscripts-8.45.42-1.el5 # cat/etc/init. d/rawdevices #! /Bin/bash # rawdevicesThis shell scrip
For reference. The NIC configuration file of RedHat9.0 can be located in the following three locations. /Etc/sysconfig/network-scripts/ifcfg-eth0/etc/sysconfig/networking/devices/ifcfg-eth0/etc/sysconfig/networking/profiles/default/ifcfg-eth0 by default only exist at/etc /For reference.
The NIC configuration file of RedHat 9.0 can be located in the following thr
In Linux, how can I modify the IP address information is always changed using ifconfig, and always had to be redone after restart. If you modify the configuration file, you don't have to worry about it ~ A, modify the IP address effective immediately: www.2cto.com # ifconfig eth0 192.168.0.20 netmask 255.255.255.0 start effective: Modify/etc/sysconfig/network-scripts/ifcfg-eth0 B, modify the default gateway effective immediately: # route add default g
Today, I got a new server, used as a stepping stone, and pasted and copied the previous Code. As a result, there was a problem and I couldn't forward it,
Beth was not clear, so I had to find it a little later. First, find the network,
No network problems found, no problems with the Intranet and Internet, and no problems with the dual-nic gateway,
So I had to search Baidu for the problem. Here I found an article that is useful to myself and posted it to solve the problem in the future.
Configure
into the KDE desktop environment; automatically login to Linux; PREFDM script framework is roughly as follows: #!/bin/sh PATH=/SBIN:/USR/SBIN:/BIN:/USR/BIN:/USR/X11R6 /bin. /ETC/PROFILE.D/LANG.SH # First step: Check to see if [-f/etc/sysconfig/autologin-a-x/usr/sbin/autologin] for automatic login; Then If/usr/sbin/autologin; Then Exit 0 fi fi # Step two: If you're not automatically logged in, you'll search for the user's preferred login in/etc/
Iptables service to open port 2002.Solution:1. iptables file not found under/etc/sysconfig/under CentOS2. Linux iptables configuration details (turn)Refer to Linux iptables configuration details (RPM) Modify the configuration of the Iptables service to open port 2002.
The first thing to do is give our SSH accept configuration so that it doesn't connect directly:1. If the SSH port is 22 (it is not recommended to use the default port to get rid of the
http://rickcheung.blog.51cto.com/913220/3544291. CentOS Modify DNSModify the DNS configuration file for the corresponding NIC# vi/etc/resolv.confModify the following contentNameServer 8.8.8.8 #google域名服务器NameServer 8.8.4.4 #google域名服务器2. CentOS Modify GatewayModify the configuration file for the gateway for the corresponding network card[[Email protected]]# vi/etc/sysconfig/networkModify the following contentNetworking=yes (Indicates whether the syste
through rpm, or DHCPD has been installed, you should try to determine where the DHCPD writes its lease file and ensure that the file exists. You can also create an empty file manually:
# Touch/var/lib/DHCP/DHCPD. Leases
Iii. Start and check the DHCP server
Run the following command to start the DHCP server:
# Service DHCPD start
Run the ps command to check the DHCPD process:
# Ps-Ef | grep DHCPDRoot 2402 1 0? 00:00:00/usr/sbin/DHCPDRoot 2764 2725 0 00:0
Reprint: http://blog.csdn.net/wangjingfei/article/details/5283632/It is very convenient to be familiar with Ifconfig.ifconfig eth0 New IPThen edit/etc/sysconfig/network-scripts/ifcfg-eth0, modify IPFirst, modify the IP address[Email protected] network-scripts]$ VI ifcfg-eth0Device=eth0Onboot=yesBootproto=staticipaddr=219.136.241.211netmask=255.255.255.128gateway=219.136.241.254Second, modify the gatewayVi/etc/sysc
Add: This is valid for the first time to add a network card, if you need to repeat the addition and deletion of automatic configuration, you need to change the script, according to the IP a command information to modify.
Copy Code code as follows:
#!/bin/bash
#update: 2013-02-25
#author: Ihuotui
#version 0.1
cdate=$ (date ' +%y%m%d ')num=$ (ifconfig-a | grep eth | wc-l)echo "ethx=" $num >> ethxFor ((n=1;nTodoIf [-e/etc/sysconfig/ne
Binding Prerequisites: The chipset model is the same, and the NIC should have its own stand-alone BIOS chip.Operation Process:1, edit the virtual network interface configuration file, specify the network card IP (without this file we can copy from the previous configuration file, reduce the input text.)
[Root @heng ~] # cp/etc/sysconfig/network-scripts/ifcfg-eth0/etc/sysconfig/network-scripts/ifcfg-bond0 en
First, the configuration document detailed
In Linux systems such as Rhel or CentOS, the main setup files related to the network are as follows:
/etc/host.conf Configure the Domain Name Service client's control file
/etc/hosts The completion of the host name mapping to the IP address function
/etc/resolv.conf domain Name Service client configuration file, The location that specifies the domain name server
/etc/sysconfig/network co
below is a level two storage server deploymentconfiguring level Two storage1: Install the service Pack [Email protected] sysconfig]# yum-y install Rpcbind nfs-utils2: Create a shared directory [Email protected] sysconfig]# mkdir/secondary3: Create configuration file [Email protected] sysconfig]# Vim/etc/exports/secondary 192.168.1.0/24 (Rw,no_root_squash)4: Deter
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.