CentOS安装Nginx
创建nginx.repo 1vim /etc/yum.repos.d/nginx.repo 输入 12345[nginx]name=nginx repobaseurl=http://nginx.org/packages/centos/$releasever/$basearch/
创建nginx.repo 1vim /etc/yum.repos.d/nginx.repo 输入 12345[nginx]name=nginx repobaseurl=http://nginx.org/packages/centos/$releasever/$basearch/
1. 添加用户12adduser deploypasswd deploy 2. 设置sudoers设置sudoers为可编辑 1chmod +w /etc/sudoers 增加deploy用户 1vim /etc/sudoers 恢复sudoers为不可编辑 1chmod -w /etc/sudoers 切换到deploy用
有2种方式 1ls -S 和 1ls --sort=size 个人感觉sort参数更加好记忆 sort参数的可选值如下: 123456Valid arguments are: - ‘none’ - ‘time’ - ‘size’ - ‘extension’ - ‘version’
阿里云消息服务MNS并没有自带堆积预警配置,如果消费有问题就会发生生产故障。通过函数计算做一个定时执行函数发送队列状态到云监控,再通过云监控配置预警即可。 函数实现明细build.gradle123456789101112dependencies { compile group: 'com.aliyun.mns', name: 'aliyun-sdk-mns
保护文件防止被删除 1chattr -+ web.jar 查看文件状态 1lsattr web.jar 1----i--------e-- web.jar 上面显示一个i,说明文件不能被删除。 取消文件保护 1chattr -i web.jar
5分钟时间窗口,上游服务response time大于1秒的数量 1*| SELECT time_series(__time__, '5m', '%Y-%m-%d %H:%i:%s' ,'0') as Time, count(1) as T where upstream_response_time > 1 group by Time order
检索行号 1cat /var/log/xxx.log | grep -n "检索内容" 显示从指定行号(1500行)开始1000行 1cat /var/log/xxx.log | tail -n +1500 | head -n 1000