Fork me on GitHub

分类 中间件 中的文章

配置管理 confd

https://github.com/kelseyhightower/confd 配置信息存放在ectd KV存储中 更新 ectd 中的内容, confd 负责将变更同步到本地服务配置文件,并通知本地服务进行重新加载重启等。……

阅读全文

etcd 访问控制

介绍 etcd 默认没有开启访问控制。 在生产环境中使用属于裸奔。 开启访问控制有两种方式 密钥证书验证 用户名密码验证 本篇实验用户名密码验证方式 用户 开启访问认证需要创建root 用户,root 用户默认自动拥有root角色的权限,及超级管理员。 角色 角色理解为指定权限的集合,权限包括 read 、write、 readwrite……

阅读全文

Consul DNS 服务

实现目标 多IP解析,负载轮询 自动检查后端服务状态,自动剔除不可用后端 别名配置 上游DNS支持 ttl cache 支持 前两点由cousul实现 后两点由dnsmasq实现 别名配置未实现 简单应用 集群配置 10.1.88.84 10.1.88.85 10.1.88.86 consul agent -server -bootstrap-expect=3 -data-dir=/tmp/consul -node=10.1.88.84 -bind=10.1.88.84 -client=0.0.0.0 -datacenter=bj -domain=zhangeamon.com -config-dir=/etc/consul.d -ui consul agent -server -bootstrap-expect=3 -data-dir=/tmp/consul -node=10.1.88.85 -bind=10.1.88.85 -client=0.0.0.0 -datacenter=bj -domain=zhangeamon.com -join=10.1.88.84 -config-dir=/etc/consul.d -ui consul agent -server -bootstrap-expect=3 -data-dir=/tmp/consul -node=10.1.88.86 -bind=10.1.88.86 -client=0.0.0.0 -datacenter=bj -domain=zhangeamon.com -join=10.1.88.84 -config-dir=/etc/consul.d -ui 服务发现配置 cat /etc/consul.d.web.json { "services":[……

阅读全文

Centos FTP 服务

利用vsftpd 搭建FTP 服务器 安装 yum -y install vsftpd 添加用户及设置密码 useradd -s /sbin/nologin -d /home/ftp_test ftp_test passwd ftp_test -s 禁止ssh登录主机 -d 设置ftp_test 用户home 目录,用于存放数据 基础配置 vi /etc/vsftpd/vsftpd.conf # 禁止匿名访问 anonymous_enable=NO # 禁止dns解析 reverse_lookup_enable=NO 启动&开机自启 systemctl start vsftpd.service systemctl enable vsftpd.service filezilla 客户端验证 host: 服务器IP port: 默认 user: password: 测试本地上传,远……

阅读全文

Sysbench 测试

下载安装 1.0.15 sysbench官网 curl -s https://packagecloud.io/install/repositories/akopytov/sysbench/script.rpm.sh | sudo bash sudo yum -y install sysbench 参数说明 sysbench --help Usage: sysbench [options]... [testname] [command] Commands implemented by most tests: prepare run cleanup help General options: --threads=N number of threads to use [1] 线程数 --events=N limit for total number of events [0] 事务数 --time=N limit for total execution time in seconds [10] 测压时间 --forced-shutdown=STRING number of seconds to wait after the --time limit before forcing shutdown, or 'off' to disable [off] --thread-stack-size=SIZE size of stack per thread [64K] --rate=N average transactions rate. 0 for unlimited rate [0] --report-interval=N periodically report intermediate statistics with a specified interval in seconds. 0 disables intermediate reports [0] --report-checkpoints=[LIST,...] dump full statistics and reset all counters……

阅读全文

Keepalived 问题集

问题描述 Q1 ip address associated with VRID 51 not present in MASTER advert : 10.1.7.58 其中 51 为 virtual_router_id 10.1.7.58 为虚拟IP 可能原因 ntp 时间不同步 局域网内 virtual_router_id 与其他集群配置冲突。 另外 router_id 主机标示,一般为hostname即可。 解决方法: unicast_peer{ } 配置成单播模式 Q2 keepalived ping不通 解决办法,注释掉配置文件中的 vrrp_strict Q3 not a regular file 解决方法 chmod 644 keepalived.conf Q4 virtual_server 该部分是用来管理LVS的,……

阅读全文

代理

科普 正向代理 对服务端来说是无感的,服务端无需配置,要在客户端指定。代理的是客户端。 访问原来无法访问的资源 用作缓存,加速访问速度 对客户端访问授权,上网进行认证 代理可以记录用户访问记录(上网行为管理),对外隐藏用户信息 反向代理 对客户端来说的无感的,客户端无需配置,要在服务端实现。代理……

阅读全文