使用 systemd
此示例演示如何在 Linux 系统下使用 systemd 来管理 frps 服务,包括启动、停止、配置后台运行和设置开机自启动。
frp 采用 Go 语言编写,支持跨平台,只需下载适用于您平台的二进制文件即可执行,无需额外依赖。
由于采用 Go 语言编写,因此系统需求与最新的 Go 语言对系统和平台的要求一致,具体请参考 Golang System requirements。
您可以从 GitHub 的 Release 页面中下载最新版本的客户端和服务器二进制文件。所有文件都打包在一个压缩包中,还包含了一份完整的配置参数说明。
frpc
复制到内网服务所在的机器上。frps
复制到拥有公网 IP
地址的机器上,并将它们放在任意目录。
./frps -c ./frps.toml
。
./frpc -c ./frpc.toml
。
supervisor
。
如果您是 Windows 用户,需要在命令提示符中执行相同的命令。
有关如何编写配置文件,请参考 示例 部分中的内容。
完整的配置项说明,请参考 Reference 中的内容。
此示例演示如何在 Linux 系统下使用 systemd 来管理 frps 服务,包括启动、停止、配置后台运行和设置开机自启动。
FRP adopts Go Language writing, supporting cross platform, just download the binary files suitable for your platform to execute, without the need for additional dependencies.
Due to being written in Go language, the system requirements are consistent with the latest Go The language requirements for the system and platform are consistent, please refer to Reference for details Golang System requirements.
You can access GitHub's Release Download the latest version of Client and server binaries from the page. All files are packaged in a compressed file, which also includes a complete description of Configuration parameters.
frpc
to the machine where the internal
network service is located
frps
to have a public IP address Address the
machine and place them in any directory.
/ Frps - c/ Frps. toml
.
/ Frpc-c/ Frpc. toml
.
supervisor
.
If you are a Windows user, you need to execute the same command in the command prompt
For information on how to write a Configuration file, please refer to nc The content in theExamplesection.
Please refer to the complete Configuration item description The content in Reference.
此Example演示如何在 Linux 系统下Use systemd 来管理 frps 服务,包括启动、停止、Configuration后台运行和设置开机自启动。