静看光阴荏苒
不管不顾不问不说也不念

ignite:一个漂亮的多用户SS/SSR面板

这个面板是基于Docker的,SS/SSR服务都是用Docker的方式去跑。前端很漂亮,但目前只支持单节点,有点鸡肋。适合开给朋友用或者自用。嫌麻烦可以用官方的Docker方式部署,我这边是手动部署,只要还有一口气,我就要折腾。。。

yum -y install wget curl nano sudo
yum -y groupinstall "Development Tools"

关防火墙:

systemctl stop firewalld
systemctl disable firewalld

安装Docker

curl -sSL https://get.docker.com/ | sh

将当前用户加到docker的组里面:

usermod -aG docker root

启动Docker:

systemctl start docker
systemctl enable docker

安装Nodejs:

curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
yum -y install nodejs

安装Yarn:

curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
yum -y install yarn

安装GO环境:

wget https://dl.google.com/go/go1.11.4.linux-amd64.tar.gz
tar -xzvf go1.11.4.linux-amd64.tar.gz -C /usr/bin

把Go的PATH写到账户配置文件:

echo "export PATH=$PATH:/usr/bin/go/bin" >> ~/.bash_profile
source ~/.bash_profile

构建ignite和ignite-admin:

cd /opt
mkdir -p /opt/ignite && export GOPATH=$PWD/ignite
go get github.com/go-ignite/ignite
mkdir -p /opt/ignite-admin && export GOPATH=$PWD/ignite-admin
go get github.com/go-ignite/ignite-admin

把项目的所有文件下载下来并把之前构建好的二进制文件移动到项目目录内:

wget https://github.com/go-ignite/ignite/archive/V1.4.tar.gz
wget https://github.com/go-ignite/ignite-admin/archive/V1.5.tar.gz
tar -xzvf V1.4.tar.gz
tar -xzvf V1.5.tar.gz
mv /opt/ignite/bin/ignite /opt/ignite-1.4
mv /opt/ignite-admin/bin/ignite-admin /opt/ignite-admin-1.5
rm -rf ignite && rm -rf ignite-admin && rm -rf V1.4.tar.gz && rm -rf V1.5.tar.gz
mv ignite-1.4 ignite && mv ignite-admin-1.5 ignite-admin

新建一个数据库存放目录,这边我是直接使用SQLite:

mkdir ignite/data

构建ignite-admin的前端资源:

cd ignite-admin/fe
yarn install
yarn build

复制一份ignite以及ignite-admin的配置文件:

cp /opt/ignite/conf/config-temp.toml /opt/ignite/conf/config.toml
cp /opt/ignite-admin/conf/config-temp.toml /opt/ignite-admin/conf/config.toml

编辑ignite的配置文件:

nano /opt/ignite/conf/config.toml

我的配置如下:

[app]
address = ":5000"

[db]
#driver = "mysql"
#connect = "root:@tcp(localhost:3306)/ignite?charset=utf8"
driver = "sqlite3"
connect = "./data/ignite.db"

[host]
address = "服务器公网IP地址"
from = 50000
to = 65535

编辑ignite-admin的配置文件:

nano /opt/ignite-admin/conf/config.toml

我的配置如下:

[app]
address = ":8000"

[db]
#driver = "mysql"
#connect = "root:@tcp(localhost:3306)/ignite?charset=utf8"
driver = "sqlite3"
connect = "../ignite/data/ignite.db"

[auth]
username = "imlala"
password = "管理员密码"
secret = "随便填"

复制systemd配置文件:

cp /opt/ignite/daemon/ignite.service /etc/systemd/system/ignite.service
cp /opt/ignite-admin/daemon/ignite-admin.service /etc/systemd/system/ignite-admin.service

编辑ignite的systemd配置文件:

nano /etc/systemd/system/ignite.service

修改为:

[Unit]
Description=ignite service
After=network.target

[Service]
WorkingDirectory=/opt/ignite
ExecStart=/opt/ignite/ignite
User=root  
Restart=always
KillMode=process
RestartSec=2s

[Install]
WantedBy=multi-user.target

编辑ignite的systemd配置文件:

nano /etc/systemd/system/ignite-admin.service

修改为:

[Unit]
Description=ignite-admin service
After=network.target

[Service]
WorkingDirectory=/opt/ignite-admin
ExecStart=/opt/ignite-admin/ignite-admin
User=root
Restart=always
KillMode=process
RestartSec=2s

[Install]
WantedBy=multi-user.target

启动服务:

systemctl start ignite
systemctl enable ignite
systemctl start ignite-admin
systemctl enable ignite-admin

