What is the use of the linux packet capture command tcpdump? -Linux operation and maintenance

The linux packet capture command tcpdump is used to dump network transmission data, which can completely intercept the “header” of the data packet transmitted in the network for analysis; it supports network layer, protocol, host, network or port Filter and provide logical statements such as and, or, not to help you remove useless information. The time it takes for the packet to pass from the physical line to the kernel, and the interrupt processing time the kernel spends on this packet are not counted. command use tcpdump adopts the command line mode, and its command format is: tcpdump [ -AdDeflLnNOpqRStuUvxX ] [ -c count ] [ -C file_size ] [ -F file ] [ -i ] [ -m module ] [ -M secret ] [ -r file ] [ -s snaplen ] [ -T type ] [ -w file ] [ -W filecount ] [ -E spi@ipaddr algo:secret,… ] [ -y datalinktype ] [ -Z user ] [ expression ] Introduction to simple options of tcpdump -A Displays each data packet in ASCII code (the link layer header information in the data packet will not be displayed). When capturing data packets containing web page data, it is convenient to view…

What is the linux view process command – linux operation and maintenance

Linux commands to view processes include: 1. PS command, which can check which processes are running and their running status; 2. Top command, which can display the status of each thread in real time; 3. Pstree command, This command displays the derivation relationship between processes in the form of a tree diagram; 4. Pgrep command and so on. Third, Linux view process command: Pstree command The pstree command is displayed in a tree diagram The derivation relationship between processes is more intuitive to display. Pstree command syntax: pstree (option) -a displays the complete command and parameters -c repeats the process to display separately -c displays the process ID, PID – nArrange processes by PID Fourth, Linux view process command: Pgrep command The pgrep command searches the process from the running process queue based on the name, and Display the found process id. Each process ID is expressed as a decimal number, separated from the next ID by a split string, the default split string is a new line. For each property option, the user can specify a comma-separated set of possible values ​​on the command line. Pgrep command syntax: pgrep (option) (parameter) -l display process name and process PID -o…

Introduce two methods to create memory swap space swap-linux operation and maintenance

First, let’s introduce the role of swap. Generally, when we have installed the linux operating system, the system will create a swap partition by default. Let’s take a look at the usage of the swap partition on the server # free -h total used free shared buff/cache available Mem: 992M 630M 68M 264K 293M 198M Swap: 1.0G 96M 927M The size of the swap partition of this server is 1G. This swap partition is created by the system by default. We will increase the capacity of the swap partition on this basis later. The swap partition is called the swap partition, which acts as a special hard disk space and acts as a memory. When the system memory is not enough, the system will store some data in the memory that will not be used temporarily in the swap partition. The advantage of using the swap partition is that the price of the hard disk is far cheaper than the memory, so this is a very economical way to increase the system memory. However, if swap is used frequently, it will greatly affect the operating speed of the system. Therefore, the best usage strategy for the swap partition is “preparation…

linux下怎么安装php环境-linux运维

linux下安装php环境的方法:1、安装cmake;2、安装libzip;3、安装php依赖;4、创建www用户;5、下载php源码并进行预配置;6、编译安装;7、创建启动脚本。 安装步骤如下: (推荐教程:java视频教程) 第一步:安装cmake yum install epel-release -y yum install cmake3 -y cp /usr/bin/cmake3 /usr/bin/cmake 执行命令cmake -version 查看是否安装成功: #输出cmake version 3.16.1 CMake suite maintained and supported by Kitware (kitware.com/cmake). 第二步:安装libzip1.5.2 #安装bzip2-devel依赖包yum install bzip2 bzip2-devel -y #安装libzipcd ~ wget https://libzip.org/download/libzip-1.5.2.tar.gz tar xf libzip-1.5.2.tar.gz cd libzip-1.5.2 mkdir buildcd build cmake .. make#make testmake install 第三步:安装php依赖 yum install gcc \\ gcc-c++ \\ libxml2 \\ libxml2-devel \\ openssl \\ openssl-devel \\ libcurl \\ libcurl-devel \\ freetype \\ freetype-devel \\ libjpeg \\ libjpeg-devel \\ libpng \\ libpng-devel \\ libxslt \\ libxslt-devel \\ systemd-devel \\ libicu-devel \\ libedit-devel 第四步:创建www用户 useradd -M -s /sbin/nologin www 修改库加载路径 vim /etc/ld.so.conf #添加如下几行/usr/local/lib64 /usr/local/lib /usr/lib /usr/lib64 使之生效: ldconfig -v 或者 echo /usr/local/lib64 >>/etc/ld.so.conf echo /usr/local/lib >>/etc/ld.so.conf echo /usr/lib >>/etc/ld.so.conf echo /usr/lib64 >>/etc/ld.so.conf ldconfig -v 最终再次进行预配置 第五步:下载php源码并预配置 #安装wget工具 yum install wget -y #下载php源码 wget https://www.php.net/distributions/php-7.3.12.tar.gz #解压php tar包 tar xf php-7.3.12.tar.gz #进入php解压后的目录 cd php-7.3.12 #预配置 ./configure –prefix=/usr/local/php \\ –with-config-file-path=/usr/local/php/etc \\ –with-config-file-scan-dir=/usr/local/php/etc/conf.d \\ –disable-cgi \\ –enable-fpm \\ –with-fpm-user=www \\ –with-fpm-group=www \\ –enable-ftp \\ –with-curl \\ –with-gd \\ –with-gettext \\ –with-iconv-dir \\ –with-kerberos \\ –with-libedit \\ –with-openssl \\ –with-pcre-regex \\ –with-pdo-mysql \\ –with-xsl \\ –with-zlib \\ –with-mhash \\ –with-mysqli \\ –with-png-dir=/usr/lib \\ –with-jpeg-dir=/usr/lib\\ –with-freetype-dir=/usr/lib \\ –enable-mysqlnd \\ –enable-bcmath \\ –enable-libxml \\ –enable-inline-optimization \\ –enable-gd-jis-conv \\…

