The solution is that you cannot connect to the linux host from XP to Win7 using the Linux hostname method. After the update, you want to connect to the Linux host saved by the original putty; originally, the access to the linux host was through the linux hostname method. This method was also used this time, But Win7 could not resolve this hostname. The DNS resolu
message 1Message 1:From [email protected] Wed Oct 26 14:14:46 2016Return-path: X-original-to:rootTS 0 0TMPFS/DEV/SHM TMPFS Defaults 0 0Devpts/dev/pts devpts gid=5,mode=620 0 0Sysfs/sys Sysfs Defaults 0 0PROC/PROC proc Defaults 0 0q Enter Q to exit the mail systemHeld 1 Message In/var/spool/mail/root9, hostname: Display host nameHostname Donggen indicates that the host name of the current host is changed to Donggen[Email protected] usr]# hostnameXueli
1, if only modify hostname can be by the following commandHostnameNote: This modification is only valid until the server restarts and the hostname expires, returning to the original hostname.2. If you need to permanently modify hostname, you can use the following commandModify the
Wake up in the morning find the Linux hostname changed to BogonBogon refers to addresses that should not appear in the Internet routing table.These addresses should include:1, private address such as 10,172.16-32,192.168 .....2. Address not officially assignedAfter Google found a way to change the nameOne: Using the hostname command[Email protected] ~]# hostname
The host name needs to be modified with a script, involving the Redhat, SUSE system, and requires that the modifications take effect immediately without restarting, and here is my script.Here's how to use the script:1 First create a script file, if named ModifyHostname.sh:touch modifyhostname.sh2 then give this file to this file grant Execute permission: chmod a+x modifyhostname.sh3 Copy the following script contents to the modifyhostname.sh file4 Execute ScriptSH modifyhostname.sh newhostname #
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.
Vi/etc/sysconfig/network
Open the file in any of your favorite editors, with a line of Hostname=localhost.localdomain (if default), and modify localhost.localdomain for your hostname.
Vi/etc/hosts
Open the file and there
Reference: http://wp.fungo.me/linux/what-the-hell-is-hostname.htmlHostname is the machine name, a variable in the kernel, can be temporarily modified or permanently modified/etc/hosts The local DNS system, query the domain name will be first in this file inside the query, can not find the system DNS to findSo hostname and the hosts didn't have a half-penny relationship.However, it is easy to cause confusion in the following situations:Assuming that th
A few days ago, when using JavaMail to send Mail on a Linux server, it always reported javax.mail.messagingexception:501 syntax:helo hostname this error, In the confirmation of the message sent by the host is not a problem, and in the local Windows environment, it is normal to send, this is a bit weird, it is not recently good character. Well, after a toss, I finally found the reason.
Solution:1, first use hostna
Tags: mysql FAQSuzf.net Pure handmade 650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0028.gif "alt=" J_0028.gif "/>The following error occurred while managing MySQL permissions: Error 1396 (HY000): Operation CREATE USER failed for ' username ' @ ' hostname 'But this user only really exists. Recall a previous action: first create a user with the grant statement, and then change the permissions to update the Mysql.user data. As a result, the
Hostname configuration/etc/sysconfig/network hostname can not be changed to the form of the domain nameShell>vim/etc/sysconfig/networkNetworking=yesNetworking_ipv6=noHostname=mail1.gz.comLocal domain name resolution configuration is often used for testing, of course, in a system of their own internal use is also very commonShell>vim/etc/hosts192.168.2.10 mail1.gz.com192.168.2.20 mail2.gz.comDNS configuratio
Recently, I encountered several pitfalls and analyzed them one by one.
1. the hostname and address of the host name are inconsistent.
When another stress test environment was deployed and submitted to the test group for stress testing, an error was reported when my colleague modified the pg_0000.conf file to reload the configuration file. (The localhost. localdomain server cannot be found)
When I saw this error, I thought about it carefully. I perfo
OK, let's move on to the third question. 3: How many different ways to modify hostname? 1:hostname db-server– takes effect immediately after operation (new session takes effect), but changes are lost after the system restarts2:echo db-server >/proc/sys/kernel/hostname– takes effect immediately after operation (new session takes effect), but changes are lost after
1. Temporarily modify host nameDisplay host Name:[Email protected]:~$ hostnamelocalhostModify Host Name:[Email protected]:~$ sudo hostname orcl1[email protected]:~$ HOSTNAMEORCL12. Permanently modify the host nameThe above modification is only a temporary change, after the restart is back to the original.Step 1:Modify the hostname in/etc/sysconfig/networkVi/etc/sysconfig/networkhostname=localhost.localdomai
One, configure IPUbuntu's network configuration information is placed in the/etc/network/interfaces,If the configuration dynamically obtains the IP, add the following to the above file:Auto Eth0Iface eth0 inet DHCPIf you configure a static IP, add the following:Auto Eth0Iface eth0 inet StaticAddress 192.168.33.201Netmask 255.255.255.0Gateway 192.168.33.1If the configuration is active, you need to restart the NIC:Ifconfig eth0 DownIfconfig eth0 upNot root, add sudo to the front of the commandIf t
There are several ways to modify hostname1:hostname Db-server--effective immediately after operation (new session takes effect), but changes are lost after the system restarts2:echo db-server >/proc/sys/kernel/hostname--takes effect immediately after operation (new session takes effect), but changes are lost after the system restarts3:sysctl Kernel.hostname=db-server--effective immediately after operation (
How can I modify the Linux hostname to take effect?Many people use the hostname host name to modify, in fact, this is only temporary, restart will revert to the original name.Many people say to modify the/etc/hosts file, in fact, the host name in this file is only to provide DNS resolution. If you don't use DNS, you only need to modify the hostname, which is usel
hostname 显示文件内容尾部Syntax format: hostname "option" "File" hostname [options] [options]Note: There must be at least one space between each element in the hostname command and in the options and options that follow.Option Description:
parameter Options
Explanatory notes
-A
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 =$
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.