访问前端地址:IP+端口5000
访问管理员后台:IP+端口8000

我在开通服务的时候会提示失败,解决办法如下:

首先停止systemd运行,然后直接./ignite运行,看一下报错的日志,提示如下:

字面意思是说我们创建的容器已经存在了,无法再创建,但是明明没有容器创建成功啊,我是第一次创建。那就看看:

docker ps -a

看到有一个容器没有启动成功,那么我们删除这个容器:

docker rm 容器ID

接着再在前端创建一个服务看看,这次报了一个很眼熟的错误:

这个应该是Docker在CentOS7上的一个BUG,我以前遇到过很多次,解决很简单,只要重启一下Docker的服务就好了。所以重复之前的步骤,最后重启Docker即可:

docker ps -a
docker rm 容器ID
systemctl restart docker

首页:

用户页:

赞(0)
未经允许不得转载:荒岛 » ignite:一个漂亮的多用户SS/SSR面板
分享到: 更多 (0)

评论 11

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #1

    https://github.com/go-ignite/ignite

    蓝爵薇2周前 (04-07) Google Chrome 69.0.3497.100 Google Chrome 69.0.3497.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
  2. #2

    安装成功了,谢谢老板 :neutral: :neutral: :neutral: 也没个扣扣群,我准备红包发一波 :!: :!: :!:

    大土豆子1周前 (04-12) Google Chrome 69.0.3497.100 Google Chrome 69.0.3497.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • = =

      LALA1周前 (04-12) Google Chrome 72.0.3626.121 Google Chrome 72.0.3626.121 Windows 10 x64 Edition Windows 10 x64 Edition回复
      • 建个QQ群吧 大佬。我也忍不住要发红包了 :mrgreen:

        Superman1周前 (04-12) Google Chrome 69.0.3497.100 Google Chrome 69.0.3497.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
        • 这个和QQ群差不多性质,可以来玩:https://chat.ohshit.fun/

          LALA1周前 (04-12) Google Chrome 72.0.3626.121 Google Chrome 72.0.3626.121 Windows 10 x64 Edition Windows 10 x64 Edition回复
  3. #3

    现在开始着手安装、阿里云香港 Centos7.3、保佑安装成功! :mrgreen:

    Superman1周前 (04-12) Google Chrome 69.0.3497.100 Google Chrome 69.0.3497.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 难受!!

      [root@SSR]# systemctl status ignite
      鈼[0m ignite.service – ignite service
      Loaded: loaded (/etc/systemd/system/ignite.service; enabled; vendor preset: disabled)
      Active: failed (Result: start-limit) since Fri 2019-04-12 16:52:46 CST; 2min 25s ago
      Process: 26726 ExecStart=/opt/ignite/executable (code=exited, status=203/EXEC)
      Main PID: 26726 (code=exited, status=203/EXEC)

      Superman1周前 (04-12) Google Chrome 69.0.3497.100 Google Chrome 69.0.3497.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • ignite-admin 正常。ignite 服务报错

      Superman1周前 (04-12) Google Chrome 69.0.3497.100 Google Chrome 69.0.3497.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 求救 lala大神。
      [root@SSR ignite]# ./ignite
      config: map[host_from:5001 host_to:6553 address::5000 db_driver:sqlite3 db_connect:./data/ignite.db host_address:47.244.14.198]
      [GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.

      [GIN-debug] [WARNING] Running in “debug” mode. Switch to “release” mode in production.
      – using env: export GIN_MODE=release
      – using code: gin.SetMode(gin.ReleaseMode)

      [GIN-debug] GET /static/*filepath –> github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (3 handlers)
      [GIN-debug] HEAD /static/*filepath –> github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (3 handlers)
      [GIN-debug] Loaded HTML Templates (6):
      – commonHeader.html
      – index.html
      – nav.html
      – panel.html

      – commonFooter.html

      Superman1周前 (04-12) Google Chrome 69.0.3497.100 Google Chrome 69.0.3497.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
      • 这个在正常运行,看看systemd的配置文件是不是哪里写错了。。

        LALA1周前 (04-12) Google Chrome 72.0.3626.121 Google Chrome 72.0.3626.121 Windows 10 x64 Edition Windows 10 x64 Edition回复
        • 已经搞好了 感谢lala大神。不能使用systemctl 启动。 ./ignite启动就好了

          Superman5天前 Google Chrome 69.0.3497.100 Google Chrome 69.0.3497.100 Windows 10 x64 Edition Windows 10 x64 Edition回复

分享创造快乐

广告合作资源投稿