only take effect temporarily, and becomes invalid after the system is restarted.Tip: many people use the hostname to modify the host name. In fact, this is only for the moment. After restarting, it will be restored to the pre-configured host name.Permanent method:Method 1:Step 1:Vi/etc/sysconfig/networkChange HOSTNAME = XX to HOSTNAME = oldboy and save it.Tip: After modification, the/etc/init. d/network restart or source/etc/
, but failed, the configuration as below,/etc/sysconfig/network-scripts/glsorig-ifcfg-eth0DEVICE="eth0"BOOTPROTO="static"DNS1="192.168.0.254"HOSTNAME="instructor.example.com"HWADDR="00:0C:29:65:C0:CE"IPADDR="192.168.0.254"MTU="1500"NETMASK="255.255.255.0"NM_CONTROLLED="yes"ONBOOT="yes"/etc/sysconfig/network-scripts/ifcfg-br0DEVICE=br0BOOTPROTO=noneIPADDR=192.168.0.254NETMASK=255.255.255.0DNS1=192.168.0.254H
1. Four NICs are installed on a Linux host and two are included. After the system is installed, the two extended NICs are identified as eth0, eth1, you want to change the two of the system to eth0 and eth1.
2. Change the module alias in the/etc/modprobe. conf file.
For example, alias eth0 e1000e
Alias eth1 e1000e
Change to alias eth2 e1000e
Alias eth3 e1000e
3. Change the name of the NIC configuration file to ifcfg-eth0, that is
Mv/etc/sysconfig
"title=" 17.png "alt=" Wkiom1edjeybtsivaaearygfuwa107.png "/>The target does not exist, whether it is a file or a directory, will create the specified/aa/directory or/bb file, copy all the contents of the source directory to the target file or directory, through the LS view, it is indeed copied over. 8, the source is a directory file, the target already exists and for the fileIf the source is a directory file, the target is the file that exists, the execution cp-r/etc/
In any case, iptables is a need for special care to set up something, in the event that the server is not around you, and you rushed to set up to prevent SSH, then wait for the boss scold it, hehe ...The content is written to prevent this from happening, of course, it is very elementary, but the general server is enough:1. First introduce the instructions and related configuration files
Start command: Serviceiptablesstart
restart command: Serviceiptablesrestart NBSP;NBSP
C
/httpd.conf Configuring the configuration file for the HTTP service/etc/fstab devices that are automatically loaded when the system starts (for configuring automatic mount devices)/etc/selinux Secure Linux Settings/etc/sysconfig/network can change hostname (hostname) and network card operating status/etc/hosts change the hostname and IP address correspondence, note that the format is hostname.domain hostname localhostLocalhost.domian, the file must be
segments of different network cards of the same route are different, so special distinction should be made between network cards and network segments. Second, view network card informationuse the ifconfig command to see the name and IP address of the network card , and if the NIC name is not standard eth0 and eth1, vim/etc/udev/ Rules.d/70-persistent-net.rules View and modify the corresponding network card information, and /etc/sysconfig/network-scri
Linux network configuration is basically by modifying several configuration files to achieve, although you can also use Ifconfig to set the IP, with the route to configure the default gateway, with hostname to configure the hostname, but the restart will be lost.The following are the relevant configuration files:/ect/hosts Configure host name and IP address, provide resolution to this machine/etc/resolv.conf config domain name (this domain name takes effect when not resolved within the hosts)/et
group ID-O FILEFILE exists and is owned by the effective user ID-P FILEFILE exists and is a named pipe-S FILEFILE exists and has a size greater than zero-S FILEFILE exists and is a socket-W FILEFILE exists and is writable-X FILEFILE exists and is executable
The most commonly used simplified if statement
if "front", then "back"
Copy Code code as follows:
[-f/var/run/dhcpd.pid] rm/var/run/dhcpd.pid Check if the file exists, delete it if it exists
|| If it is not "fro
packets to the default route defined as 10.1.6.1. The default route basically acts as a catchall for any packet this isn ' t being told to do in the what above.
As you can see from the example, there are a lot of results, but the first route is the default route, and the routing table tells the system that if some of the packages do not match the routing records, they are sent to the default route 10.1.6.1. The default route is the place where the packets are not specified
Our Example System
inherits from ResourceBundle, the operations on the Properties file are very similar. Therefore, we will only start with the ResourceBundle class to briefly introduce its usage of operating the Properties file.
The operation method can be found in the following code:
1 package com.webopenshare.demo.prop.utils; 2 3 import java.util.MissingResourceException; 4 import java.util.ResourceBundle; 5 6 public class PropUtils { 7 8 private static PropUtils _instance = null; 9 10 priv
hostname permanently
In man hostname, "The hostname is usually set once at system startup in/etc/rc. d/rc. inet1 or/etc/init. d/boot (normally by reading the contents of a file which contains thehost name, e.g. /etc/hostname ). "RedHat does not contain this file, but is composed of/etc/rc. d/rc. the sysinit script is responsible for setting the system's hostname. it reads the/etc/sysconfig/network text file, and the RedHat hostname is set in this fil
between local users and virtual users is caused, that is, the Mail Delivery Problem of local users and virtual users.
The two questions are discussed below. The experiment environment is postfix + courier-imap + cyrus-sasl + pam-mysql + mysl. The virtual user information is stored in mysql.
3. User Authentication problems:
3.1 smtp password verification:
Use saslauthd Of cyrus-sasl for SMTP password verification. Saslauthd supports multiple verification mechanisms during one verific
RedHat6.1 Nic binding 1. NetworlManger service needs to be completely disabled; otherwise it will conflict with bond Nic serviceNetworlMangerstopchkconfigNetworlMangeroffwww.2cto. com2. modify/etc/sysconfig/network-scripts/ifcfg-bond0...
RedHat 6.1 Nic binding 1. disable the NetworlManger service. Otherwise, the service NetworlManger stopchkconfig NetworlMangeroff www.2cto.com will conflict with the bond Nic. modify/etc/
[Root @ tp ~] # Iptables-X clear the rules in the user-defined chain in the filter of the preset table
Let's take a look.
[Root @ tp ~] # Iptables-L-n
Chain INPUT (policy ACCEPT)
Target prot opt source destination
Chain FORWARD (policy ACCEPT)
Target prot opt source destination
Chain OUTPUT (policy ACCEPT)
Target prot opt source destination
Nothing, just like we didn't start the firewall when installing linux. (say in advance, these configurations are the same as configuring IP addresses with c
source destinationThere are no rules.(2) clear the original rules.Whether or not you have enabled the firewall when installing linux, if you want to configure your own firewall, clear all the filter rules.[Root @ tp ~] # Iptables-F clear the rules of all rule chains in the filter of the preset table[Root @ tp ~] # Iptables-X clear the rules in the user-defined chain in the filter of the preset tableLet's take a look.[Root @ tp ~] # Iptables-L-nChain INPUT (policy ACCEPT)Target prot opt source d
?1) Operating system installationRHEL7 is a one-stop installation?2) NIC configuration fileRHEL6:/etc/sysconfig/network-scripts/ifcfg-eth0RHEL7:/etc/sysconfig/network-scripts/ifcfg-eno16777736?RHEL6 Network ConfigurationStatic settingsVi? /etc/sysconfig/network-scripts/ifcfg-eth0??? #编辑配置文件, add modify the followingDevice=eth0 NIC NameBootproto=static??? #启用静态IP地
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.