一、修改主机名并安装 Tailscale
首先,将服务器主机名修改为更有意义的标识(例如节点位置):
hostnamectl set-hostname tr-ist
这里的 tr-ist 表示:
tr:土耳其(Turkey) ist:伊斯坦布尔(Istanbul)
这样做的好处是在多台服务器环境中,可以一眼识别节点位置。
二、修改后,重新加载 shell,使主机名立即生效:
bash
此时可以看到提示符已经变为:
root@tr-ist:~#
说明主机名修改成功。
三、可以简单验证系统运行状态:
uptime
输出示例:
12:54:29 up 14 min, 1 user, load average: 0.03, 0.12, 0.19
表示系统已运行 14 分钟,负载正常。
四、接下来安装 Tailscale:
curl -fsSL https://tailscale.com/install.sh | sh
这一步会自动完成:
下载最新版本 安装客户端 配置基础环境
Installation complete! Log in to start using Tailscale by running:tailscale uproot@tr-ist:~# tailscale upTo authenticate, visit: https://login.tailscale.com/a/1d0fdf201ba3https://login.tailscale.com/a/1d0fdf201ba3
Success.
root@tr-ist:~#
Edit machine IP for tr-ist
root@tr-ist:~# ping 100.64.0.16P
ING 100.64.0.16 (100.64.0.16) 56(84) bytes of data.
64 bytes from 100.64.0.16: icmp_seq=1 ttl=64 time=0.139 ms
64 bytes from 100.64.0.16: icmp_seq=2 ttl=64 time=0.084 ms
64 bytes from 100.64.0.16: icmp_seq=3 ttl=64 time=0.090 ms
64 bytes from 100.64.0.16: icmp_seq=4 ttl=64 time=0.076 ms
^C
--- 100.64.0.16 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3066ms
rtt min/avg/max/mdev = 0.076/0.097/0.139/0.024 ms
root@tr-ist:~#
1、查看当前节点及内网中其他设备的连接状态
tailscale status
2、查看本机的 tailscale IP
tailscale ip
3、测试与其他节点的连通性
tailscale ping 100.64.0.x
4、查看当前节点详细信息
tailscale status --self
5、重新登录 / 切换账号:
tailscale up --reset
6、退出当前网络:
tailscale down
7、查看版本信息:
tailscale version
本文链接:https://kinber.cn/post/6603.html 转载需授权!
推荐本站淘宝优惠价购买喜欢的宝贝:

支付宝微信扫一扫,打赏作者吧~
