python's regular expression (re function, greedy and non-greedy)
We connect Linux to implement regular expressions
1. Python3 Regular Expressions
Regular expressions are a special sequence of characters that help you easily check if a string matches a pattern.
Python has added the re module since version 1.5 to provide Perl-style regular expression patterns.
The re module gives the Python language full ...
Posted by zrocker on Thu, 09 Apr 2020 10:48:30 -0700
Mongodb version 4.2 replica set configuration
Common replication sets
The common architecture of online environment is replica set, which can be understood as one master and many slaves.
Below: 1 master and 2 slave
Below: one master one slave one arbitration
Server information:
Three machines are configured with 2-core 16G memory storage disk 100G
"host" : "10.1.1.159:27020""host" : "1 ...
Posted by mojodojo on Thu, 09 Apr 2020 09:13:50 -0700
Migrate Express to function calculation
First of all, it introduces some important concepts in this paper:
Function calculation: function calculation is an event driven service. Through function calculation, users do not need to manage the operation of the server, just write code and upload. Function computing prepares computing resources and runs user code in an elastic and scalab ...
Posted by mariom on Tue, 07 Apr 2020 23:06:38 -0700
Run / bin/kibana to report fat error: listen eaddrnotavail 123.57.251.57:5601
Previous picture
FATAL Error: listen EADDRNOTAVAIL 123.57.251.57:5601
The configuration file is configured as follows:
[root@head-kib ~]# cd /usr/local/kibana-6.5.4-linux-x86_64/config/
[root@head-kib config]# vim kibana.yml
server.port: 5601
server.host: "123.57.251.57"
elasticsearch.url: "http://192.168.246.234:9200 "ාes node
kibana.in ...
Posted by blackcode on Mon, 06 Apr 2020 08:45:55 -0700
What should I do if nginx is too low to close? One move to smooth upgrade
1. View the existing nginx compilation parameters
I'm here with 1.16.0 Upgrade to 1 for example.16.1(Compiled and installed)
[root@localhost ~]# /usr/local/nginx/sbin/nginx -V
nginx version: nginx/1.16.0
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC)
built with OpenSSL 1.0.2k-fips 26 Jan 2017
TLS SNI support enabled
configure arg ...
Posted by SsirhC on Mon, 06 Apr 2020 07:48:47 -0700
kubernetes service discovery plug-in CoreDNS (operation and maintenance technology exchange group: 926402931, welcome to exchange together.)
Catalog
1. Deployment list of Intranet resources of kubernetesubernetes
2. Configure dns resolution
3. Browser visit k8s-yaml.od.com
4. Download docker image and upload it to harbor warehouse
5. Prepare resource allocation list
6. Application resource allocation
7. Check the created resources
8. Verify coreDNS
1. Deployment list of Intranet ...
Posted by xcasio on Mon, 06 Apr 2020 07:19:53 -0700
Deploy Rabbitmq cluster
1, Deploy Rabbitmq clusterRabbitmq cluster can be divided into two ways:1. Normal mode: the default cluster mode. The message body only exists on one node;2. Mirror mode: make the required queue into a mirror, which exists in multiple nodes.ha-mode: all: queue to all nodes; exatly: randomly mirror to other nodes; nodes: mirror to the speci ...
Posted by surreal5335 on Mon, 06 Apr 2020 01:22:08 -0700
Realizing the snapshot backup function of "copy on write" based on rsync and ln
1, Fundamentals
Here, "copy on write" is enclosed with a quotation mark, because this is specifically for the copy on write effect when rsync backup is used, rather than the actual copy on write effect. Its purpose is as follows:
After backing up the data using rsync, create a snapshot immediately:
The data state of the snapsh ...
Posted by primuz on Mon, 06 Apr 2020 00:17:49 -0700
Automatically restart pending python scripts
Run the program, because of memory problems or other blabla blabla problems (not code problems altogether), the program may hang up occasionally, and we can't stare at the program all day. What can we do?It's a good idea to write a script to check if the program hangs up and restart if it does, depending on the operat ...
Posted by besly98 on Sun, 05 Apr 2020 19:41:44 -0700
linux Installation of nginx, jdk, redis
Because the project needs to apply for a new server, it is necessary to reconfigure the environment.
nginx installation:
One click installation of four dependencies:
yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel
Enter / usr/local/src directory and create nginx folder
cd /usr/local/src
mkdir nginx
Enter the nginx ...
Posted by jasonman1 on Sun, 05 Apr 2020 14:12:46 -0700