Linux builds Qinglong panel to realize simple functions

Posted by daniel244rock on Sun, 06 Feb 2022 08:32:53 +0100

Demo environment

Beijing Tencent cloud lightweight application server1h2g

Operating system CentOS 7.6 64bit

Install pagoda

The visual management Linux of pagoda panel is installed only for convenient operation.

Official installation tutorial: https://www.bt.cn/bbs/thread-19376-1-1.html

Centos installation command

yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh

Install Docker

With a pagoda panel, you can directly install Docker manager in the software store

No pagoda panel needs to be installed with command in ssh terminal

Update yum package

sudo yum update

Install yum Toolset

yum install -y yum-utils

Install the yum source for docker

yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

Install docker CE

yum install docker-ce

View docker service status

systemctl status docker.service

Set docker self start

systemctl enable docker.service

Open docker service

systemctl start docker.service

Install Qinglong panel

Enter ssh terminal for operation

Pull the official image

docker pull whyour/qinglong:latest

Create container

docker run -dit \
  -v $PWD/ql/config:/ql/config \
  -v $PWD/ql/log:/ql/log \
  -v $PWD/ql/db:/ql/db \
  -v $PWD/ql/repo:/ql/repo \
  -v $PWD/ql/raw:/ql/raw \
  -v $PWD/ql/scripts:/ql/scripts \
  -p 5800:5700 \
  --name qinglong \
  --hostname qinglong \
  --restart unless-stopped \
whyour/qinglong:latest

Here, the 5800 written on the Qinglong panel port can be changed according to your own needs

After installation, you can enter the panel (ip:5800) to set basic information

Install Node

In order to facilitate the installation of Qinglong panel

Select installation location

cd /usr/local/bin/

#The address used here is / usr/local/bin/

Go to node Chinese website to get the download address

Address: http://nodejs.cn/download/

Click all installation packages - select the file copy and download link of Linux-x64

Obtained here is https://registry.npmmirror.com/-/binary/node/v16.13.2/node-v16.13.2-linux-x64.tar.gz

Download in ssh

wget https://registry.npmmirror.com/-/binary/node/v16.13.2/node-v16.13.2-linux-x64.tar.gz

Unzip the downloaded file

tar -xvf node-v16.13.2-linux-x64.tar.gz

Change folder name

mv node-v16.13.2-linux-x64.tar.gz Node.js

Enter the extracted folder

cd Node.js

Install dependent components

yum install gcc gcc-c++

Create file association

ln -s /usr/local/bin/Node.js/bin/node /usr/bin/node
ln -s /usr/local/bin/Node.js/bin/npm /usr/bin/npm
ln -s /usr/local/bin/Node.js/bin/npx /usr/bin/npx

Installation panel dependency

Enter Qinglong panel - select dependency management

New dependency

New dependency selection automatic split can be installed in batch

NodeJs
png-js
@types/node
require
typescript
crypto-js
prettytable
dotenv
jsdom
date-fns
tough-cookie
tslib
ws@7.4.3
ts-md5
jsdom -g
jieba
fs
form-data
json5
global-agent
js-base64
axios
Python3
requests
canvas
ping3
jieba
Linux
bizCode
bizMsg
lxml

Pull the warehouse and use it

New scheduled task - command

ql repo https://github.com/Annyoo2021/scripts.git "jd_|jx_|getJDCookie" "activity|backUp" "^jd[^_]|USER|utils"

#Special for JD hang up

Click Run to get script task

Set up hang up account

Add the name JD to the environment variable_ COOKIE

The value is pt_key=xxxxxxxxx; pt_pin=xxxxxxx;

Multiple account cookie s are separated by the & symbol

After setting, you can realize the simple JD hang up task