随笔分类 -  linux

摘要:1.脚本 nginx_log.sh #!/bin/bash #nginx安装地址 BASE_PATH=/usr/local/nginx #日志文件名称 TARGET_LOG_FILENAME=access.log #写出的文件夹地址 OUT_PATH=/usr/local/nginx/logs/ba 阅读全文
posted @ 2020-01-05 16:49 风追海浪 阅读(738) 评论(0) 推荐(0)
摘要:vi /etc/vsftpd.conf listen=YES userlist_deny=NO userlist_enable=YES anonymous_enable=YES local_enable=YES userlist_file=/etc/allowed_users seccomp_sandbox=NO dirmessage_enable=YES use_localtime=YES ... 阅读全文
posted @ 2019-03-21 12:49 风追海浪 阅读(439) 评论(0) 推荐(0)
摘要:vi ~/.bash_profile PATH="/usr/local/mysql/bin:${PATH}" export PATH export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/ export VERSIONER_PYTHON_PREFER_64_BIT=no export VERSIONER_PYTHON_PREFER_32_BIT=ye... 阅读全文
posted @ 2019-03-05 22:04 风追海浪 阅读(1698) 评论(0) 推荐(0)
摘要:解决方法:我们可以通过调整内核参数来调整:vi /etc/sysctl.conf编辑文件,加入以下内容: 然后执行/sbin/sysctl -p让参数生效。net.ipv4.tcp_syncookies = 1表示开启SYN Cookies。当出现SYN等待队列溢出时,启用cookies来处理,可防 阅读全文
posted @ 2019-02-28 10:33 风追海浪 阅读(3998) 评论(0) 推荐(0)
摘要:参考:https://blog.csdn.net/weixin_42980713/article/details/86559017 阅读全文
posted @ 2019-02-27 23:38 风追海浪 阅读(206) 评论(0) 推荐(0)
摘要:参考: https://www.cnblogs.com/emanlee/p/3327576.html 阅读全文
posted @ 2019-02-27 23:32 风追海浪 阅读(148) 评论(0) 推荐(0)
摘要:状态统计 netstat -ant | awk '/tcp/ {print $6}'|sort |uniq -c |sort -nr 前十位ESTABLISHED状态ip统计 netstat -ant | grep "ESTABLISHED"|awk '/tcp/ {print $5}'|cut -d ":" -f1|sort |uniq -c |sort -nr |head -10 前... 阅读全文
posted @ 2019-02-27 23:07 风追海浪 阅读(1152) 评论(0) 推荐(0)
摘要:#查看sn号 dmidecode -t 1 |grep "Serial Number" #看服务器型号 dmidecode |grep "Product Name" #看cpu型号 grep "model name" /proc/cpuinfo #逻辑CPU个数: # cat /proc/cpuinfo | grep "processor" | wc -l 物理CPU个数: # cat /pr... 阅读全文
posted @ 2019-02-27 22:42 风追海浪 阅读(218) 评论(0) 推荐(0)
摘要:#用户登陆显示cpu、负载、内存信息 #!/bin/bash # hostip=`ifconfig eth0 |awk -F" +|:" '/Bcast/{print $4}'` date=`date "+%F %T %A"` load=`uptime |awk -F: '{print $NF}'` usage=`df -h / | awk 'NR==2{print $(NF-1)}'` fss... 阅读全文
posted @ 2019-02-27 22:40 风追海浪 阅读(320) 评论(0) 推荐(0)
摘要:#/bin/bash netstat -ant | grep "EST" | grep -v "22000" | awk '{print $5}' | grep -v "^10" | cut -d ":" -f1 | sort | uniq -c | sort -nr | awk '$1 > 4 {print $1,$2}' > /root/root/black.txt for i in `a... 阅读全文
posted @ 2019-02-25 12:51 风追海浪 阅读(393) 评论(0) 推荐(0)
摘要:[root@WX020 firewall]# cat /etc/sysconfig/iptables# Firewall configuration written by system-config-firewall# Manual customization of this file is not 阅读全文
posted @ 2019-02-25 12:46 风追海浪 阅读(340) 评论(0) 推荐(0)