【发布时间】:2012-02-19 20:01:48
【问题描述】:
我们正在尝试在 Linode Ubuntu 10.04 Lucid 机器上使用Passenger 和 Nginx 部署我们的 Rails 应用程序。
我们似乎无法从我们的 Ubuntu 机器的根 IPv6 地址设置主机名。
我们得到错误:
root@`ourIPv6`:~# hostname -f
hostname: Name or service not known
当我输入hostname 时,它返回myhost
但是,当我输入 hostname -f 时,它会返回 hostname: Name or service not known
设置主机名需要采取什么必要措施?
hosts file:
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
97.107.128.97 plato.example.com plato
【问题讨论】:
-
要设置主机名,只需运行
hostname new_hostname。你想做什么? -
好的。我们会尝试的。正在关注这个Linode Getting Started Guide。只是尝试部署
-
运行指南中列出的命令。它应该可以工作。
-
你能再具体点吗?它对我有用。
-
查看上面的编辑,如果有任何澄清,请告诉我。这是我们第一次尝试在 ubuntu 10.04 上与乘客 nginx 一起部署的牛仔竞技表演,当时很难理解它们是如何组合在一起的