随笔分类 -  linux+ubuntu+脚本

摘要:一,条件测试 1, 数值测试 [root@rocky ~]# ##[ $a -gt $b ] [root@rocky ~]# [ $A -gt $b ] [root@rocky ~]# [ $a -gt $b ] [root@rocky ~]# echo $? 1 注意:[ ]中间必须有空格否则会报 阅读全文
posted @ 2022-04-24 13:31 gg888666 阅读(97) 评论(0) 推荐(0) 编辑
摘要:[root@192-168-80-131 ~]# cat /etc/yum.conf [main] cachedir=/var/cache/yum/$basearch/$releasever #默认保存位置 keepcache=1 #改为1,保存下在的rpm包 yum install wget wg 阅读全文
posted @ 2022-02-22 00:10 gg888666 阅读(200) 评论(0) 推荐(0) 编辑
摘要:1,etcd 测试 一台节点 [root@localhost etcd]# cat install_etcd.sh #!/bin/bash # Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, 阅读全文
posted @ 2022-02-16 20:58 gg888666 阅读(80) 评论(0) 推荐(0) 编辑
摘要:1,nginx服务管理脚本 使用源码包安装Nginx不含带服务管理脚本,也就是不能使用"service nginx start"或"/etc/init.d/nginxstart",所以写了以下的服务管理脚本。 #!/bin/bash program=/apps/nginx/sbin/nginx pi 阅读全文
posted @ 2021-12-01 15:30 gg888666 阅读(40) 评论(0) 推荐(0) 编辑
摘要:ansible批量更改密码 playbook适合部署中大型项目,需要先规划# cat play.yml - hosts: test #ansible的hosts子组 gather_facts: false #决定是否开启收集功能 tasks: - name: change user passwd # 阅读全文
posted @ 2021-11-28 20:34 gg888666 阅读(43) 评论(0) 推荐(0) 编辑
摘要:1. mpstat的基本用法mpstat的全称为Multiprocessor Statistics,是一款常用的多核CPU性能分析工具,用来实时查询每个CPU的性能指标,以及所有CPU的平均指标。它是Linux性能工具集sysstat中的一个工具。 mpstat [-P {|ALL}] [inter 阅读全文
posted @ 2021-11-28 20:15 gg888666 阅读(278) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示