如何在Linux上配置sing-box

如何在Linux上配置sing-box

安装方法:

  • Debian / DEB:
bash <(curl -fsSL [https://sing-box.app/deb-install.sh](https://sing-box.app/deb-install.sh))
  • Redhat / RPM
bash <(curl -fsSL [https://sing-box.app/rpm-install.sh](https://sing-box.app/rpm-install.sh))
  • Archlinux / PKGArchlinux / PKG操作系统
bash <(curl -fsSL [https://sing-box.app/arch-install.sh](https://sing-box.app/arch-install.sh)

启动

# 启动服务
systemctl start sing-box.service
# 查看启动状态
systemctl status sing-box.service
# 设置开机启动
systemctl enable sing-box.service
# 运行 -c 指定一个配置文件
sing-box run -c /etc/sing-box/config.json
项目路径
程序/usr/bin/sing-box
配置/etc/sing-box/config.json
工作目录/var/lib/sing-box
服务文件/etc/systemd/system/sing-box.service
热载systemctl reload sing-box
重启systemctl restart sing-box
状态systemctl status sing-box
查看日志journalctl -u sing-box -o cat -e
实时日志journalctl -u sing-box -o cat -f

卸载:

  • Debian/Ubuntu
# --purge会把配置也删除,保留配置请移除该参数
sudo systemctl stop sing-box.service
sudo systemctl disable sing-box.service
sudo dpkg --purge sing-box
  • CentOS/Fedora
# --allmatches会把配置也删除,保留配置请移除该参数
sudo systemctl stop sing-box.service
sudo systemctl disable sing-box.service
sudo rpm -e --allmatches sing-box
  • Archlinux
# -n参数会把配置也删除,保留配置请移除该参数
sudo systemctl stop sing-box.service
sudo systemctl disable sing-box.service
sudo pacman -Rn sing-box

通过docker安装:

配置目录映射到宿主机: /etc/sing-box 目录下

  1. 安装docker
sudo curl -fsSL https://get.docker.com | bash -s docker
  1. 启动docker
sudo systemctl start docker
  1. 新建docker-compose.yaml配置文件
mkdir ~/sing-box
cat <<EOF> ~/sing-box/docker-compose.yaml
version: "3.8"
services:
  sing-box:
    image: ghcr.io/sagernet/sing-box
    container_name: sing-box
    restart: always
    volumes:
      - /etc/sing-box:/etc/sing-box/
    command: -D /var/lib/sing-box -C /etc/sing-box/ run
EOF
  1. 运行
cd ~/sing-box
docker-compose up -d
  1. 卸载
docker-compose down
rm -rf /etc/sing-box
  • 10
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
sing2img是一款创新的应用程序,它允许用户通过歌唱来创建图像。这个应用的原理是使用人工智能技术来将用户的歌声转化为图像。当用户唱歌时,sing2img可以分析歌声的频率、波形和情感,然后将这些数据转化为图像。这个图像可以是一个抽象的艺术品,也可以是一个代表歌曲内容的具体形象。 使用sing2img有许多有趣的应用场景。首先,它可以为歌手和音乐制作人提供创作灵感。唱歌创作是很多音乐家的常用方法,而现在有了sing2img,他们可以通过歌声创作出独特的视觉图像,这可以激发他们的创造力。 此外,sing2img还可以用于艺术表演和展览。一位歌手可以在舞台上唱歌,而观众可以通过屏幕看到他们的声音被转化为图像。这不仅可以增强观众的视听体验,还可以给他们带来更多沉浸感。 sing2img还可以用于音乐教育。对于想要学习唱歌的人来说,这个应用可以帮助他们更好地理解和掌握音乐。通过将歌声转化为图像,学生们可以更直观地感受到音乐的要素,如音调、节奏和情感。 总的来说,sing2img是一个具有创新和实用价值的应用程序。它不仅可以为音乐创作带来新的灵感,还可以为艺术表演提供更多元化的内容,同时也可以用于音乐教育。相信随着人工智能技术的进一步发展,sing2img将会在音乐界和艺术界发挥更大的作用。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

扶苏如是

谢谢你这么优秀还支持我~

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值