摘要: 阅读全文
posted @ 2019-08-01 19:09 AllenHU320 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Linux终端复用神器-Tmux使用梳理 Tmux是一个优秀的终端复用软件,类似GNU Screen,但来自于OpenBSD,采用BSD授权。使用它最直观的好处就是,通过一个终端登录远程主机并运行tmux后,在其中可以开启多个控制台而无需再“浪费”多余的终端来连接这台远程主机;是BSD实现的Scre 阅读全文
posted @ 2019-08-01 19:08 AllenHU320 阅读(97) 评论(0) 推荐(0) 编辑
摘要: screen -S yourname -> 新建一个叫yourname的sessionscreen -ls -> 列出当前所有的sessionscreen -r yourname -> 回到yourname这个sessionctrl + ad detach某个session # screen -S 阅读全文
posted @ 2019-08-01 19:05 AllenHU320 阅读(90) 评论(0) 推荐(0) 编辑
摘要: Ansible是一个简单高效的自动化运维管理工具,用Python开发,能大批量管理N多台机器,可以并发的在多台机器上部署应用、安装软件、执行命令、配置和编排任务。 一、Ansible工作机制 从图中可以看出ansible分为以下几个部份: 1) Control Node:控制机器 2) Invent 阅读全文
posted @ 2019-08-01 18:58 AllenHU320 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 简单的执行跟踪,会使得Shell显示每个被执行到的命令sh -x delete.sh 查找与替换grepsed -i "s/t_rs_customer/t_rs_customer_bak/g" t_rs_customer_bak.sql 使用cut选定字段cut -d : -f 1,5 /etc/p 阅读全文
posted @ 2019-08-01 18:45 AllenHU320 阅读(137) 评论(0) 推荐(0) 编辑
摘要: [root@temp ~]# lsof -p 5643COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAMEoracle 5643 oracle cwd DIR 8,2 4096 1556206 /u01/app/oracle/product/10.2. 阅读全文
posted @ 2019-08-01 18:12 AllenHU320 阅读(220) 评论(0) 推荐(0) 编辑
摘要: ulimit -a用来显示当前的各种用户进程限制 修改所有 linux 用户的环境变量文件:vi /etc/profileulimit -u 10000 #用户的最大进程数ulimit -n 4096 #每个进程可以打开的文件数目ulimit -d unlimited #数据段长度ulimit -m 阅读全文
posted @ 2019-08-01 18:06 AllenHU320 阅读(637) 评论(0) 推荐(0) 编辑
摘要: :set nu在命令模式下显示行号 进入输入模式 新增 (append) a :从光标所在位置後面开始新增资料,光标後的资料随新增资料向後移动。 A:从光标所在列最後面的地方开始新增资料。 插入 (insert) i:从光标所在位置前面开始插入资料,光标後的资料随新增资料向後移动。 I :从光标所在 阅读全文
posted @ 2019-08-01 17:57 AllenHU320 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 按G进行排序du -sh * | grep G | sort -nr 阅读全文
posted @ 2019-08-01 17:50 AllenHU320 阅读(1894) 评论(0) 推荐(0) 编辑
摘要: 修改方式:使用root权限修改ssh的配置文件,vim /etc/ssh/sshd_config增加一行记录:UseDNS no修改GSSAPIAuthentication参数为 no,默认是yesPermitRootLogin 注释掉 重启服务 阅读全文
posted @ 2019-08-01 17:46 AllenHU320 阅读(121) 评论(0) 推荐(0) 编辑
摘要: perf 是一个调查 Linux 中各种性能问题的有力工具。 # perf --help usage: perf [--version] [--help] COMMAND [ARGS] The most commonly used perf commands are: annotate Read p 阅读全文
posted @ 2019-08-01 17:38 AllenHU320 阅读(2294) 评论(0) 推荐(0) 编辑
摘要: grep -rn "map" * 说明:-r 是递归查找-n 是显示行号* : 表示当前目录所有文件,也可以是某个文件名 阅读全文
posted @ 2019-08-01 17:27 AllenHU320 阅读(260) 评论(0) 推荐(0) 编辑
摘要: $ iotop -oP命令的含义:只显示有I/O行为的进程 阅读全文
posted @ 2019-08-01 17:20 AllenHU320 阅读(916) 评论(0) 推荐(0) 编辑
摘要: 可以使用一下命令查使用内存最多的10个线程 ps aux | sort -k4nr | head -n 10 可以使用一下命令查使用CPU最多的10个线程 ps aux | sort -k3nr | head -n 10 查看最消耗CPU的线程# ps H -eo pid,pcpu|sort -nk 阅读全文
posted @ 2019-08-01 17:11 AllenHU320 阅读(496) 评论(0) 推荐(0) 编辑
摘要: 运维工程师必会的109个Linux命令 文件管理basename:从文件名中去掉路径和扩展名 cat:把档案串连接后传到基本输出(屏幕或加 > filename 到另一个档案)cd:切换目录chgrp:变更文件或目录的所属群组chmod:变更文件或目录的权限chown:变更文件或目录的拥有者或所属群 阅读全文
posted @ 2019-08-01 11:49 AllenHU320 阅读(238) 评论(0) 推荐(0) 编辑
摘要: 升级gityum -y update git 配置阿里云yum源yum -y update nssyum -y update nss curl libcurl 阅读全文
posted @ 2019-08-01 11:34 AllenHU320 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 1.删除自带的yum源:#cd /etc/yum.repos.d/#rm -rf * 2.配置远程yum源:wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repowget -O /e 阅读全文
posted @ 2019-08-01 11:30 AllenHU320 阅读(993) 评论(0) 推荐(0) 编辑
摘要: CentOS 7 vs CentOS 6的不同(1)桌面系统[CentOS6] GNOME 2.x[CentOS7] GNOME 3.x(GNOME Shell) (2)文件系统[CentOS6] ext4[CentOS7] xfs (3)内核版本[CentOS6] 2.6.x-x[CentOS7] 阅读全文
posted @ 2019-08-01 11:24 AllenHU320 阅读(148) 评论(0) 推荐(0) 编辑