Environment:Ubuntu 10.04(Lucid)
改變需要理由,更改只需要方法。所以下面的話只是教你如何更改主機名。
首先,編輯/etc/hostname,把里面的主機名改為你現在想要的主機名。hostname文件就像它的名字一樣,里面只有一句話,更准確的說是一個詞,就是你現在的主機名。比如我的hostname現在是ubuntu,那么cat < /etc/hostname得到的只是ubuntu。我現在想把它改為MySQL-Server,把hostname中的ubuntu直接替換就是了。
然后,編輯/etc/hosts,把其中以前的hostname全部替換成現在的hostname。例如,我的old hostname是ubuntu。cat < /etc/hosts得到的內容如下:
127.0.0.1 localhost
127.0.1.1 ubuntu.localdomain ubuntu
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
|
現在要做的就是把里面的ubuntu全部替換成MySQL-Server。
最后,reboot。關于reboot,我也很無奈a。誰讓咱現在是菜鳥呢,只能先重啟了,以后再說吧。
分享到:
相关推荐
For detailed information on how to configure a test server environment using a variety of operating systems and web servers, see "Local server setup" (http://drupal.org/node/157602) in the Drupal ...
If your header file includes other header files, any change to those files will cause any code that includes your header to be recompiled. Therefore, we prefer to minimize includes, particularly ...
Output buffering is a mechanism for controlling how much output data ; (excluding headers and cookies) PHP should keep internally before pushing that ; data to the client. If your application's ...
* Change the 127.0.0.1 to either the IP of your crtmpserver or simply use a hostname of your machine * Replace file-download with the actual filename of your sample you download. Remeber to omit the ....
集合了 所有的 Unix命令大全 ...telnet 192.168.0.23 自己帐号 sd08077-you0 ftp工具 192.168.0.202 tools-toolss ... 各个 shell 可互相切换 ksh:$ sh:$ csh:guangzhou% bash:bash-3.00$ ... 命令和参数之间必需用空格隔...
(42KB)<END><br>24,nwset.zip Do you want to change a Host name, DHCP or static IP settings? (14KB)<END><br>25,ipxcheck_demo.zip How to obtain IPX node addresses of network stations (62KB)<END>...