Skip to main content

此版本的 GitHub Enterprise 已停止服务 2022-10-12. 即使针对重大安全问题,也不会发布补丁。 为了获得更好的性能、更高的安全性和新功能,请升级到最新版本的 GitHub Enterprise。 如需升级帮助,请联系 GitHub Enterprise 支持

Configuring DNS nameservers

GitHub Enterprise Server uses the dynamic host configuration protocol (DHCP) for DNS settings when DHCP leases provide nameservers. If nameservers are not provided by a dynamic host configuration protocol (DHCP) lease, or if you need to use specific DNS settings, you can specify the nameservers manually.

The nameservers you specify must resolve your GitHub Enterprise Server instance's hostname.

警告:初始设置后不要更改 GitHub Enterprise Server 的主机名。 更改主机名将会导致意外的行为,甚至包括实例中断。

Configuring nameservers using the virtual machine console

  1. 使用虚拟平台工具,打开虚拟机器控制台。 GitHub Enterprise 控制台
  2. 若要启动网络设置,请按 S。
  3. Configure nameservers for your instance.
  4. 要完成设置的配置,请按“D”。

Configuring nameservers using the administrative shell

  1. SSH into your GitHub Enterprise Server instance. If your instance comprises multiple nodes, for example if high availability or geo-replication are configured, SSH into the primary node. If you use a cluster, you can SSH into any node. For more information about SSH access, see "Accessing the administrative shell (SSH)."

    $ ssh -p 122 admin@HOSTNAME
  2. To edit your nameservers, use the ghe-setup-network command in visual mode. For more information, see "Command-line utilities."

    ghe-setup-network -v
  3. To add your new nameserver entries to your GitHub Enterprise Server instance, run the following:

    sudo service resolvconf restart
    sudo service dnsmasq restart