gpt4 book ai didi

ubuntu - 无法在 Linode Ubuntu 10.04 Lucid Lynx 上设置主机名

转载 作者:行者123 更新时间:2023-12-04 19:04:24 26 4
gpt4 key购买 nike

我们正在尝试在 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

最佳答案

编辑 /etc/hostname/etc/hosts并确保您想要的主机名在您的 hosts 文件中,然后执行 #: hostname -F /etc/hostname .

关于ubuntu - 无法在 Linode Ubuntu 10.04 Lucid Lynx 上设置主机名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9352729/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com