Docker quickly set up master-slave + sentry monitoring

Install Redis Execute command My official group Click here . docker pull redis Deployment plan Start three machines, 6379 container as master node, the rest as slave node Start preparations   directory structure ├── conf │ ├── redis_6379.conf │ ├── redis_6380.conf │ ├── redis_6381.conf │ ├── sentinel_26379.conf │ ├── sentinel_26 ...

Posted on Mon, 11 May 2020 10:06:36 -0400 by Angry Coder

One of the shell scripts: Introduction to shell scripts

1. Introduction to shell scripts (1) Script cases and introduction: #!/bin/bash LOG_DIR=/var/log ROOT_UID=0 if ["$UID -ne "$ROOT_UID"] then echo "must be root run this script." exit 1 fi cd $ LOG_DIR || { echo "cannot change to necessary directory" exit 1 } cat /dev/null>message && { echo "logs cleane ...

Posted on Mon, 27 Apr 2020 14:02:53 -0400 by zeodragonzord

How to realize seamless bitstream cutting in Android

Mode 1: 1. Generally, it is a switching mode. For example, when the system player switches the code stream, first Stop, then Create Player, then onPrepare, and then Start Mode 2: 2. In fact, there is also a seamless switching code stream. If it is a single instance player, click to switch the code stream without destroying the player, just paus ...

Posted on Fri, 24 Apr 2020 08:56:12 -0400 by ethosadvisory

Enable or disable SSH for a specific user or user group

What is SSH? The full name of openssh is OpenBSD Secure Shell. Secure Shell (SSH) is a free and open-source network tool, which enables us to access remote hosts in an insecure network by using Secure Shell (SSH) protocol. It adopts client server architecture (C/S), which has the functions of user identity authentication, encryption, file tra ...

Posted on Tue, 24 Mar 2020 03:22:07 -0400 by sxiix

Python 3 flask framework learning notes

Summary: this chapter mainly records the operation of templates, static files and cookies in the Flask framework Template 1 The main function of the Flask view function is to respond to HTTP requests. When responding to a page, if you escape and splice the page content by string, it may cause unnecess ...

Posted on Tue, 25 Feb 2020 06:19:26 -0500 by gpittingale

How to use EasyPermissions

Starting with Android 6.0 (API level 23), users begin to grant permissions to applications when they are running, rather than when they are installed. System authority can be divided into two types: normal authority and dangerous authority -Normal permissions do not directly bring risks to users' privacy. If your app lists a n ...

Posted on Sat, 04 Jan 2020 07:05:47 -0500 by blanius

Configure NFS network storage as the back-end storage of cinder

Install cinder and nfs yum install -y openstack-cinder yum install cifs-utils Configuring nfs on the controller node [root@controller ~]# mkdir -p /data/nfs #Create a directory to share mount resources [root@controller ~]# cat /etc/exports /data/nfs *(rw,sync,root_squash) #The configuration file of NFS service program is / etc / exports sync, ...

Posted on Sat, 23 Nov 2019 11:41:57 -0500 by ksimpkins

How to integrate google/pprof into existing services?

Last week, I received the R & D requirements from the leaders and wrote a monitoring service monitor server to analyze the status of the services registered in etcd. Most of the services in the project have introduced the pprof library. To view the / debug/pprof of these services, you only need to go through one layer of proxy. Here, use th ...

Posted on Mon, 04 Nov 2019 04:55:18 -0500 by dgudema

Effect and Effect of PostgreSQL Parameter search_path

A little familiarity with PG makes search_path useful, so there's no need to talk about its usage here. This article focuses on how it is handled in the program. 1. Definition of GUC parameters This is a config_string parameter { {"search_path", PGC_USERSET, CLIENT_CONN_STATEMENT, gettext_noop("Sets the schema search order for names that ...

Posted on Wed, 18 Sep 2019 19:50:19 -0400 by NZ_Kiwis

Change Software Source

1. Reasons Linux systems install and update most software through the package manager, which downloads packages from the server (software source).Most software sources on Linux systems are foreign addresses and access speed is slow. Changing the software source to domestic source can greatly improve the speed of software download and update. 2. ...

Posted on Fri, 12 Jul 2019 12:50:29 -0400 by Basdub