Linux host name hostname setting in Linux is troublesome, and even modifying the host name is no exception. After Linux is installed, its default host name is localhost. Three steps are required to modify the Linux host name. Use hostname to modify the current host name. Hostnamenew-host... linux host name hostname setting in Linux is troublesome, even modifying
I found that the methods for changing the host's hostname in Linux are incomplete. The following is a complete method:
Step 00:
Assume that the original hostname is bkjia and you want to change it to bkjia03.
Use root to change the hostname
Su-rootStep 01:
Change bkjia in/etc/hosts to bkjia03
Vi/etc/hosts
:
127.0.0.1 bkjia03 localhost. localdomain localho
Issue 2: After modifying the hostname, how to make it effective immediately without restarting the operating system.Method 1: After you modify the hostname under/etc/sysconfig/network, then use echo servername >/proc/sys/kernel/hostname.[Email protected] ~]# echo Test >/proc/sys/kernel/hostnameNote that the current session still does not change, but subsequent ne
Linux system installed, there will be a default hostname, here in the case of the CentOS system, the default hostname is Localhost.localdomain, for ease of use, we often need to modify the hostname, the following is a way to permanently change the hostname.Steps:1. Log in as root, or switch to the root user after logging in, and then enter the
For some type of setups, if network connections not available during startup process, exim4 takes long time to start. To solve this problem, you must useDC_minimaldnsOption of exim4. you can also configure this feature
Dpkg-reconfigure exim4-config
On Debian based systems. You shoshould answerYesFor the question"Keep number of DNS-queries minimal?"
However, ifHostname -- fqdnCommand doesn't print a full qualified hostname (actually only checked one d
Question: Use a week Ubuntu14.04, feel oneself originally set the username and hostname is too long, want to modify.The result: One night passed, or a tragedy.Google search: Ubuntu modified the user name, looked at the first students in the article, according to the description to modify/etc/passwd and/etc/shadow, the old user name is modified to a new user name, after the completion of the modification to restart, and then the tragedy.Although the ne
Nbsp; you need to modify two files: 1.vi/ etc/hosts/etc/hosts. the contents are generally similar to the following: 127.0.0.1localhost.localdomainlocalhost192.168.1.195debian.localdomaindebian: localhost. localdomainyourna
You need to modify two files:1. vi/etc/hostsThe content of/etc/hosts is generally similar to the following:127.0.0.1 localhost. localdomain localhost192.168.1.195 debian. localdomain debianModify: localhost. localdomain = yournameSave and exit.2. vi/etc/sysconfig/networkYou ca
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 #忽略数据库表名大小写
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
MySQL 1042 Can't get hostname for your address Problem Analysis Solution Process [Comment 1] former colleague penguin said he installed mysql 5.5, found that when using the mysql client remote connection, the error 1042-Can't get hostname for your address is reported, but the permission has been granted and the grant is successful. This error indicates that "your address cannot obtain the host name", and I
[Comment 1]The former colleague penguin said that he installed MySQL 5.5 and reported the error 1042-can't get hostname for your address when using the mysql client for remote connection, however, the permission has been granted and the grant is successful.This error indicates that "your address cannot obtain the host name ".Skip-name-resolveParameters.
Official documentation:
--skip-name-resolveUse IP addresses rather than host names when creating gr
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.