打赏

随笔分类 -  linux运维大道

摘要:迁移至:http://www.haveneed.cn/jsbw/2021-06-28/290.html 阅读全文
posted @ 2018-12-11 16:18 隔壁老梁 阅读(648) 评论(0) 推荐(0) 编辑
摘要:yum配置文件: /etc/yum.conf pkgpolicy:包的策略。一共有两个选项,newest和last,这个作用是如果你设置了多个repository,而同一软件在不同的repository中同时存在,yum应该安装哪一个,如果是newest,则yum会安装最新的那个版本。如果是last 阅读全文
posted @ 2017-05-10 17:29 隔壁老梁 阅读(1350) 评论(0) 推荐(0) 编辑
摘要:virt-install 命令说明 1、命令作用 建立(provision)新虚拟机 2、语法 virt-install [选项]... 3、说明(DESCRIPTION) virt-install是一个使用“libvirt” hypervisor 管理库构建新虚拟机的命令行工具,此工具使用串行控制 阅读全文
posted @ 2017-04-19 10:28 隔壁老梁 阅读(15659) 评论(2) 推荐(0) 编辑
摘要:1、通过监听端口进行健康检测 。这种检测方式,haproxy只会去检查后端server的端口,并不能保证服务的真正可用。 配置示例: listen http_proxy 0.0.0.0:80 mode http cookie SERVERID balance roundrobin option ht 阅读全文
posted @ 2017-04-18 10:25 隔壁老梁 阅读(1221) 评论(0) 推荐(0) 编辑
摘要:由于网站使用了cdn所以$remote_addr获取的ip是cdn的ip,我现在先禁止某些ip访问发现无法禁止cdn传递过来的客户端的ip也就是$http_x_forwarded_for这个参数。比如我的日志格式这样的:log_format main '$http_x_forwarded_for $ 阅读全文
posted @ 2017-03-21 12:06 隔壁老梁 阅读(1570) 评论(0) 推荐(0) 编辑
摘要:http://www.haveneed.cn/article-detials/220 阅读全文
posted @ 2017-03-17 10:24 隔壁老梁 阅读(1191) 评论(0) 推荐(1) 编辑
摘要:keepalived对后端realserver的健康检查方式主要有以下几种: TCP_CHECK:工作在第4层,keepalived向后端服务器发起一个tcp连接请求,如果后端服务器没有响应或超时,那么这个后端将从服务器池中移除。 TCP_CHECK配置: HTTP_GET:工作在第5层,向指定的U 阅读全文
posted @ 2016-12-19 14:35 隔壁老梁 阅读(1456) 评论(0) 推荐(0) 编辑
摘要:在写《VMware内存机制初探》之后,原本是计划写一篇《VMware内存机制再探》的,讲一讲VMware内存机制中的另外几个重要内容,比如透明内存共享(TPS, Transparent Page Sharing), Relaim Memory, Ballooning, swapping等等。但有网友 阅读全文
posted @ 2016-12-15 12:11 隔壁老梁 阅读(6705) 评论(0) 推荐(0) 编辑
摘要:CentOS6系统openssl生成证书和自签证书的过程,记录一下,本文基于CentOS 6 64bit。$ yum install openssl openssl-devel 1,生成服务器端的私钥(key文件)$ openssl genrsa -des3 -out server.key 1024 阅读全文
posted @ 2016-12-08 20:34 隔壁老梁 阅读(491) 评论(0) 推荐(0) 编辑
摘要:转自:http://blog.itpub.net/27043155/viewspace-734234/ 通过这个模块允许我们改变客户端请求头中客户端IP地址值(例如,X-Real-IP 或 X-Forwarded-For)。 如果Nginx工作在某些7层负载均衡代理后面,这个功能对于Nginx服务器 阅读全文
posted @ 2016-12-08 13:58 隔壁老梁 阅读(1958) 评论(1) 推荐(1) 编辑
摘要:–prefix= 指向安装目录–sbin-path 指向(执行)程序文件(nginx)–conf-path= 指向配置文件(nginx.conf)–error-log-path= 指向错误日志目录–pid-path= 指向pid文件(nginx.pid)–lock-path= 指向lock文件(ng 阅读全文
posted @ 2016-12-08 11:12 隔壁老梁 阅读(388) 评论(0) 推荐(0) 编辑
摘要:一、ansible-playbook介绍: playbook是由一个或多个"play"组成的列表。play的主要功能在于将事先归为一组的主机装扮成事先通过ansible中的task定义好的角色。从根本上来将,所谓的task无法是调用ansible的一个module。将多个paly组织在一个playb 阅读全文
posted @ 2016-11-04 16:23 隔壁老梁 阅读(2142) 评论(0) 推荐(0) 编辑
摘要:文章已转移到:http://www.haveneed.cn/jsbw/2021-06-16/277.html 阅读全文
posted @ 2016-09-08 10:52 隔壁老梁 阅读(54987) 评论(5) 推荐(5) 编辑
摘要:#nginx进程,一般设置为和cpu核数一样worker_processes 4; #错误日志存放目录 error_log /data1/logs/error.log crit; #运行用户,默认即是nginx,可不设置user nginx #进程pid存放位置pid /application/ng 阅读全文
posted @ 2016-09-07 15:53 隔壁老梁 阅读(175473) 评论(5) 推荐(11) 编辑
摘要:# wget https://google-authenticator.googlecode.com/files/libpam-google-authenticator-1.0-source.tar.bz2 # wget https://google-authenticator.googlecode 阅读全文
posted @ 2016-09-07 11:31 隔壁老梁 阅读(649) 评论(0) 推荐(0) 编辑