September blog zh-CN "September blog" was established on September 15, 2016 (named September) website: , this site is non-commercial site, non-profit nature, for September personal blog. Most of them record life, personal feelings and some technical abstracts, or reprint and share some interesting things. Mon, 07 Jun 2021 20:38:00 +0800 Mon, 07 Jun 2021 20:38:00 +0800 Linux installing Python Mon, 07 Jun 2021 20:38:00 +0800 September




 tar -xf Python-3.9.5.tgz cd Python-3.9.5

Compile and install

 ./configure && make && make install

Wait patiently...

Check whether the version is installed successfully

 python3 -V

Establishing a soft link

At the end of the compilation, the program is usually installed in the /usr/local/bin lower
If Python - V does not display the version, create a soft link, which takes effect globally
Soft connection

 ln -s /usr/local/bin/python3.9 /usr/bin/python ln -s /usr/local/bin/python3.9-config /usr/bin/python-config

PIP command error

-bash: pip: command not found

Solution (CentOS version)

Download PIP script


Python executes PIP script installation


View PIP version

 pip -V

Uninstall Python 3

 rpm -qa|grep python3|xargs rpm -ev --allmatches --nodeps

Delete all remaining files

 whereis python3 |xargs rm -frv

View an existing installation of Python

 whereis python
It's windy - you can buy hot noodles with coupons Thu, 06 May 2021 21:43:00 +0800 September After the author (who buys spicy strips also uses coupons) to get the copyright, he always feels that there is something missing.

Suddenly heard this song, let me suddenly recall that summer

Think of the past, is also a lot of emotion, but as time goes by

Lossless - the first version of the 18 years of feeling:: (HA HA)

