《幻兽帕鲁》怎么快速搭建游戏服务器

2024-01-24 20:36:31
A+ A-

/DoExit Force stop the server. 强制停止服务器。

/Broadcast {MessageText} Send message to all player in the server. 向服务器中的所有玩家发送消息。

/KickPlayer {SteamID} Kick player from the server. 将玩家从服务器中踢出。

/BanPlayer {SteamID} BAN player from the server. 从服务器禁止玩家。

/TeleportToPlayer {SteamID} Teleport to current location of target player. 传送到目标玩家的当前位置。

/TeleportToMe {SteamID} Target player teleport to your current location 目标玩家传送到您当前的位置

/ShowPlayers Show information on all connected players. 显示所有已连接玩家的信息。

/Info Show server information. 显示服务器信息。

/Save Save the world data. 保存世界数据。

5.获取steamID

在获取管理员权限后,按下 `ESC` 后点击 `选项` 即可看到steamid,右键单击两次即可复制

[size=3]6.配置虚拟内存以及定时清理缓存[/size]

配置虚拟内存

查看当前虚拟内存空间

设置虚拟内存为12G,建议根据机型调整

> 内存小于等于 2GB: 设置为内存的两倍。

> 内存大于 2GB 且小于 8GB: 设置为内存的1.5倍。

> 内存大于 8GB 且小于 64GB:等于内存大小。

> 内存大于 64GB: 设置为64GB。

sudo fallocate -l 12G /swapfile

sudo chmod 600 /swapfile

sudo mkswap /swapfile

sudo swapon /swapfile

echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

再次查看虚拟内存空间

free -h

配置定时清理缓存

vim clean.sh

#!/bin/bash

sync

echo 1 > /proc/sys/vm/drop_caches

责任编辑:张佳鑫

热点新闻

精彩推荐

加载更多……