Qinglong panel 2.8+Ninja code scanning + xdd code scanning compilation and deployment

The set of tutorials includes Qinglong panel2.8+Ninja code scanning +xdd compilation and deployment (realizing qq notification instruction upgrade, etc.) + mutual aid code setting + script dependency

After the tutorial, just pull the library directly! Tutorial is to install Qinglong server! If you have failed to install, go to the server console and choose to replace the operating system CentOS Version changed to 7.7 or 7.8 in the new installation

First, open port 5700 5701 in the server security group Of which 8080 are xdd scan code 5701 is ninja scanning code 5700 is a panel Server console - Security Group - entry direction - add manually Authorization policy priority protocol type port range authorization object Allow 1 to customize TCP destination: 8080 / 8080 source: 0.0.0.0/0 Allow 1 to customize TCP destination: 5701 / 5701 source: 0.0.0.0/0 Allow 1 to customize TCP destination: 5700 / 5700 source: 0.0.0.0/0

Section 1 installation of 2.8 panel

Step 1 installation docker,docker-compose.

Install docker and copy the input in the following order

sudo yum check-update

curl -sSL https://get.daocloud.io/docker | sh

sudo systemctl start docker

sudo systemctl status docker

sudo systemctl enable docker

Step 2: install docker compose

sudo curl -L "https://ghproxy.com/https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

chmod +x /usr/local/bin/docker-compose

Create a directory (such as ql) under the root folder, and create docker compose yml Fill in the following

version: "3"
services:
  qinglong:
    image: whyour/qinglong:latest
    container_name: qinglong
    restart: unless-stopped
    tty: true
    ports:
      - 5700:5700
      - 5701:5701
    environment:
      - ENABLE_HANGUP=true
      - ENABLE_WEB_PANEL=true
    volumes:
      - ./config:/ql/config
      - ./log:/ql/log
      - ./db:/ql/db
      - ./repo:/ql/repo
      - ./raw:/ql/raw
      - ./scripts:/ql/scripts
      - ./jbot:/ql/jbot
      - ./ninja:/ql/ninja
    labels:
      - com.centurylinklabs.watchtower.enable=false

Save and exit. In the command line, cd into docker-compose The folder where YML is located, execute the command cd ql

docker-compose up -d

Then log in to ip:5700 and the panel installation is completed

Section II installation ninja

Enter the container ql as the container name, and the machine container name in this article is qinglong

docker exec -it qinglong bash

In order to crack down on proxy hanging, the boss limited the number of code scanning to 40. I feel a little less.. So I changed it to a very comfortable number Input one by one

git clone https://ghproxy.com/https://github.com/MoonBegonia/ninja.git /ql/ninja

cd /ql/ninja/backend

pnpm install

pm2 start

cp sendNotify.js /ql/scripts/sendNotify.js

Open extra. In the Qinglong configs folder SH file Paste in the following.

cd /ql/ninja/backend
git pull -f
pnpm install
pm2 start
cp sendNotify.js /ql/scripts/sendNotify.js

Environment variable modification account number addition Copy and paste codes in order

docker exec -it qinglong bash

cd /ql/ninja/backend

cp .env.example .env

Found in root/ql/ninja/backend env files are saved with modifications as needed.

Execute the command after modifying the file

pm2 start

Since then, Ninja code scanning installation is completed, and then log in to ip:5701

matters needing attention After restart, be sure to execute ql extra once to ensure the successful configuration of Ninja.

Ninja update method Then open the final shell and copy and paste the code in order

docker exec -it qinglong bash

cd /ql/ninja/backend

git pull

pm2 start

Section 3 compilation and deployment of new version xdd

1.root permission

sudo -i

2.local directory Download

If you can't get it, download it locally, and then upload the compressed package to the server. Note that the file directory should not be changed. usr/local

cd /usr/local && wget https://golang.google.cn/dl/go1.16.7.linux-amd64.tar.gz -O go1.16.7.linux-amd64.tar.gz

3. Decompression

tar -xvzf go1.16.7.linux-amd64.tar.gz