{MP3 name = "lossless - first version" URL=“ You can buy hot pepper with coupons. FLAC "cover =" ?param=130y130" theme="#404040" autoplay="autoplay"/}

{cloud title = "download song - windy" type = "default" URL=“ You can buy hot pepper with Coupons - it's windy. FLAC "password] /}

Record enterprise wechat parameters Wed, 14 Apr 2021 15:17:00 +0800 September parameter explain Access method AgentId Application ID Application interface corpsecret Application key Application interface corpid Enterprise ID Bottom of my business touser Member ID / account number @All represents all members of the enterprise media_ id Image media file ID Online access is valid for 3 days

F12 get media_ id

Management tools - Material Library - upload an image - F12 find the image URL. Request the media in the address_ id

Updated down driver Wed, 07 Apr 2021 18:26:00 +0800 September Just download AI software, open the prompt Video: NVIDIA geforce 850, unsupported video driver

According to the repair tips, updated the next driver, perfect solution

NVIDIA driver download

Just search. This is mine

When installing, choose the second one. I don't know how the first one will fail.

After installation, open AI, no prompt, click Help - system compatibility report - no conflict

Before OBS monitor capture, does not display the image, according to the online tutorial operation can not solve

Through this update It's amazing that OBS works

But still need simple settings, desktop right-click NVIDIA panel - manage 3D - program settings - Custom OBS - integrated image

QAQ: window capture chrome does not display
Chrome can turn off the hardware and speed up the restart

Local projects are uploaded to GitHub via GIT Fri, 02 Apr 2021 16:14:00 +0800 September Download git installation
Install it by default, and then open the menu bar git bash

First installation configuration

 #Configure mailbox with the same account name git config --global “Your_ github-Username” git config --global “Your_ github-email” #View user name mailbox git config git config #You can also view the user's mailbox directly vim ~/.gitconfig : Q exit

Create SSH key
Since the transmission between the local git warehouse and GitHub warehouse is encrypted through SSH, you need to set it up when connecting

First look at your C disk user directory under the. SSH directory Hidden (C: users user name)
If yes, see if there is. SSH Private key ID_ RSA and public key ID_ These two files, if any, will jump to the next step. If not, they will be created by the following command

 ssh-keygen -t rsa -C "your_ github-email"

Just go back a few times

GitHub setting SSH key
Login to GitHub New SSH key

title content
Title Fill in as you like, for example, GIT
Key Generated: ID_

Create empty warehouse (for uploading)

Other orders

git rm -r --cached .
Delete all files in the cache (note that if there is a space, if you change. To a file name, you will cancel a file)

Git upload

The remote warehouse is empty

(new warehouse, no readme. MD)

1. CD to the directory to be uploaded (local warehouse)
For example, in the test folder, PWD can view the current location

2. Initialize the local warehouse

 git init

A. Git folder will be created under the current test directory
This means making this folder a git manageable repository, a local repository that git uses to track and manage version libraries

3. Associate remote warehouse

 Git remote add origin GitHub warehouse HTTPS address

4. Add file to cache

 Git add. / / all contents in the current directory Git add user / / specify a file or folder Git status / / view cache file

(note that there is a space in this "." means that all the tests are submitted in this folder. You can also submit the specified file by git add

5. Submission instructions

 git commit -m 'first commit'

-The quotation mark after M is the comment content submitted this time. If it is not filled in, an error will be reported

6. Upload


 Git branch XXX / / create branch Git branch - A / / view branch Git checkout XXX / / switch branches
 git push -u origin master

The remote warehouse is empty, so the parameter - u should be added to push the cached file to the master branch of GitHub warehouse

Remote warehouse is not empty

(old warehouses, including those without records)

1. Clone remote warehouse (download)

 Git clone warehouse address

2. CD to clone repository
➽ the cloned repository contains a. Git folder, which does not need git init initialization and associated remote repository address

3. Add file to cache

 Git add. / / all contents in the current directory Git add user / / specify a file or folder Git status / / view cache file

4. Submission instructions

 git commit -m 'first commit'

5. Upload

 git push origin master

Delete warehouse file

Local and remote deletion

 Git clone warehouse address //There is something to ignore Git RM file / / will be deleted locally Git RM - R folder / / will be deleted locally Git RM - RF. / / all local files will be deleted Git commit - M 'delete a file' git push origin master

If you do not want to delete the local file, only delete the corresponding part of the cache, add --cached

Delete remote warehouse only

 Git clone warehouse address //There is something to ignore Git RM -- cached file / / will not be deleted locally Git RM - R -- cached folder / / will not be deleted locally Git RM - RF -- cached. / / all local files will not be deleted Git commit - M 'delete a file' git push origin master

Nginx + RTMP live streaming server Thu, 11 Mar 2021 15:50:39 +0800 September

This article is based on the pagoda panel

Uninstall nginx

The configuration of nginx RTMP and nginx is different, and the installation of nginx RTMP is not supported in the pagoda panel

Pre download nginx

 cd /www/server git clone #Git Error installing git: Yum - y install Git

Modify configuration (pay attention to format)

 vim /www/server/panel/install/

Add module: --add-module=/www/server/nginx-rtmp-module

Install nginx (a long time, can cooperate with screen)

 sh /www/server/panel/install/ install 1.18

Create a website and remember the site directory

Modify nginx configuration

Setup configuration modification about 13 lines added

 rtmp { server { listen 6666; # Monitor the port, randomly change, after replacement remember square corresponding port chunk_ size 4000; application hls { live on; hls on; hls_ path /www/wwwroot/; # This is the live folder path hls_ fragment 5s; } } }

Overload, restart nginx

Push flow

Streaming address: rtmp://IP :port/hls

Play address: http://IP/live/ Streaming key.m3u8

The streaming key is set in the streaming client, such as obs

Firewall release port

This paper refers to: 35774849/article/details/106334115

Common commands of docker Fri, 05 Feb 2021 20:25:00 +0800 September Some basic commands are collected on the network

Docker installation:

Container management

View container name

 docker ps -a

Enter the container terminal

 docker exec -it name bash

Export a file of container

{alert type="success"}
Example: container name D, file name, path in / Python /
Export in container d to / root

Execute under root

 docker cp d:/python/ /root


Version query
docker -v

systemctl start docker

Boot up
systemctl enable docker

stop it
systemctl stop docker

systemctl restart docker

View status
systemctl status docker

Docker container directory
cd /var/lib/docker/containers


View all containers ා view all running containers
docker ps -a #docker ps

Stop a container
docker stop containerID

Start a container
docker start containerID

Restart a container
docker restart containerID

Stop all containers
docker stop $(docker ps -a -q)

Delete a container
docker rm containerID
Docker RM - F containerid ා force deletion

Delete all containers
docker rm $(docker ps -a -q)
Docker RM - f $(docker PS - A - Q) ා force deletion


View image
docker images
delete mirror
docker rmi imageID
Delete all mirrors
docker rmi $(docker images -q)

Record the docker installation record Thu, 04 Feb 2021 13:00:00 +0800 September Official one click installation script! Linux system support!
Common commands:

 curl -sSL  | sh curl -fsSL  | bash -s docker --mirror Aliyun #Start systemctl start docker #Self priming systemctl enable docker

Chinese version of portal

Create directory

 mkdir -p /data/portainer/data /data/portainer/public cd /data/portainer



Unzip to public



 docker run -d --restart=always --name portainer -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v /data/portainer/data:/data -v /data/portainer/public:/public portainer/ portainer:latest

Initialize configuration via IP: 9000


 curl -L `uname -s`-`uname -m` -o /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose

1.29.1 Is the version number of docker compose. More versions can be referred to

Determine whether the installation is successful

 docker-compose version

Boot up

If you want the docker compose container to start automatically, you need to create a startup script

Create a new one script
The script content is

 docker-compose -f /export/docker/docker-compose-nginx.yml up -d

-f /export/docker/docker-compose-nginx.yml Is the configuration file that specifies docker compose

Put the written script (. SH) in the directory /etc/profile.d/ After the system starts, all shell scripts in the directory will be executed automatically.


 #Query installed packages [root@ ~]# yum list installed | grep docker docker-ce-cli.x86_ 64             1:20.10.2-3.el7                @docker-ce-stable #Uninstall docker-ce-cli.x86_ sixty-four [root@ ~]# yum -y remove docker-ce-cli.x86_ sixty-four

Finally, delete the container image
rm -rf /var/lib/docker

Convert video to character video through Python Mon, 21 Dec 2020 20:11:00 +0800 September {dplayer src=" " /}


  1. Export each frame of the video
  2. Convert each frame of picture into ASCII code
  3. The converted ASCII image is synthesized into video

For Python installation, refer to this article

Libraries to install for Python


 pip3 install opencv-python


 pip3 install pillow

After installing the library, place the video in the PY script folder and modify it video_ path After the parameter for your video path name can be run

 if __ name__ == '__ main__': video_ path = 'video/heiren.mp4' save_ pic_ path = 'cache_ pic' save_ charpic_ path = 'cache_ char'

The default exported video is .avi Format, you can modify about 107 lines of code, such as MP4

 video_ writter= VideoWriter('video/new_ char_ video.mp4' ,

source code painting

Final explanation

The script does not deal with audio and can be processed by other software.

Windows install Python Sun, 20 Dec 2020 18:52:00 +0800 September Python installation

Download the python program from the official website to install it. Check the two option boxes below, and then click Customize installation Go to the next step
Add Python.. to path ා add environment variable

take Install for all users Check the option, and the other options can be kept by default. Click browse, select the installation directory according to your needs, and click Install to install

Partial order

CMD Window execution

  1. python -V View version
  2. where python View installation location
  3. PIP list or pip freeze View installed Libraries
  4. PIP install library name Uninstall installed Libraries
  5. pip list --outdated View updatable third party libraries
  6. PIP install -- upgrade library name update library

If it appears Not an internal or external command See if the system variable is added. Generally, the system variable will be added automatically
Path: my computer - properties - advanced system settings - environment variables - system variables - path

Pip is slow to install the library?

The libraries we install are all downloaded from foreign sources. Sometimes the download is only tens of KB / s for lines and other reasons. We can switch the source to China to download.

Commonly used PIP domestic sources:

 Alicloud China University of science and technology Douban Tsinghua University University of science and technology of China

Use the - I parameter
For example:

 PIP install library name - I