shell
摘要: #!/bin/bash #log path LOGS_PATH=/opt/nginx/logs #pid path pid=/opt/nginx/logs/nginx.pid #day DAY=$(date -d "yesterday" +%Y-%m-%d) mv -f ${LOGS_PATH}/error.log ${LOGS_PATH}/error_${DAY}.log #w... 阅读全文
posted @ 2017-09-27 16:01 devops运维 阅读(182) 评论(0) 推荐(0) 编辑
摘要: linux(CentOS6.7) 环境Mysql 5.7.17安装教程分享给大家,供大家参考,具体内容如下: 1系统约定 安装文件下载目录:/data/software Mysql目录安装位置:/usr/local/mysql 数据库保存位置:/data/mysql 日志保存位置:/data/log 阅读全文
posted @ 2017-08-10 12:01 devops运维 阅读(228) 评论(0) 推荐(0) 编辑
摘要: 参考网站 http://www.runoob.com/nodejs/nodejs-http-server.html https://github.com/nodesource/distributions #安装 curl -sL https://rpm.nodesource.com/setup_6.x | bash - yum install -y nodejs #查看版本 node --v... 阅读全文
posted @ 2017-08-03 16:39 devops运维 阅读(798) 评论(0) 推荐(0) 编辑
摘要: #查看电脑的版本 C:\Users\lys>pip -V pip 8.1.1 from e:\python\python3.5\lib\site-packages (python 3.5) #安装 C:\Users\lys>pip install virtualenv #创建 C:\Users\lys>virtualenv testvir #进入 C:\Users\lys>cd testvir ... 阅读全文
posted @ 2017-07-31 16:00 devops运维 阅读(342) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env python # _*_ coding:utf-8 _*_ # Author:Liuyoushui # Time = 2017/7/18 10:33 print ('\n'.join([' '.join(['%s*%s=%2s' % (y,x,x*y) for y in range(1,x+1)]) for x in range(1,10)])) print([... 阅读全文
posted @ 2017-07-18 15:07 devops运维 阅读(387) 评论(0) 推荐(0) 编辑
摘要: 我在salt上编写了备份日志的脚本,在/opt/CardServer下的主程序目录只保留当天的日志,/opt/log_del目录会保存7天的日志。salt * state.sls script.log_sevenday#添加计划任务salt * cron.set_job root '00' '4' 阅读全文
posted @ 2017-07-05 15:19 devops运维 阅读(244) 评论(0) 推荐(0) 编辑
摘要: vsftp日志xferlog格式分析 vsftp日志xferlog格式分析 1、开始vsftp记录日志。修改/etc/vsftpd/vsftpd.conf 如下: xferlog_enable=YES xferlog_std_format=YES xferlog_file=/var/log/xfer 阅读全文
posted @ 2017-06-05 16:57 devops运维 阅读(2441) 评论(0) 推荐(0) 编辑
摘要: nat internet iptables -t nat -A POSTROUTING -s 192.168.0.0/255.255.255.0 -o eth1 -j SNAT --to-source $LAN_GW_IP IPT=/sbin/iptables LAN_GW_IP=192.168.0.15 WAN_GW_IP=10.0.0.15 LAN_SERVER=192.168.0.1... 阅读全文
posted @ 2017-03-31 11:20 devops运维 阅读(956) 评论(0) 推荐(0) 编辑
摘要: [root@salt-master ~]# salt-master --version salt-master 2015.5.10 (Lithium) #master 的配置文件 [root@salt-master ~]# cat /etc/salt/roster web1: host: 192.168.50.101 user: root passwd: 1234... 阅读全文
posted @ 2017-03-30 13:50 devops运维 阅读(757) 评论(0) 推荐(0) 编辑
摘要: [root@xuegod63 ~]# vim /etc/vsftpd/vuserconfig/nonevip guest_enable=yes guest_username=ftpuser anon_world_readable_only=no anon_max_rate=50000 解释: gue 阅读全文
posted @ 2017-03-27 17:36 devops运维 阅读(187) 评论(0) 推荐(0) 编辑
python