Detailed explanation of tr command under linux system – linux operation and maintenance

Today I want to introduce to you a very commonly used command-tr. This command can be used to replace strings, delete specified characters, and compress multiple repeated characters to only one. In addition, this command supports pipelines. From the above function introduction, you should be able to feel that this command is very powerful. Next, let’s introduce this command: tr [option] parameter Common options are as follows: -c followed by a character range, indicating characters other than these characters -d deletes the specified character -s compresses the repeated character to only one The following passes a few Example to learn how to use this command String replacement This is the most basic function, when no option is added, it means string replacement, the command The format is: tr The original string needs to be replaced with the string Here, we often use the – symbol, which means continuous meaning. Let’s look at the case: # String replacement, replace lowercase letters with uppercase letters # echo hello, world | tr [a-z] [A-Z] HELLO, WORLD Delete characters Delete the specified characters through the option -d, and use the -d -c option to retain the specified characters. Let’s look at the case #…

How to reset password forgot linux password-linux operation and maintenance

How to reset the linux password if you forget the password: first, type “e” on the kernel; then change the content to “rw rd.break” in the linux16 line; then enter the emergency mode of the system And enter passwd and other commands in turn; finally restart the service. 4. Enter the following commands in turn # chroot /sysroot //Enter the root directory of the system # passwd // reset password # touch /.autorelabel //Create a file to allow the system to recognize changes when it restarts # exit exit chroot mode # reboot //Restart the system The above are the details of how to reset the password for linux if you forget the password. For more information, please pay attention to other related articles on 1024programmer.com!

How to decompress tar.gz in linux-linux operation and maintenance

How to decompress tar.gz in linux: first open the terminal command window; then enter and execute the command “tar -zxvf compressed file name.tar.gz” to decompress tar.gz to the specified folder. Recommendation: “Linux Tutorial” *.tar.gz file decompression command under Linux 1. Compression command: Command format: tar -zcvf compressed file name.tar.gz compressed file name You can switch to the current directory first. Both the compressed file name and the compressed file name can be added to the path. 2. Decompression command: Command format: tar -zxvf compressed file name.tar.gz After decompression The files can only be placed in the current directory. The above is the detailed content of how to decompress tar.gz in Linux, please pay attention to other related articles on 1024programmer.com for more information!

Keepalived cluster building under Linux

How to close the php service under linux-linux operation and maintenance

linux php Write your review! Let’s make a fuss, see everything Member Login | User Registration recommended reading config Construction of Keepalived cluster under Linux [Overview]: Keepalived is a free open source, written in C. It mainly provides loadbalancing (load balancing) and high-availability (high availability) functions, and the implementation of load balancing needs to rely on Li… [detailed] Crayon Shinchan 2023-08-25 15:55:41 config docker deploy ES docker deploy ES… [detailed] Crayon Shinchan 2023-08-25 16:08:50

How to correctly install PHP extension under Linux-Linux operation and maintenance

The correct installation method of php extension under linux: 1. Download and decompress the extension file; 2. Enter the decompression file directory and check the system configuration; 3. Execute the [make && make install] command to install the extension. Method 1: Compile and install (learning video recommendation: linux video tutorial) Specific steps: //Download files #wget http://pecl.php.net/get/zip-1.12.4.tgz //unzip files #tar zxfv zip-1.12.4.tgz //Enter the decompressed file directory #cd zip-1.12.4 //Check the system configuration and start configuration, specify the configuration when installing PHP #./configure –with-php-cOnfig=/usr/local/php-5.2.17/bin/php-config //compile #make //test #make test //Install #make install Method 2: pecl installation Concrete steps: 1. First check whether there is pecl under /usr/local/php/bin/ , pear (php-pear is installed to use phpize in pecl) if not, install with yum yum install php-pear,php-devel 2. Update the pecl library pecl channel-update pecl.php.net 3. Install the corresponding Extension pecl install redis If you do not add the path of php to the environment variable, you need to use the absolute address 4. Generally, extensions installed through pecl are automatically added to the configuration of php.ini. If no extensions are found through phpinfo() or php-m, add the corresponding so file to php.ini (extension=redis.so) and then restart php-fpm

Master the conditional branch structure of shell programming through several cases-linux operation and maintenance

Shell scripting is a skill that any back-end programmer should master. Today, let’s learn its conditional branch structure together, and then master it through several cases. First, let’s look at the basic structure of the shell script, which is as follows: #!/bin/bash Code Below, let’s write the simplest shell script. #!/bin/bash echo ‘hello world’ When the above program is executed, the hello world characters will be printed on the screen. Next, let’s take a look at the conditional branch structure. Shell scripts have if and case statements about conditional branches. if Like other programming languages, the if statement of the shell program , conditional branches are also divided into single branch, double branch and multi-branch. # Single branch if condition ;then … the fi # double branch if condition ;then … else … the fi # multi-branch if condition; then … elif condition; then … else … fi First of all, let’s use a simple example to practice and write a shell script. The function of this script is that when the user enters a score, the program outputs different comments through the score, failed, good , Excellent, etc. First of all, we need to prompt the user to enter…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索