随笔分类 - shell
摘要:1.rsyslog的server配置 [root@VM_0_34_centos 0413]# cat /etc/rsyslog.conf |egrep -v '^#|^$' $ModLoad imuxsock # provides support for local system logging (
阅读全文
摘要:1.杜绝需要对每台机器分别操作的方式,统一用脚本或者用工具来调度任务,使用shell,python 2. 现在这一点具体是怎么做 这边要提供什么样的脚本 有什么要求吗 3.这要把流程图拿出来,看看里面要做些什么操作,这些操作都不能是单机单机的去执行
阅读全文
摘要:1.命令 sudo yum update -yyum -y install epel-releaseyum -y install tripwire cd /etc/tripwire/ && tripwire-setup-keyfiles tripwire --init sudo sh -c "tri
阅读全文
摘要:1.不建议启用 内核参数调整下: 打开 vi /etc/sysctl.conf ,将下面2个参数修改成 0 net.ipv4.tcp_timestamps = 0 net.ipv4.tcp_tw_recycle = 0 /sbin/sysctl -p 使修改立即生效」
阅读全文
摘要:1.挂载 # mkdir /mnt/cdrom # mount /mnt/CentOS-7.0-1406-x86_64-DVD.iso /mnt/cdrom/ 2.配置 # touch CentOS-ISO.repo # cat CentOS-ISO.repo [base] name=CentOS-
阅读全文
摘要:1.telnet [root@master-node156 mon_port]# cat mycheck_port|egrep -v '^$' #! /bin/sh #企业微信警配置 alert=True #配置True为启动告警,其它为不开启 #企业微信机器人ID userkey="5642127
阅读全文
摘要:第一、使用原来的iso镜像文件重新创建一个虚拟机(不是原来的镜像文件也可以吧)。第二、将原来虚拟机的硬盘添加进来,方法如下:step1,选择虚拟机-》设置: step2,选择硬盘,点击添加。 下一步,注意选择使用“现有虚拟磁盘” 参考:https://blog.csdn.net/u011913612
阅读全文
摘要:yum install yum-utils -y package-cleanup --cleandupes yum -y install python-devel yum -y install python-devel
阅读全文
摘要:1.ls -lar|sort -k 5n
阅读全文
摘要:1.vim /etc/systemd/system/alertmanager.service [Unit] Description=Alertmanager After=network-online.target [Service] Restart=on-failure ExecStart=/usr
阅读全文
摘要:1.只保留1天的日志 journalctl --vacuum-time=1d 参考:https://blog.csdn.net/ithomer/article/details/90634579
阅读全文
摘要:0.修改umask后apache报错:because search permissions are missing on a component of the path, 1.ls -lrth ./htdocs/ rwx 2.处理方法:chmod -R o+rxw ./htdocs
阅读全文
摘要:ssh配置公私钥远程登录Linux主机 ssh-keygen cat id_rsa.pub >>authorized_keys cat authorized_keys 拿下id_rsa https://blog.csdn.net/lynnyq/article/details/79109992 2.s
阅读全文
摘要:1.getopts的经典例子 参考例子: https://www.cnblogs.com/klb561/p/8933992.html 2.如果目录不存在,就创建
阅读全文
摘要:1.dstat dstat -lrpm --top-io --top-mem --top-cpu 2.安装 yum -y install dstat 1. ulimit的配置不起作用 #临时修改,立刻生效 ulimit -n 655350 #永久修改 echo "* soft nofile 6553
阅读全文
摘要:1.shell 2.python 3.date 用法 4.$$ 代表当前进程号
阅读全文
摘要:curl -I -m 10 -o /dev/null -s -w %{http_code} www.baidu.com -I 仅测试HTTP头-m 10 最多查询10s-o /dev/null 屏蔽原有输出信息-s silent-w %{http_code} 控制额外输出 绑定 ip 测试: 作者:
阅读全文
摘要:centos7 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos7_base.repo参考: https://mirrors.cloud.tencent.com/help/ce
阅读全文
摘要:[root@qwy ~]# cat /etc/init.d/elastisearch|grep -v '^#' #!/bin/bash # chkconfig: 2345 55 25 # description: SSH is a protocol for secure remote shell a
阅读全文
摘要:3 .dump 线上文件栈 [root@yszyz10a153 ~]# jmap -dump:live,format=b,file=heap201712.hropf 72947 参考:https://www.jianshu.com/p/3479f043bc68 性能分析之一个简单 Java 线程 d
阅读全文