In the modification of the student, when the IP is really not, has been used in the previous method, appeared to show the wrong.I have used many methods to test:viewdata["IP"] = Request.UserHostAddress.ToString (); Local IP dynamic get:: 1 //viewdata["IP"] = System.Web.HttpContext.Current.Request.UserHostAddress.ToString ();// Local IP dynamic get:: 1 //viewdata["IP"] = httpcontext.current.request.servervariables["REMOTE_ADDR"];//missing reference, no validation
Centos host name modification (hostname)
You need to modify either of them:/etc/sysconfig/network and/etc/hosts. modifying only one of them will cause system startup exceptions. Switch to the root user first.
/Etc/sysconfig/Network
Open the file in any of your favorite editors with a line in itHostname = localhost. localdomain(If it is the default), modifyLocalhost. localdomainYour host name.
/Etc/hosts
Open this file with a line127.0.0
After iredmail is configured, try to send an email from the client's Oe. An error is returned. Check tail/var/log/maillog on the mail host and find the following error message:
Oct 24 12:50:49 mail2 postfix/smtpd[9280]: connect from unknown[192.168.5.240]Oct 24 12:50:49 mail2 postfix/smtpd[9280]: NOQUEUE: reject: RCPT from unknown[192.168.5.240]: 504 5.5.2
After exploration, I found that I only need to modify the Postfix configuration file. My Postfix configuration file is located in/etc/Postfi
[[Email protected]~]# Vi/etc/sysconfig/network-scripts/ifcfg-eth0Device=eth0 # NIC nameBootproto=static # Static IP Address Acquisition Status such as: DHCP indicates auto get IP Addressipaddr=192.168.186.128 #IP Addressnetmask=255.255.255.0 # Subnet MaskOnboot=yes # whether to activate at boot timegateway=192.168.1.1Modify Linux System of Host name :[[Email protected]~]# vi/etc/sysconfig/networkHostname=cuilong # Modify host name, restart effectivegateway=192.168.1.1 # Modify the default gatewa
Installed MySQL 5.5, found remote connection with the MySQL client, reported 1042-can ' t get hostname for the your address error, while the connection user has been authorized. This error means "your address can not get host name", I thought of the skip-name-resolve parameters.
The workaround is as follows:
Edit My.iniAdd or modify the following two lines under the [MYSQLD] nodeSkip-name-resolve #忽略主机名的方式访问Lower_case_table_names=1 #忽略数据库表名大小写
Modify the Linux hostname-Linux Enterprise Application-Linux server application information. For more information, see. 1. Enter/etc/sysconfig/network and change hostname = localname to the newname you want. localname is the default value. Save and exit.
2. Enter/etc/hosts, change 127.0.0.1 localname. To 127.0.0.1 newname., save and exit.
3. Restart the instance.
Note: If you directly use the
Shell script update or host addition, and add hostname ing to hosts some services need to map hostname and 127.0.0.1 in hosts, such as sudo, the updateHostName script can be used to change/etc/hosts or Add hosts based on input parameters, such as executing sudo. /changeHost. sh blog.duplicatedcode.com 192.168.1.222 domain name is fixed, and the Internet ip address is constantly changing #! /Bin/sh in_ip =$
I. Modifying host names1. Zero modification[Email protected] network-scripts]# hostname jw07And then you can see that our hostname has been modified.2. Permanently modify the host name[Email protected]/]# Hostnamectl set-hostname LiutaoRestart CentOS to see the changesTwo. How to turn off the CentOS firewall1. Zero-off[Email protected] ~]# Systemctl stop Firewall
value of HOST_NAME (), and then we can filter the data with dynamic filter such as "Filter_column = HOST_NAME ()":
CREATE TABLE orders (OrderID int not null, Filter_column char (), Quantity int)
Go
INSERT into orders values (1, ' Nanjing ', 100)
INSERT into orders values (2, ' Suzhou ', 200)
INSERT into orders values (3, ' Hangzhou ', 120)
INSERT into orders values (4, ' Hangzhou ', 100)
Go
But what do we do with dynamic filter if the data in our table doesn't exactly match the SUSE
Tags: hostname oracle Start#刚开始直接root用户登录, in the ETC directory, switch to Oracle, enter LSNRCTL start to start Oracle prompt "Lsnrctl:command not found"
[[Email protected]_test etc]# su Oracle
[[email protected]_test etc]$ lsnrctl start
bash:lsnrctl:command not found#切换回root用户, cd/root directory, again su-oracle, input lsnrctlstart start Oracle, this time it's OK. [[emailprotected]_test~]$cd/[[Emailprotected]_test/]$su-root su
:invalidoption-- ' R '
Cause: The company network interface to do the interface authentication, the virtual machine bridge to the physical network card can not complete authentication network access, but can only say that the virtual machine network mode changed to NAT mode, after the completion of the SSH login, found that the host name has changed.Found the host name into a bogon, very angry, look very uncomfortable, try to change back.View several related files[[emailprotected] ~]# vi /etc/sysconfig/networkNETWORKI
Project error cannot find host name solutionSometimes our project is running locally without problems, but it's a mistake to deploy to a Linux server.Error: Java.net.UnknownHostException: hostname: hostname cannot find host name.Workaround:Modify the/etc/hosts file on the server127.0.0.1 localhost localhost.localdomain Add the desired host nameOr127.0.0.1 localhost Localhost.localdomain127.0.0.1 Add the des
CentOS Modify host name (hostname)
CentOS Modify host name (hostname)
Two places need to be modified: One is/etc/sysconfig/network, the other is/etc/hosts, and modifying any one of these will cause the system to boot abnormally. First switch to root user. /etc/sysconfig/network
Open the file in any of your favorite editors, with a line of Hostname=localhost.lo
hostname commandThe hostname command is used to display and set the host name of the system. The environment variable hostname also holds the current host name. After you use the hostname command to set the hostname, the system does not permanently save the new host name, af
ObjectiveIn the use of CDH cluster process, it will inevitably cause the node IP or hostname changes due to some irresistible reasons, and CM's monitoring interface can not complete these things, but CM will all the hosts in the cluster information is in the PostgreSQL database hosts table,Now let's do this by modifying the hosts.The first step is to close the service1. Turn off the Cluster service, and Cloudera Management services,2. Close cm Service
Modify the IP address, hostName, and cdh5hostname of the host node in the cdh5 cluster.Preface
When using the cdh cluster, it is inevitable that the node IP address or hostName changes due to some irresistible reasons, and the cm monitoring interface cannot complete these tasks, however, cm stores all host information in the hosts table of the postgresql database,
Now let's modify the hosts to complete this
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.