Docker installation and several commands

Install docker sudo apt-get update sudo apt-get install docker-ce Start docker sudo systemctl enable docker sudo systemctl start docker Set up docker user group By default, the docker command uses Unix socket to communicate with the docker engine. Only root and docker group users can access the Unix socket of docker engine. For security reaso ...

Posted on Wed, 06 Nov 2019 22:55:20 -0800 by dickey

select multiple IO transfer

Principle = ====: monitor, client connection and data communication events with the help of kernel and select. correlation function Void FD zero (FD set * set); -- clears a set of file descriptors. fd_set rset; FD_ZERO(&rset); Void FD set (int FD, FD set * set); -- add the file descriptor to be monitored ...

Posted on Wed, 06 Nov 2019 15:10:10 -0800 by adavis

Use lsof instruction in terminal to quickly view port information

Sometimes we need to know which port is being used by which process / application in the computer. At this time, we need a very convenient instruction: lsofThe command lsof means list open files. In unix system, everything is file, including tcp/udp connection.Example: lsof -n -P -i TCP | grep LISTENflag: -n refers to number instead of letter d ...

Posted on Fri, 01 Nov 2019 12:30:52 -0700 by riffy

Sed delete and add the up and down data of the specified row

Topic 1: delete the previous row and the next row data of the matching row 1. Delete the previous line and the next line of the matching line: sed -i -e '/string/{n;d}' -e '$!N;/\n.*string/!P;D' filename 2. Delete the previous line that matches the line of a specific character sed -i -e '$!N;/\n.*string/!P;D' filename 3. Delete the next line ...

Posted on Fri, 01 Nov 2019 11:35:46 -0700 by prue_

Understanding of pthread_cond_wait() usage

Pthread ﹣ cond ﹣ wait() is a method of linux multithreading synchronous implementation, which means waiting for a certain thread shared variable to meet a certain situation. The thread can continue to execute the code after pthread \ \ cond \ \ wait(), as shown in the following example code section, the code in the t ...

Posted on Thu, 31 Oct 2019 21:28:06 -0700 by crazy_carl

[series] go in API routing middleware signature verification

Catalog overview MD5 combination AES symmetric encryption RSA asymmetric encryption How to call? performance testing How do PHP and Go encryption methods communicate? Source address Go in API series overview First, synchronize the following project ove ...

Posted on Sat, 26 Oct 2019 02:54:35 -0700 by zhangy

Introduction to MySQL common functions

Preface: Mysql database provides a lot of functions, such as our common aggregate functions, date and string processing functions. These functions can be used in the SELECT statement and its conditional expression. The functions can help the user to process the data in the table more conveniently and make the MySQL database more powerful. This ...

Posted on Thu, 24 Oct 2019 23:15:05 -0700 by rocksolidhq

Files.walkFileTree traverses directory files

java.nio.file.Files.walkFileTreeyesJDK7New static tool method. Files.walkFileTree Introduction to the principle of static Path walkFileTree(Path start, Set<FileVisitOption> options, int maxDepth, FileVisitor<? super Path> visitor) throws IOException; static Path walkFileTree(Path start, FileVisitor<? super Path> visitor) thro ...

Posted on Wed, 23 Oct 2019 02:17:53 -0700 by hhisc383

Process command pstree

Command pstree Source software: psmisc Abbreviation: processes tree Purpose: display process tree Syntax:] (pstree [options] Options: -a, --arguments displays the complete instructions for each program, including path, parameter, or resident service identifier -A, --ascii draws a tree using ASCII lines -U, --unicode drawing tre ...

Posted on Sat, 19 Oct 2019 11:13:12 -0700 by alwoodman

Kerberos+LDAP+NFSv4 for single sign on (middle)

Kerberos+LDAP+NFSv4 for single sign on (middle) V. installation of nfs server1. Install NFS kernel serverroot@debian:~# apt-get install nfs-kernel-server nfs-common Modify the / etc / default / NFS kernel server filetakeNEED_SVCGSSD=""Change toNEED_SVCGSSD="yes" Restart NFS kernel server root@debian:~# /etc/init.d/nfs-kernel-server stop root@d ...

Posted on Sat, 19 Oct 2019 00:14:59 -0700 by onlinegamesnz