4.etc/profile open the last line of the file according to this path, copy the following variables, paste them and save them.

export GO111MODULE=on
export GOPROXY=https://goproxy.cn
export GOROOT=/usr/local/go
export GOPATH=/usr/local/go/path
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin

4.1 (omitted in step 4)

Open the file, set the environment variables, enter "i" to edit the file, enter the above variables in the last line, and copy them all. vi /etc/profile After entering, press "Esc", then Enter ": wq", press "Enter", save and exit.

5. Input in sequence

source /etc/profile

go env

6. Laku installation xdd

cd ~ && git clone https://ghproxy.com/https://github.com/cdle/xdd.git At this time, a new folder xdd will be added in your ql directory. Refresh it if you don't have it If the Laku reports an error, execute this one first. There is no problem executing the above Laku. This step is ignored yum install git -y

7.cd to xdd directory and start compiling. Wait a minute and let it run for a while

cd /root/xdd && go build If Laku reports an error, cgo: exec gcc: exec: "gcc": executable file not found in $PATH Execute this first, and then execute the pull Library above. No problem. This step is ignored

yum install gcc -y

8. Look at 8.1

9. Give permission

chmod 777 xdd

10. Initialize and generate configuration file

./xdd

11.Ctrl+C background hang up

nohup ./xdd &

8.1 format and function of configuration file

Open the conf folder and see the app Conf and config yaml app.conf modify the JDC front-end port number according to your preferences config.yaml edit corresponding data If you are a Qinglong user, just fill in the panel address, user name and password. Note for the following input: one space is left blank

mode: balance #Mode balance, parallel
containers: #Container, multiple can be configured
  - address: http://Your ip:5700 # Qinglong 2.2, Qinglong 2.8, v1v2v3v4v5 access address
    username: admin #user name
    password: Your panel password #password
    limit: 300 #user limit
    weigth: 3 #In the weight balance mode, the higher the weight, the more ck you get. The default value is 1
theme: ./theme/noodin.html #Custom theme, supporting local and network paths
static: ./static #Static files are convenient to introduce css, js and other files when customizing QR code pages
master:  #Administrator account pin, multiple spliced with '&'
database:  #Database location, default. / jdc.db
qywx_key:  #Enterprise wechat push key
daily_push: #Scheduled task
resident: #In the balanced mode, all containers share the same account pin, and multiple are spliced with '&'. It is not recommended to fill in this form, and the designated account assistance function will be realized later.
#Custom ua
user_agent:
telegram_bot_token: #telegram bot token
telegram_user_id: #telegrame user id
qquid:  #The qq number receiving the notification is not the q number scanning the code
qqgid:  #Monitored group
default_priority: #Default priority for new users
no_ghproxy: true #Whether the update resource does not use the proxy. The default is false
qbot_public_mode: false  #qq robot group chat mode, default private chat mode
daily_asset_push_cron: 10 8,20 * * * #Daily asset push time

Then log in to ip:8080 and all are completed There may be some small problems in the third step It's just a small problem. If you're not sure, go and ask

Qinglong 2.8 internal mutual aid tutorial

Download File https://wws.lanzoui.com/iQwfCspjazc Download File 2, unzip it and put it in the specified directory Add code Copy the SH script to the path in the container / ql/config/ Note: if task has not been configured before_ before. SH script, you can use the initialization template file provided by the attachment, and the copy path is also / ql/config /. If you have previously configured task yourself_ before. SH, please compare the last code of the text with the template by yourself. The function is to submit the mutual aid code and mutual aid rules to the activity script. If the content is missing, mutual aid exceptions may be caused.

Update the scheduled task rule of mutual aid code (add to the scheduled task):

Name: update mutual aid code

Command:

bash /ql/config/code.sh

Timing rules: 0 23 *

Installation dependency 1. It is applicable to the second generation of pet Wang and the second generation of pet Wang and prize of JDHelloWorld docker exec -it qinglong bash -c "cd scripts && npm i -S png-js"

2. Download File 3, unzip it and put the two folders in ql/scripts

All completed

Added by whitemoss on Wed, 23 Feb 2022 14:52:27 +0200