shell

03 2017 档案

摘要: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运维 阅读(966) 评论(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运维 阅读(758) 评论(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运维 阅读(191) 评论(0) 推荐(0) 编辑
摘要:#生成证书和key openssl req -x509 -nodes -days 36500 -newkey rsa:2048 -keyout /opt/nginx/pdk.key -out /opt/nginx/pdk.crt #修改配置文件 nginx.conf server { listen 443; ssl on; server_na... 阅读全文
posted @ 2017-03-23 15:59 devops运维 阅读(300) 评论(0) 推荐(0) 编辑
摘要:[root@centos-6 ~]# cat info_file.txt lys:28:shanxi zhy:28:shanxi [root@centos-6 ~]# cat info_file2.txt lys 28 shanxi zhy 28 shanxi [root@centos-6 ~]# cat print.sh #!/bin/bash for i in `cat info_fi... 阅读全文
posted @ 2017-03-21 17:43 devops运维 阅读(404) 评论(0) 推荐(0) 编辑
摘要:在linux系统中,last与lastb命令用来列出目前与过去登录系统的用户相关信息。指令英文原义: last, lastb - show listing of last logged in users 单独执行last指令时,它会读取位于/var/log/wtmp的文件,并把该给文件的内容记录的登 阅读全文
posted @ 2017-03-21 16:04 devops运维 阅读(5477) 评论(0) 推荐(0) 编辑
摘要:Linux-server-sshd 1:安装 OpenSSH 服务需要4 个软件包 openssh-5.3p1-114.el6_7.x86_64:包含OpenSSH 服务器及客户端需要的核心文件 openssh-clients-5.3p1-114.el6_7.x86_64:OpenSSH 客户端软件 阅读全文
posted @ 2017-03-20 10:17 devops运维 阅读(282) 评论(0) 推荐(0) 编辑
摘要:#!/bin/bash #log path LOGS_PATH=/application/nginx/logs #pid path pid=/application/nginx/logs/nginx.pid #day DAY=$(date -d "yesterday" +%Y-%m-%d) mv -f ${LOGS_PATH}/error.log ${LOGS_PATH}/error_$... 阅读全文
posted @ 2017-03-17 20:59 devops运维 阅读(615) 评论(0) 推荐(0) 编辑
摘要:修改或隐藏服务器名称需要修改源码nginx.h,nginx.h在src/core/目录下 。具体操作如下: 把下面两个宏的值修改为自己设定的值,例如"NGX"。 都改为 "" 即隐藏名称。 [cpp] view plain copy 在CODE上查看代码片派生到我的代码片 #define NGINX_VER "nginx/" NGINX_VERSION 改为 #defin... 阅读全文
posted @ 2017-03-17 20:57 devops运维 阅读(256) 评论(0) 推荐(0) 编辑
摘要:[root@Client_Download_Source shell]# cat start.nginx.sh #!/bin/bash while true do sleep 2 check=`netstat -ntlp|egrep "\"` if [[ ${check} == "" ]] then echo -n $(date +%F_%T) >> /tmp/ngi... 阅读全文
posted @ 2017-03-16 11:47 devops运维 阅读(1325) 评论(0) 推荐(0) 编辑
摘要:QPS:每秒查询率(Query Per Second) ,每秒的响应请求数,也即是最大吞吐能力。QPS = req/sec = 请求数/秒QPS统计方式 [一般使用 http_load 进行统计]QPS = 总请求数 / ( 进程总数 * 请求时间 )QPS: 单个进程每秒请求服务器的成功次数峰值Q 阅读全文
posted @ 2017-03-15 15:19 devops运维 阅读(448) 评论(0) 推荐(0) 编辑
摘要:#!/bin/bash for i in $(cat ./host.txt) do echo $i > ./tmp.txt HOSTNAME=$(cut -d ':' -f1 ./tmp.txt) IP=$(cut -d ':' -f2 ./tmp.txt) PASS=$(cut -d ':' -f3 ./tmp.txt) /usr/bin/expect ./tmp.txt h... 阅读全文
posted @ 2017-03-13 16:06 devops运维 阅读(287) 评论(0) 推荐(0) 编辑

python
点击右上角即可分享
微信分享提示