• Basic tutorial of using mdadm command to operate raid in Linux


    Mdadm for building, managing and monitoring raid arrays Usage: mdadm –create device options…Using unused devices, create raid options,mdadm –assemble device options…Merge the RAID array you created earlier.mdadm –build device options…Create or merge a raid without metadata.mdadm –manage device options…Make changes to an existing arraymdadm –misc options… devicesReport or modify various MD related equipment.mdadm –grow options […]

  • Introduction to the battle of urlos – making lap Website Environment


    1. Make lap image1.1. Log in to the host machine using SSH, create the dockerfiel file and fill in the following contents FROM php:7.2.16-apache-stretch ENV TIME_ZONE Asiz/Shanghai RUN sed -i ‘s~//.*.debian.org~//mirrors.aliyun.com~’ /etc/apt/sources.list \ && apt-get update \ && apt-get install -y libxml2-dev libicu-dev libzip-dev \ && docker-php-ext-install zip bcmath intl mbstring mysqli pdo_mysql exif sockets […]

  • Solutions to errors caused by too many operating files in Linux system


    Solution to too many open files in Linux The reason for this prompt is that the number of file / socket connections opened by the program exceeds the system setting.View the maximum number of open files per user Copy code The code is as follows: ulimit [email protected]:~$ ulimit -a core file size (blocks, -c) 0 […]

  • Command usage of monitoring CPU and virtual memory running information in Linux


    mpstatMpstat is the abbreviation of multiprocessor statistics, which is a real-time system monitoring tool. Its reports and CPU statistics are stored in the / proc / STAT file. In a multi CPUs system, it can not only view the average status information of all CPUs, but also view the information of specific CPUs. The most […]

  • After listening to API, let’s see what SPI is


    Quotation Usually API can hear a lot? What is SPI? Don’t worry. Let’s first look at the call relationship of interface oriented programming to understand the similarities and differences between API and SPI. SPI understanding Let’s start with an official introduction: the full name of SPI (service provider interface) is a built-in service provision and […]

  • Linux Process replacement (exec function) implementation code


    Linux Process replacement (exec function) implementation code # include<stdio.h> #include<stdlib.h> #include<unistd.h> #include<fcntl.h> #include<sys/types.h> #include<sys/stat.h> #include<string.h> int main() { pid_t id=fork(); if(id==0) { printf(“child is running\n”); sleep(1); char* env[]={“MYENV=/A/B/C/D/AAAA”,NULL}; char* argv[]={“ls”,”-l”,”-n”,”-i”,NULL}; // execl(“/bin/ls”,”ls”,”-l”,”-n”,”-i”,NULL); // execlp(“ls”,”ls”,”-l”,”-n”,”-i”,NULL); // execv(“/bin/ls”,argv); // execvp(“ls”,argv); // execle(“./myenv”,”myenv”,NULL,env); execve(“./myenv”,argv,env); Printf (“child ID done \ n”); // do not execute this statement if exec […]

  • Detailed use of tput command for changing cursor and text properties in Linux


    The tput command initializes and operates your terminal session through the terminfo database. Using tput, you can change several terminal functions, such as moving or changing the cursor, changing text properties, and clearing specific areas of the terminal screen. Like most commands in UNIX, the tput command can be used either on the shell command […]

  • Detailed explanation of mysql8.018 installation and configuration on Linux


    Installation introduction under Windows: go and have a look at mysql8.018 installation introduction under Windows Linux platform: Take MySQL 8.0.18, Ubuntu 16.04.6 lts (GNU / Linux 4.4.0-142-generic x86_) as an example: A. Automatic installation sudo apt-get install mysql-server sudo apt-get install mysql-client sudo apt-get install libmysqlclient-dev B. Download the installation package and install the DEB […]

  • Basic tutorial of TR command in Linux system


    Usage: tr [options]… Set1 [set2]Replace, reduce, and / or delete characters from standard input and write the results to standard output. – C, – C, – completion first make up Set1– D, — delete delete the content matching Set1 without replacing it– s, — squeeze repeats if the characters matching Set1 are continuous in the […]

  • Linux netstat command (necessary for advanced interview)


    brief introduction Netstat command is used to display various network related information, such as network connection, routing table, interface statistics, masquerade connection, multicast members, etc. Meaning of output information After netstat is executed, the output is Active Internet connections (w/o servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 2 ESTABLISHED […]

  • Detailed explanation of process initialization configuration file inittab in Linux system


    /The etc / inittab file describes which processes are up and running. Inittab is the configuration file used by init initializer when initializing the file system for Linux. This file is responsible for setting where the init initialization script is located, the commands that run at each run level during initialization, the commands that correspond […]

  • Solve the problem that time zone can’t be set in Linux Environment


    You can’t always change the time zone under Linux Change to Asia / Shanghai, but the time zone is always + 0000 but not + 0800 Follow the online approach A: tzselect: execute the tzselect command — > select Asia — > select China — > select East China – Beijing, Guangdong, Shanghai, etc — […]