Nginx 笔记

set set ${变量名} {字符串}; 全局变量 $args $query_string 请求行中的参数 $content_length 请求头里的 Content-length 字段 $content_type 请求头里的 Content-type 字段 $document_root 请求在 root 指令中指定的值 $host 请求头里的 Host 字段,如果没

Zabbix 笔记

通过 JavaGateway 监控 tomcat 编译 zabbix server,configure 增加 –enable-java 修改 zabbix_server.conf 文件,配置 JavaGateway 参数 1 2 3 JavaGateway=127.0.0.1 JavaGatewayPort=10052 StartJavaPollers=5 配置 tomcat catalina 启动参数 1 2 3 4 5 6 7 export CATALINA_OPTS=" -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=10053 -Djava.rmi.server.hostname={tomcat_server_ip} " 重启

Ceph 笔记

测试环境 操作系统 主机名 IP OSD 设备 OSD ID 容量 ceph 版本 CentOS7 ceph101 192.168.1.101 /dev/sdb 0 3TB jewel CentOS7 ceph102 192.168.1.102 /dev/sdb 1 3TB jewel CentOS7 ceph103 192.168.1.103 /dev/sdb 2 3TB jewel ceph 部署机 操作系统: CentOS7 部署用户: cephdeploy 操作目录: /home/cephdeploy/ceph-cluster IP: 192.168.1.100 新增 OSD

Websocket 查看实时日志

操作系统 CentOS7 下载 websocketd websocketd-0.3.0-linux_amd64.zip 安装 nc 命令 1 yum install nmap-ncat 创建监听脚本 1 2 3 4 5 6 7 8 cat > cmd.sh <<-END ##!/bin/bash pkill -x nc while :; do nc -nkl 10088 sleep 1 done END 创建 log.html 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

Haproxy 笔记

CentOS7 下安装 CentOS7 自带的 haproxy 版本太低,这里通过 cheese 源安装最新版本 安装 cheese repo,详细参考这里 1 2 wget http://www.nosuchhost.net/~cheese/fedora/packages/epel-7/x86_64/cheese-release-7-1.noarch.rpm rpm -Uvh cheese-release-7-1.noarch.rpm 安装 haproxy 1 yum install haproxy 修改 sysctl.conf 1 2 3 4 5 6 7 8 cat >> /etc/sysctl.conf <<-END net.ipv4.ip_forward=1

Ansible

CentOS7 安装 ansible 1 yum install ansible 修改配置文件 /etc/ansible/ansible.conf 1 2 3 4 ## 取消 ssh key 验证 host_key_checking = False ## 改用 debug 输出模式 stdout_callback = debug 修改配置文件 hosts 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ## 增加 tomcat 服务器组

Redis Sentinel

环境 主机名 地址 操作系统 初始状态 sentinel86 10.1.14.86 CentOS7.4 null redis87 10.1.14.87 CentOS7.4 master redis88 10.1.14.88 CentOS7.4 slave redis89 10.1.14.89 CentOS7.4 slave 安装 redis 在全部服务器上安装 redis 1 2 yum install epel-release yum install redis redis master 配置 在 redis87 上修改 /etc/redis.conf 1 bind 0.0.0.0 redis slave 配置 在

Sqoop 笔记

把 mysql 表数据导入 hive 中 命令格式 1 sqoop import {参数列表} 默认在 hive 中创建指定表,如果该表已存在,则把 mysql 表数据追加到该表中,常规参数如下 1 2 3 4 5 6 7 8 9 --connect

Gnome 笔记

常用设置 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 # 关闭左上角热响应 gsettings set org.gnome.desktop.interface enable-hot-corners false # 缩放系统字体 gsettings set org.gnome.desktop.interface text-scaling-factor 1.5 # monospace 字体 gsettings set

Systemd 笔记

系统资源(unit)分类 Unit 描述 Service 系统服务,默认 Target 多个 unit 构成的一个组 Device 硬件设备 Mount 文件系统的挂载点 Automount 自动挂载点 Path 文件或路径 Scope 不是由 systemd 启动的外部进