随笔分类 -  Linux运维

harbar镜像同步
摘要:一、做好镜像文件 1、编辑脚本 pull.sh #!/bin/bash if [ $# -ne 1 ];then echo "Usage:$0 filename" exit 1 fi file=$1 if [ ! -f $file ];then echo "the $file is not a fi 阅读全文
posted @ 2020-05-08 18:37 可口_可乐 阅读(629) 评论(0) 推荐(0)
Dns局域网域名解析
摘要:一、安装dns服务 1)yum安装 yum install dnsmasq -y 2)配置本地的 dns 解析 # 设置上游DNS,毕竟你的Dns只是个代理 cat >/etc/resolv.dnsmasq <<EOF nameserver 114.114.114.114 nameserver 8. 阅读全文
posted @ 2020-05-06 16:42 可口_可乐 阅读(1224) 评论(0) 推荐(0)
shell脚本监控
摘要:一、进程服务检测自动拉取 运用知识点 . /etc/bashrc 加载用户的环境变量 打点到falcon 里面 执行的日志输出 脚本内容 #!/bin/bash . /etc/bashrc region=shdl host=`hostname` end_timestamp=`date +%s` st 阅读全文
posted @ 2020-03-12 15:17 可口_可乐 阅读(437) 评论(0) 推荐(0)
centos6中安装RabbitMQ
摘要:一、安装环境步骤需知 二、安装erlang环境 1)安装编译环境,和基础依赖包 2)下载erlang,解压文件 3)编译安装 4)配置环境变量 5)检测是否安装成功 [root@web01 ~]# erl Erlang/OTP 18 [erts-7.3] [source] [64-bit] [asy 阅读全文
posted @ 2019-08-31 19:14 可口_可乐 阅读(1615) 评论(0) 推荐(1)
etcd集群搭建
摘要:一、etcd介绍 1)etcd 是一个分布式一致性键值存储系统,用于共享配置和服务发现 etcd是一个分布式一致性键值存储系统,用于共享配置和服务发现, 专注于: 简单:良好定义的,面向用户的API (gRPC)· 安全: 带有可选客户端证书认证的自动TLS· 快速:测试验证,每秒10000写入· 阅读全文
posted @ 2019-07-20 11:03 可口_可乐 阅读(1535) 评论(0) 推荐(0)
监控软件之open-falcon
摘要:一、open-falcon介绍 1)中文社区介绍 http://book.open-falcon.org/zh_0_2/intro/ 参照文档: https://www.cnblogs.com/LAlexH/p/11161943.html 参照文档:https://www.cnblogs.com/s 阅读全文
posted @ 2019-07-14 09:44 可口_可乐 阅读(1455) 评论(0) 推荐(0)
cronsun任务管理器部署文档
摘要:一、cronsun介绍 1)cronsun产生的背景 因此,我们非常需要一个集中管理定时任务系统 2)github官网 3)架构图 cronsun的重要组件:cronsun 主要有 3 个主件,都是通过 etcd 通讯的。cronnode 负责节点的分组及节点的状态,croeweb 是管理任务的、执 阅读全文
posted @ 2019-07-14 09:43 可口_可乐 阅读(1671) 评论(0) 推荐(0)
mysql的主从同步
该文被密码保护。
posted @ 2019-07-05 11:34 可口_可乐 阅读(18) 评论(0) 推荐(0)
saltstack的高级管理
摘要:一、saltstack的状态管理 状态管理官网: https://www.unixhot.com/docs/saltstack/ref/states/all/index.html 1)状态分析 2.1) 对于lamp 架构状态管理分析 2.2)安装软件示例和配置文件定义示例 #示例:同时安装多个包 阅读全文
posted @ 2019-06-28 08:06 可口_可乐 阅读(267) 评论(0) 推荐(0)
saltstack基本操作第一篇章
摘要:一、安装saltstack 1)官网安装 http://repo.saltstack.com/#rhel saltstack的模块: https://www.unixhot.com/docs/saltstack/ref/modules/all/ 2)启动服务 安装源,(所有机器) yum insta 阅读全文
posted @ 2019-06-28 08:05 可口_可乐 阅读(464) 评论(0) 推荐(0)
nfs共享文件服务搭建
摘要:一、nfs搭建 1)nfs介绍 NFS的优点: 1:简单,容易上手,容易掌握,数据是在文件系统之上 2:方便,部署快速,维护简单 3:可靠,从软件层面上看,数据可靠性高,经久耐用,数据是在文件系统之上 4:稳定 NFS的局限: 1:局限性是存在单点故障,如果nfs server宕机了所有客户端都不能 阅读全文
posted @ 2019-05-06 10:45 可口_可乐 阅读(209) 评论(0) 推荐(0)
nginx常用服务配置
摘要:一、nginx.conf的配置方式,创建新vhost 1)nginx的安装编译方式 常用优化配置 user nginx; worker_processes 4; worker_cpu_affinity 00000001 00000010 00000100 00001000; worker_rlimi 阅读全文
posted @ 2019-03-14 17:45 可口_可乐 阅读(375) 评论(0) 推荐(0)
gitlab的安装和基本使用
摘要:一、gitlab的安装 1)安装依赖包 sudo yum install git vim gcc glibc-statc telnet -y sudo yum install -y curl policycoreutils-python openssh-server sudo systemctl e 阅读全文
posted @ 2018-12-24 11:04 可口_可乐 阅读(529) 评论(0) 推荐(0)
登录服务器失败 IP 统计和处理方法
摘要:一、登录ssh失败次数统计 1)错误的打开方式 awk '/Failed password/ {print $(NF-3)}' secure |sort -n |uniq -c|sort -n |tail /var/log/secure 2)拷贝文件,再查看失败 cp /var/log/secure 阅读全文
posted @ 2018-12-07 17:20 可口_可乐 阅读(966) 评论(0) 推荐(0)
centos中单进程监控
摘要:[root@k8s6 proc]# ps aux|grep -v PID|sort -rn -k +3|head -5 root 921 0.4 0.9 582140 38532 ? Ssl 17:19 0:29 /usr/bin/dockerd root 691 0.2 0.1 305296 63 阅读全文
posted @ 2018-12-03 21:00 可口_可乐 阅读(1035) 评论(0) 推荐(0)
编译搭建lnmp+zabbix
摘要:一、搭建nginx 1)基础依赖包安装 2)nginx环境准备 问题处理 yum -y install openssl openssl-devel 3)编译参数。指定目录 /opt/lnmp_zabbix/nginx 3)编译成功则执行 二、编译安装mysql(方法一) 1) 下载mysql,创建m 阅读全文
posted @ 2018-11-22 12:25 可口_可乐 阅读(467) 评论(0) 推荐(0)
Django+Uwsgi+Nginx项目部署文档
摘要:一、基本环境搭建 1)查看服务器 2)安装基本的依赖包 二、搭建mysql,nginx,python环境 1.1)安装mysql5.6版本 1.2)设置mysql 1.3)测试连接 2.1)安装nginx 2.2)常用的编译参数 编译参数说明 2.3)nginx文件夹说明 2.4)nginx启动命令 阅读全文
posted @ 2018-11-16 16:50 可口_可乐 阅读(423) 评论(0) 推荐(0)
ansible的playbook剧本
摘要:一、playbook剧本介绍 1)playbook介绍 Playbooks是Ansible的配置,部署和编排语言。它们可以描述您希望远程系统执行的策略,或一般IT流程中的一组步骤。 如果说ansible 模块 是你车间里的工具,那么playbooks 是你的说明书/使用手册,并且资源清单上的主机是你 阅读全文
posted @ 2018-11-06 15:37 可口_可乐 阅读(320) 评论(0) 推荐(0)
Git工具和GitHub的使用
摘要:一、Git工具的安装 1)centos系统下安装 1.1)查看环境 [root@gitlab ~]# rpm -qa centos-release centos-release-7-4.1708.el7.centos.x86_64 [root@gitlab ~]# uname -a Linux gi 阅读全文
posted @ 2018-09-28 09:48 可口_可乐 阅读(909) 评论(0) 推荐(0)
centos6中搭建tomcat
摘要:一、安装jdk [root@tomcat ~]# yum -y list java* Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile * base: mirrors.aliyun.c 阅读全文
posted @ 2018-08-03 11:11 可口_可乐 阅读(186) 评论(0) 推荐(0)