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

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

首页:

用户页:

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

评论 25

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

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

    蓝爵薇6年前 (2019-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: 也没个扣扣群,我准备红包发一波 :!: :!: :!:

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

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

        Superman6年前 (2019-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/

          LALA6年前 (2019-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:

    Superman6年前 (2019-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)

      Superman6年前 (2019-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 服务报错

      Superman6年前 (2019-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

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

        LALA6年前 (2019-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启动就好了

          Superman6年前 (2019-04-15) Google Chrome 69.0.3497.100 Google Chrome 69.0.3497.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
  4. #4

    确实很漂亮,可以很长时间不玩了

    筑楼6年前 (2019-04-21) Safari 12.0 Safari 12.0 iPhone iOS 12.1.4 iPhone iOS 12.1.4回复
  5. #5

    wget https://dl.google.com/go/go1.11.4.linux-amd64.tar.gz://dl.google.com/go/go1.11.4.linux-amd64.tar.gz
    –2019-04-22 12:51:59– https://dl.google.com/go/go1.11.4.linux-amd64.tar.gz://dl.google.com/go/go1.11.4.linux-amd64.tar.gz
    Resolving dl.google.com (dl.google.com)… 173.194.73.190, 173.194.73.136, 173.194.73.93, …
    Connecting to dl.google.com (dl.google.com)|173.194.73.190|:443… connected.
    HTTP request sent, awaiting response… 301 Moved Permanently
    Location: /go/go1.11.4.linux-amd64.tar.gz:/dl.google.com/go/go1.11.4.linux-amd64.tar.gz [following]
    –2019-04-22 12:51:59– https://dl.google.com/go/go1.11.4.linux-amd64.tar.gz:/dl.google.com/go/go1.11.4.linux-amd64.tar.gz
    Reusing existing connection to dl.google.com:443.
    HTTP request sent, awaiting response… 404 Not Found
    2019-04-22 12:51:59 ERROR 404: Not Found.
    :arrow:

    liukirby6年前 (2019-04-22) Google Chrome 73.0.3683.103 Google Chrome 73.0.3683.103 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 你成功的把回复按钮给挤没了。

      LALA6年前 (2019-04-22) Google Chrome 72.0.3626.121 Google Chrome 72.0.3626.121 Windows 10 x64 Edition Windows 10 x64 Edition回复
      • 这是什么原因鸭?

        liukirby6年前 (2019-04-22) Google Chrome 73.0.3683.103 Google Chrome 73.0.3683.103 Windows 10 x64 Edition Windows 10 x64 Edition回复
  6. #6

    构建前端得时候出现这个是什么!难受他。T.T
    error Command failed with signal “SIGKILL”.
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

    MOONLIGHT6年前 (2019-05-01) Google Chrome 73.0.3683.103 Google Chrome 73.0.3683.103 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 你机器多少内存?应该是内存不够。

      LALA6年前 (2019-05-02) Google Chrome 72.0.3626.121 Google Chrome 72.0.3626.121 Windows 10 x64 Edition Windows 10 x64 Edition回复
      • 512的 :cry:

        MOONLIGHT6年前 (2019-05-08) Google Chrome 73.0.3683.103 Google Chrome 73.0.3683.103 Windows 10 x64 Edition Windows 10 x64 Edition回复
        • 感觉要1g内存才行,加个swap看看能不能强行怼过去。。

          LALA5年前 (2019-05-09) Google Chrome 72.0.3626.121 Google Chrome 72.0.3626.121 Windows 10 x64 Edition Windows 10 x64 Edition回复
  7. #7

    这个面板不错的样子~

    446年前 (2019-05-07) Google Chrome 74.0.3729.131 Google Chrome 74.0.3729.131 Windows 10 x64 Edition Windows 10 x64 Edition回复
  8. #8

    如果用国内VPS搭建的话 go get这个命令该如何规避呢? :smile:

    毛毛雨5年前 (2019-06-27) Google Chrome 75.0.3770.100 Google Chrome 75.0.3770.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 给终端设置代理,或者给git设置代理,go get也是通过git拉取文件的。

      LALA5年前 (2019-06-27) Google Chrome 74.0.3729.169 Google Chrome 74.0.3729.169 Windows 10 x64 Edition Windows 10 x64 Edition回复
  9. #9

    大佬问一下 安装好这套程序之后的前端资源文件放在哪个文件夹啊,想修改几个地方

    柊叶5年前 (2019-07-23) Google Chrome 75.0.3770.142 Google Chrome 75.0.3770.142 Windows 10 x64 Edition Windows 10 x64 Edition回复
  10. #10

    用什么系统安装,我老安装不下去 :razz:

    再来5年前 (2019-07-28) Google Chrome 75.0.3770.142 Google Chrome 75.0.3770.142 Windows 7 x64 Edition Windows 7 x64 Edition回复

分享创造快乐

广告合作资源投稿