# Linux安装 ## 下载 前往[https://github.com/helloxz/GoPower/releases](https://github.com/helloxz/GoPower/releases)下载您对应操作系统的最新版本并解压到任意目录。 ## 安装 进入GoPower所在目录下,执行下面的命令(需要`root`权限): ```bash #添加执行权限 chmod +x GoPower #初始化GoPower ./GoPower init ``` ## 修改配置文件 配置文件在当前目录下的`config.ini`内容如下: ``` [servers] port = :886 RunMode = debug webui = off [infos] key = xxxxxxxx ``` * `port = :886`运行端口,默认为886端口,可自行修改 * `RunMode = debug`是调试模式,正式环境建议改成`release` * `webui = off`是否开启WEBUI,一般情况下多台内网计算机安装了GoPower的情况下只需要一台机器开启WEBUI即可 * `key = xxxxxxxx`密钥参数,这个请务必设置一个复杂的字符串,后续调用接口需要 ## 放行端口 请根据自身使用的防火墙放行GoPower所使用的监听端口(默认`886`) ```bash #如果使用的firewalld firewall-cmd --zone=public --add-port=886/tcp --permanent firewall-cmd --reload #如果使用的ufw ufw allow 886 ``` ## 启动GoPower ```bash #启动 systemctl start gopower #停止 systemctl stop gopower #重启 systemctl restart gopower #查看状态 systemctl status gopower #设置开机启动 systemctl enable gopower ``` ## 访问 如果您配置中开启了WEBUI,访问[http://localhost:886/](http://localhost:886/)会看到WEB界面 ![](https://img.rss.ink/imgs/2022/09/27/94231799237f570e.png)