随笔分类 - linux相关知识
linux相关知识合集
摘要:常用参数 -w 文件名 保存抓取的包至文件 -c 数量 抓取报文固定数量,抓取完成后自动退出 -C size 单位为MB -s 长度 抓取报文的长度 -n 不做地址转换 -v/-vv/-vvv 打印详细报文 -e 打印二层信息,特别是MAC地址 -p 关闭混杂模式,目的地址非本机地址不抓取 -X 显
阅读全文
摘要:1、用httpd的日志做例子 # rm -rf /var/log/httpd/access_log 2、利用lsof找到文件被哪个进程号占用 (不能关闭或重启进程) # lsof |grep access_log httpd 2384 apache 7w REG 8,3 4 101112345 /v
阅读全文
摘要:服务端:rsyncd.conf配置 [root@server2 ~]# cat /etc/rsyncd.conf log file = /var/log/rsyncd.log pidfile = /var/run/rsyncd.pidlock file = /var/run/rsync.lockse
阅读全文
摘要:利用iptables的规则来实现端口转发: 第一步需要将内核参数的net.ipv4.ip_forward=1 场景一:实现本地端口转发 : client端访问本地端口一 实际要转移至本地端口二; 本地端口转发是在PREROUTING链中将端口做NAT转换: # iptable -t nat -A P
阅读全文
摘要:https://blog.csdn.net/qq_41776327/article/details/81408619
阅读全文
摘要:修改/etc/ntp.conf文件 restrict xxx nomodify notrap nopeer noquery #xxx 此处配置本地IP地址restrict 127.0.0.1restrict xxx mask 255.255.255.0 nomodify notrap # xxx为允
阅读全文
摘要:参照官网地址进行安装 https://jumpserver.readthedocs.io/zh/master/setup_by_centos.html 在安装的时候踩了一个坑 Python 模块安装中 python-keycloak==0.13.3python-keycloak-client==0.
阅读全文
摘要:简介: sed是一种流编辑器,它是文本处理中非常重要的工具,能够完美的配合正则表达式使用,功能不同凡响。处理时,把当前处理的行存储在临时缓冲区中,称为“模式空间”(pattern space),接着用sed命令处理缓冲区中的内容,处理完成后,把缓冲区的内容送往屏幕。接着处理下一行,这样不断重复,直到
阅读全文
摘要:############################################################################### BASH CHEATSHEET (中文速查表) - by skywind (created on 2018/02/14)# Version:
阅读全文
摘要:Declarative 1、 pipeline{ agent options{ } stages{ stage(' '){ steps{ } } } post{ always{} changed{} fixed{} regression{} aborted{} failure{} success{}
阅读全文
摘要:top - 13:32:13 up 128 days, 22:10, 1 user, load average: 0.20, 0.26, 0.30Tasks: 154 total, 1 running, 153 sleeping, 0 stopped, 0 zombieCpu(s): 0.3%us,
阅读全文
摘要:/logs/nginx/*/*access.log { daily rotate 30 missingok dateext #compress notifempty sharedscripts postrotate [ -e /var/run/nginx.pid ] && kill -USR1 `c
阅读全文
摘要:1、下载对应的mysecureshell-1.33-1.x86_64.rpm包 2、安装mysecureshell-1.33-1.x86_64.rpm 3、添加ftp用户 useradd ftp 4、配置/etc/passwd,将ftp的登录属性进行修改 ftp:x:1002:50::/home/f
阅读全文
摘要:网络跟踪: 1、mtr 2、tractroute 3、ping 下载命令 curl -O /path/xx wget 直接下载,将文件下载至当前目录 2、linux非22端口进行双机互信时候pubkey拷贝命令 ssh-copy-id "-p 10022 username@ip"
阅读全文
摘要:/appsystems/JQM-SERVER/shell/stopServer.sh: 用脚本停止应用 cmd.run: - name: /bin/sh /appsystems/JQM-SERVER/shell/stopServer.sh - runas: weblogic 指定应用停止的执行用户/
阅读全文
摘要:#!/bin/bash ############Setup basic path and configuration file name #########################date=`date +%Y%m%d`tomcat_home=/usr/local/kencery/tomcat
阅读全文
摘要:#!/bin/bash #function: 自动发布项目脚本#filename: deploy.sh#author:xxxxx#date: 2017-04-24 source /etc/profile echo -e "本次执行传入参数为:$#" #首次检查参数个数是否正确if [ $# -ne
阅读全文
摘要:#!/bin/bash# cat << EOF+ +| 初始化 Centos-6.x 系统 |+ +EOFecho "" # Check if user is rootif [ $(id -u) != "0" ]; then echo -e "\033[31m Error: 你需要使用root用户权
阅读全文
摘要:此脚本主要用来实现非maven tomcat项目的war包手动发布, 1、将测试war包上传至指定目录 2、备份目前生产代码 3、自动配置文件替换 4、新版本代码的发布 #!/bin/bash ############Setup basic path and configuration file n
阅读全文
摘要:awk特殊字符打印方法: 1、awk打印双引号: awk '{print "\""}' 2、awk打印单引号: awk '{print "'\''"}' awk关系运算符及其意义: 1、< :小于 2 、> :大于 3、<=:小于等于 4、>=:大于等于 5、==:等于 6、!=不等于 7、~:匹配
阅读全文

浙公网安备 33010602011771号