前言:
Discord是由两个沉迷游戏的玩家为了解决游戏种玩家交流问题而开发的一个语音聊天软件,它从游戏社交起家。
起初,Discord被定义为“永远在线的聊天室”,专门为游戏玩家设计,可以简单快捷的加入或退出某个群聊进行游戏组队和交流,还可以分享游戏的相关图片、视频或连接,并由一个社区供玩家们深入交流。
当然,从以上介绍可以看出,YY语音可能和这个软件是比较类似的。
那么,如何注册,如何使用这些问题本文不做解答,仅就如何在linux安装discord做一个说明。
一,
下载二进制文件
下载地址:https://discord.com/api/download?platform=linux&format=tar.gz
下载的文件名应该是这个:discord-0.0.22.tar.gz
二,
解压discord-0.0.22.tar.gz并进入解压目录:
Discord就是主程序
root@k8s-node2:~/Discord# pwd
/root/Discord
root@k8s-node2:~/Discord# ls -al
total 232076
drwxr-xr-x 5 root root 4096 Dec 19 13:46 .
drwx------ 11 root root 4096 Dec 19 14:12 ..
-rw-r--r-- 1 root root 141930 Apr 13 2022 chrome_100_percent.pak
-rw-r--r-- 1 root root 208519 Apr 13 2022 chrome_200_percent.pak
-rwsr-xr-x 1 root root 15184 Dec 10 08:11 chrome-sandbox
-rwxr-xr-x 1 root root 138954560 Dec 10 08:11 Discord
-rw-r--r-- 1 root root 309 Dec 10 08:11 discord.desktop
-rw-r--r-- 1 root root 7009 Dec 4 16:05 discord.png
-rw-r--r-- 1 root root 10413488 Apr 13 2022 icudtl.dat
-rw-r--r-- 1 root root 224832 Dec 10 08:11 libEGL.so
-rw-r--r-- 1 root root 2762256 Dec 10 08:11 libffmpeg.so
-rw-r--r-- 1 root root 7062360 Dec 10 08:11 libGLESv2.so
-rw-r--r-- 1 root root 4162008 Dec 10 08:11 libvk_swiftshader.so
drwxr-xr-x 2 root root 4096 Dec 10 08:11 locales
-rwxr-xr-x 1 root root 530 Dec 10 08:11 postinst.sh
drwxr-xr-x 3 root root 4096 Dec 10 08:11 resources
-rw-r--r-- 1 root root 5093175 Apr 13 2022 resources.pak
-rw-r--r-- 1 root root 48465 Apr 13 2022 snapshot_blob.bin
drwxr-xr-x 2 root root 4096 Dec 10 08:11 swiftshader
-rw-r--r-- 1 root root 165677 Apr 13 2022 v8_context_snapshot.bin
-rw-r--r-- 1 root root 107 Apr 13 2022 vk_swiftshader_icd.json
三,
配置好apt源,安装依赖
阿里云源:
cat >/etc/apt/sources.list.d/kubernetes.list <<EOF
# 阿里源
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe
multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe
multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe
multiverse
deb https://mirrors.aliyun.com/kubernetes/apt/ kubernetes-xenial main
EOF
安装依赖:
sudo apt install libxshmfence1 libglu1 libnss3 gir1.2-atk-1.0 libatk-bridge2.0-0 libgtk-3-0
libgbm1 libgbm-dev libasound2 libasound2-dev
采用这种方式安装,不需要专门安装桌面,可以直接启动discord。
启动命令为:
./Discord --no-sandbox
第一次启动的时候会自动更新一些东西到Linux服务器内,部分日志如下:
[Modules] Checking for host updates.
[Modules] Host is up to date.
[Modules] Checking for module updates at https://discord.com/api/modules/stable/versions.json
[Modules] Module update available: discord_desktop_core@1 [installed: 0]
[Modules] Module update available: discord_erlpack@1 [installed: 0]
[Modules] Module update available: discord_spellcheck@1 [installed: 0]
[Modules] Module update available: discord_utils@1 [installed: 0]
[Modules] Module update available: discord_voice@1 [installed: 0]
[Modules] Fetching discord_desktop_core@1 from https://discord.com/api/modules/stable/discord_desktop_core/1
[Modules] Streaming discord_desktop_core@1 to /root/.config/discord/0.0.22/modules/pending/discord_desktop_core-1.zip
[Modules] Streaming discord_desktop_core@1 to /root/.config/discord/0.0.22/modules/pending/discord_desktop_core-1.zip: 1%
[Modules] Streaming discord_desktop_core@1 to /root/.config/discord/0.0.22/modules/pending/discord_desktop_core-1.zip: 2%
[Modules] Streaming discord_desktop_core@1 to /root/.config/discord/0.0.22/modules/pending/discord_desktop_core-1.zip: 3%
如果更新失败,可能是网络不通的缘故,因此, 可以ping 官网看看网络是否正常:
root@k8s-node2:~# ping discord.com
PING discord.com (162.159.136.232) 56(84) bytes of data.
64 bytes from 162.159.136.232 (162.159.136.232): icmp_seq=1 ttl=128 time=0.326 ms
64 bytes from 162.159.136.232 (162.159.136.232): icmp_seq=2 ttl=128 time=0.427 ms
64 bytes from 162.159.136.232 (162.159.136.232): icmp_seq=3 ttl=128 time=0.558 ms
64 bytes from 162.159.136.232 (162.159.136.232): icmp_seq=4 ttl=128 time=1.05 ms
更新完毕后就可以进入discord的主界面了(无需进入桌面,可以直接弹出窗口的哦)
第二次启动如下:
k8s-node2:~/Discord# ./Discord --no-sandbox
Discord 0.0.22
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
Starting app.
Starting updater.
[Modules] Modules initializing
[Modules] Distribution: remote
[Modules] Host updates: enabled
[Modules] Module updates: enabled
[Modules] Module install path: /root/.config/discord/0.0.22/modules
[Modules] Module installed file path: /root/.config/discord/0.0.22/modules/installed.json
[Modules] Module download path: /root/.config/discord/0.0.22/modules/pending
[Modules] No updates to install
[Modules] Checking for host updates.
[Modules] Host is up to date.
[Modules] Checking for module updates at https://discord.com/api/modules/stable/versions.json
[Modules] No module updates available.
Optional module ./ElectronTestRpc was not included.
[WebContents] crashed (reason: crashed, exitCode: 139)... reloading
Optional module ./ElectronTestRpc was not included.
Failed to get crash dump id.
Report Id: 7db5ea7c-cf1b-4c
[Modules] Checking for host updates.
[Modules] Host is up to date.
[Modules] Checking for module updates at https://discord.com/api/modules/stable/versions.json
[Modules] No module updates available.
OK,输入账号密码即可进入discord了,现在可以喊上小伙伴一起游戏开黑啦!!!!~~~