kangxiaoning / gitment-comments Goto Github PK
View Code? Open in Web Editor NEWblog comments
blog comments
https://kangxiaoning.github.io/2019/02/16/git-submoule/
https://kangxiaoning.github.io/2017/06/17/master-publisher/
https://kangxiaoning.github.io/2012/07/04/goldengate-exception-02/
案例整理 版本下发 问题现象 Trailfile中无logscn 报错内容 解决方法 分析总结 参考文档 问题现象 ORA-1466 报错内容 解决方法 分析总结 参考文档 问题现象 ORA-08181 报错内容 解决方法 分析总结 参考文档 案例整理目的 对工作中遇到的问题进行总结,记录处理问题的思路和关键步骤,后续遇到类似问题便于参考及迅速处理。 版本下发这一部分主
https://kangxiaoning.github.io/2016/06/16/install-nginx/
(五) 源码安装nginx及服务管理1. 任务目标目标: 源码安装nginx。 条件: 准备nginx源码包、pcre源码包。 123456789101112131415161718[root@salt-master web]# pwd/srv/salt/web[root@salt-master web]# ls -ltotal 12drwxr-xr-x 2 root root 4096 Jun
https://kangxiaoning.github.io/2016/06/08/saltstack-grains-pillar/
三、 Grains和Pillar数据系统(一) GrainsGrains 是静态信息,存储在minion端,在minion启动时收集 operating system, domain name, IP address, kernel, OS type, memory, and many other system properties等信息。如果 Grains 信息变化,需要重启 minion 收集
https://kangxiaoning.github.io/2017/04/07/extending-saltstack-notes/
https://kangxiaoning.github.io/2016/07/28/ansible-variable/
五、 变量所有变量都可以在playbook或者jinja2模板中通过使用。 (一) 变量优先级 extra vars (在命令行中使用 -e)优先级最高 然后是在inventory中定义的连接变量(比如ansible_ssh_user) 接着是大多数的其它变量(命令行转换,play中的变量,included的变量,role中的变量等) 然后是在inventory定义的其它变量 然后是由系统发现的f
https://kangxiaoning.github.io/2016/07/26/ansible-playbook/
三、 playbooks(一) playbooktemplate的src参数可以写相对路径,也可以写绝对路径。 1. 编写playbook123456789101112131415161718192021222324252627[root@SZB-L0022911 ansible]# pwd/data/project/learning/ansible[root@SZB-L0022911 ansib
https://kangxiaoning.github.io/2012/09/23/dg-exception-07/
ORA-01111 offline drop 环境信息 报错内容 解决方法 分析总结 ORA-01111 offline drop环境信息1234567891011121314151617z4as2010:10g:sgccfaxs > uname -aSunOS z4as2010 5.10 Generic_147440-20 sun4v sparc sun4vz4as2010:1
https://kangxiaoning.github.io/2016/06/17/include-and-high-state/
(六) include1. include作用 2. 使用include使用 include 改写前面的nginx.sls,将一些基础包放在init目录。 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656
https://kangxiaoning.github.io/2017/06/12/ansible-manage-windows/
crontl端是Centos 7.2,被管理端是windows 2008R2。 参考文章 1. control端配置 control必须为Linux(实验环境在centos 7.2) 为python安装pywinrm模块(pip install pywinrm) 2. windows配置 升级powershell到4.0(ansible要求为3.0以上即可) 配置winrm服务 1234567
https://kangxiaoning.github.io/2019/02/14/spacemacs-commands/
https://kangxiaoning.github.io/2019/02/14/manjaro-linux/
https://kangxiaoning.github.io/2012/09/23/dg-exception-04/
FAL参数设置错误导致DG无法自动处理gap 环境信息 报错内容 解决方法 分析总结 FAL参数设置错误导致DG无法自动处理gap由于主机异常重启,导致DG出现GAP,在主机正常后,启动standby库,发现无法自动处理gap. 环境信息1234567891011121314g3bs1080:10g:luqd0 > uname -aSunOS g3bs1080 5.10 Gene
https://kangxiaoning.github.io/2016/06/13/yaml-jinja2/
六、 State(一) YAML1. 简介YAML是一种易于理解和使用的标记语言,非常适合写配置文件。Saltstack的SLS文件默认是以YAML渲染的,YAML引擎会把SLS文件里的YAML数据结构转化成Python语言的数据结构,将用户写的配置传递给Salt,转化成Python代码执行。 YAML在线解析:http://yaml-online-parser.appspot.com/ 2. 语
https://kangxiaoning.github.io/2016/07/27/ansible-role/
四、 roles(一) roles介绍roles基于已定义的文件结构,自动加载vars_files、tasks、handlers等,只需要将相关内容放置规定的目录下即可。 1. 结构如下roles目录下定义了两个role,分别是common和webservers,每个role的目录是定义好的,并不是每个目录都是必须的,只要用到的目录存在即可。 123456789101112131415161718
https://kangxiaoning.github.io/2012/09/23/dg-exception-08/
DG端缺少文件导致MRP无法启动 环境信息 报错内容 解决方法 分析总结 DG端缺少文件导致MRP无法启动环境信息123456789101112131415g3ah1040:trustdw > uname -aHP-UX g3ah1040 B.11.31 U ia64 2074247468 unlimited-user licenseg3ah1040:trustdw > g
https://kangxiaoning.github.io/2016/07/29/ansible-loop/
七、 循环循环语法有多种,最常用的是 with_items ,如下练习了两种语法。 (一) with_items1234567891011121314151617181920[root@SZB-L0022911 ansible]# more playbooks/learning_with_items.yml ---- hosts: db gather_facts: False tasks:
https://kangxiaoning.github.io/2015/11/15/private-ca/
术语 知识点 1. 创建私有 CA 1.1 创建目录/文件 1.2 生成 CA 私钥 1.3 生成 CA 证书 2. CA 签发证书 2.1 用户生成 csr 2.1.1 生成私钥 2.1.2 生成证书请求 2.2 提交证书请求 2.3 签发证书 2.4 查看证书信息 3. 吊销证书 3.1 获取待吊销证书的序列号 3.2 吊销证书 3.3 更新证书吊销列表 3.4 查看吊销列表
https://kangxiaoning.github.io/2016/06/15/requisite-ordering/
(四) 状态依赖1. require添加require前 123456789[root@salt-master web]# more httpd.sls make sure httpd is running: service.running: - name: httpdmake sure httpd is installed: pkg.installed: - name: http
https://kangxiaoning.github.io/2016/06/18/custom-state/
七、 扩展(一) 自定义state支持自定义state,放在指定目录并同步到minion即可使用。 123456[root@salt-master _states]# pwd/srv/salt/_states[root@salt-master _states]# ls -ltotal 4-rw-r--r-- 1 root root 1550 Jul 10 15:41 custom.py[root@
https://kangxiaoning.github.io/2017/03/04/file-recurse/
根据OS版本同步目录1. Ensure that some text appears at the end of a file12345append dns in hosts file: file.append: - name: /etc/hosts - text: - 192.68.8.1 test.abc.com 2. 确保指定目录和master端的目录内容一致Re
https://kangxiaoning.github.io/2012/09/23/dg-exception-06/
No standby redo logfiles of size 2048000 blocks available 环境信息 报错内容 解决方法 分析总结 参考文档 No standby redo logfiles of size 2048000 blocks availableDG报错,本次现象可以看到,此错误一旦出现,DG同步将变的非常慢。 环境信息1234567891011121
https://kangxiaoning.github.io/2016/07/29/ansible-when/
六、 条件判断(一) when可用于task,role和include,在满足条件时task才会被执行。 1234567891011121314151617181920[root@SZB-L0022911 ansible]# more playbooks/learning_condition.yml ---- hosts: db tasks: - name: get httpd statu
https://kangxiaoning.github.io/2016/09/04/config-gitfs/
如下操作在master/syndic节点执行。 1. 安装依赖12unzip GitPython.zip cd GitPython;yum -y install *.rpm 2. 配置 saltstack修改 /etc/salt/master 添加如下配置。 1234567fileserver_backend: - git - rootsgitfs_remotes: - [email protected].
https://kangxiaoning.github.io/2016/07/24/ansible-env/
一、 实验环境(一) 架构 (二) 资源规划 角色 IP Ansible 10.20.23.180 被管理主机 10.20.19.101 被管理主机 10.20.19.102 被管理主机 10.20.19.103 被管理主机 10.20.19.105 (二) 安装1. Ansible安装包如果 yum 仓库有 ansible 的包直接用 yum install a
https://kangxiaoning.github.io/2016/06/10/remote-execution/
四、 远程执行(一) salt命令格式目的:通过一定条件过滤出target,在指定target执行命令。 Salt ‘<target>‘ <function> [arguments] (二) targeting1. 单个minion12345678910111213141516171819202122[root@CNSZ045494 ~]# salt 'cnsz032872
https://kangxiaoning.github.io/2012/09/23/dg-exception-03/
DG不传输日志 环境信息 报错内容 解决方法 分析总结 DG不传输日志ctsdb的DG库2月1号同步出现异常,不传输日志到standby库。 环境信息123456789101112131415drcdb03:ctsdb1 >uname -aHP-UX drcdb03 B.11.23 U ia64 4003443204 unlimited-user licensedrcdb03:c
https://kangxiaoning.github.io/2016/08/17/using-file-service/
https://kangxiaoning.github.io/2019/02/15/mail-server/
https://kangxiaoning.github.io/2016/08/17/client-api-2/
https://kangxiaoning.github.io/2012/09/23/dg-exception-05/
FCR库DG异常导致日志备份失败 环境信息 报错内容 解决方法 分析总结 FCR库DG异常导致日志备份失败先了解下FCR的DG环境:生产 -> 同城DG -> 上海DG. 日志清理策略 –生产策略 CONFIGURE ARCHIVELOG DELETION POLICY TO SHIPPED TO ALL STANDBY; –同城DG策略 CONFIGURE ARCHIVE
https://kangxiaoning.github.io/2012/07/04/goldengate-exception-01/
概念解释 1. LAG 2. Extract进程LAG 3. Datapump进程LAG 4. Replicat进程LAG 概念解释对一些基本术语做出解释,部分概念摘自官方文档或者MOS,未作翻译,目的是保持概念的准确性。 1. LAGLAG is the elapsed time between when a transaction is written to a storage m
https://kangxiaoning.github.io/2016/09/30/salt-state-archive-extracted/
https://kangxiaoning.github.io/2012/07/04/goldengate-exception-03/
突发异常 问题现象 TCP/IP error 239 (Connection refused) 报错内容 解决方法 分析总结 参考文档 问题现象 TCP/IP error 79 (Connection refused) 报错内容 解决方法 分析总结 参考文档 问题现象 OGG-00730 报错内容 解决方法 分析总结 参考文档 问题现象 GGS 218 报错内容 解决方法 分析总结
https://kangxiaoning.github.io/2016/06/12/saltstack-job/
五、 Job管理(一) 当前运行job管理1. 常用function123saltutil.runningsaltutil.find_job <job id>saltutil.kill_job 2. 模拟job1salt '*' cmd.run 'sleep 30;df -h' 3. 查看job方法一另开一个终端,执行查看命令 12345678910111213141516171819
https://kangxiaoning.github.io/2016/06/21/test-gitfs/
九、 gitfs(一) 使用gitfs1. 安装依赖包pip方式 1pip install GitPython yum 方式 因为yum仓库有问题,所以先从可用仓库下载依赖包,再传到其它机器安装。 1yumdownloader --destdir=/software/GitPython/ --resolve GitPython 2. 配置fileserver_backend12345[root@S
https://kangxiaoning.github.io/2017/06/08/ansible-tower/
参加redhat为期半天的ansible tower实践营,虽然有ansible使用经验,也收获了一些东西。 培训速度比较快,没来的及做一些笔记,重点信息记录如下。 1. 环境信息redhat给提供的aws ec2环境,各人在自己的环境练习,结束后环境收回。 12345678910111213[all:vars]ansible_user=ec2-useransible_ssh_pass=chang
https://kangxiaoning.github.io/2016/06/19/client-api-1/
(二) 使用Client API使用案例 1. KVM内存报表123456789101112131415161718192021222324252627282930313233343536373839404142434445import salt.clientlocal = salt.client.LocalClient()def memoryreport(): fullinfo = loc
https://kangxiaoning.github.io/2016/07/29/ansible-api/
八、 API有时候需要编写 python 代码调用 ansible 的 API,如下是个 ping 的示例。 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172[root@SZB-
https://kangxiaoning.github.io/2016/06/20/test-beacons/
八、 beacons(一) 监控文件示例1. 配置master123456789101112131415{% raw %}[root@SZB-L0022911 ~]# tail -3 /etc/salt/masterreactor: - salt/beacon//inotify//importantfile: - /srv/reactor/backup.sls[ro
https://kangxiaoning.github.io/2016/07/03/salt-state-append-line/
https://kangxiaoning.github.io/2016/09/01/install-gitlab/
备注gitlab-ce-8.9.9-ce.0.el7.x86_64.rpm 这个版本从backups文件restore后,在页面看不到Repository菜单。升级到 gitlab-ce-8.9.11-ce.0.el7.x86_64.rpm 正常,升级步骤如下。 12345# 主备都需要升级gitlab-ctl statusgitlab-ctl uninstallrpm -e gitlab-cer
https://kangxiaoning.github.io/2016/07/25/ansible-ad-hoc/
二、命令行方式ansible默认使用SSH对设备进行管理,所以远程控制可以基于密码或者SSH信任登陆主机。 如下都是指定了 -k 选项,表示希望输入密码,如果要实现无密码访问使用 ssh-keygen 和ssh-copy-id 来实现公钥下发即可,此处略过这些配置。 (一) ping12345678910111213[root@SZB-L0022911 ansible]# ls -l\u603b\
https://kangxiaoning.github.io/2016/06/14/configuration-management/
(三) 状态管理 1. 内核参数编写SLS文件,描述指定targeting的主机参数状态,如果不是这个状态则会修改成这个状态,如果已经是这个状态则略过。 1234567891011[root@salt-master init]# more sysctl.sls net.ipv4.ip_forward: sysctl.present: - value: 1vm.swappiness: s
https://kangxiaoning.github.io/2016/06/07/saltstack-auth/
二、 认证管理(一) 添加/删除key第一次使用需要在master端添加受管理的minion,通过salt-key完成,可添加单个minion,也可一次添加所有minion,通过salt-key –h查看帮助获取添加、删除、拒绝等使用方法。 12345678910111213141516171819202122232425262728293031[root@SZB-L0008180 pillar]
https://kangxiaoning.github.io/2012/09/23/dg-exception-01/
ORA-38868 环境信息 报错内容 解决方法 分析总结 ORA-38868数据库alert报错,并且MRP进程无法启动,数据库同步发生了异常。 环境信息123456789101112131415cnsh230249:cfods > uname -aLinux cnsh230249 2.6.18-164.9.1.el5 #1 SMP Wed Dec 9 03:27:37 EST
https://kangxiaoning.github.io/2016/06/06/saltstack-env/
一、 实验环境(一) 资源规划 角色 IP Master 10.20.19.100 minion 10.20.19.101 minion 10.20.19.102 minion 10.20.19.103 minion 10.20.19.105 (二) Linux平台安装1. Master安装12yum -y install salt-masterchkconfig
https://kangxiaoning.github.io/2012/09/23/dg-exception-02/
ORA-01157/ORA-01110/ORA-27037 环境信息 报错内容 解决方法 分析总结 ORA-01157/ORA-01110/ORA-27037这个报错导致数据库MRP进程无法启动,同步无法进行。 环境信息12345678910111213141516z3bi8010:10g:dr_kiss > uname -aAIX z3bi8010 3 5 0003B872D9
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.