Linux 操作系统运维必备的实用工具有哪些?
15. maxretry = 5 # 尝试错误次数覆盖全局中的 maxretry 1. [root@localhost ~]# touch /var/log/sshd.log 2. [root@localhost ~]# service fail2ban restart 3. [root@localhost ~]# fail2ban-client status # 查看监控已经开启 4. Status 5. |- Number of jail: 1 6. `- Jail list: ssh-iptables 7. [root@localhost ~]# iptables -L #iptables 过滤表有 fail2ban 一条规则 8. fail2ban-SSH tcp -- anywhere anywhere tcp dpt:ssh 十. 连接会话终端持续化 - Tmux Tmux 是一个优秀的终端复用软件类似 GNU Screen 比 Screen 更加方面、灵活和高效。为了确保连接 SSH 时掉线不影响任务运行。 rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm(安装第三方 YUM 源) 十一. 页面显示磁盘空间使用情况 - Agedu 1. [root@localhost ~]# tar zxvf agedu-r9723.tar.gz 2. [root@localhost ~]# cd agedu-r9723 3. [root@localhost ~]# ./configure 4. [root@localhost ~]# make && make install 5. [root@localhost ~]# agedu -s / #-s 扫描 6. [root@localhost ~]# agedu -w --address 192.168.0.10:80 #-w 输入一个网页链接 7. [root@localhost ~]# agedu -w --address 192.168.0.108080 --auth none #--auth 关闭认证如果不加端口号会生成一个随机的用浏览器访问 十二. 安全扫描工具 - NMap NMap 是 Linux 下的网络连接扫描和嗅探工具包用来扫描网上电脑开放的网络连接端。 1. [root@localhost ~]# tar jxvf nmap-6.40.tar.bz2 2. [root@localhost nmap-6.40]# ./configure 3. [root@localhost nmap-6.40]# make && make install 4. [root@localhost ~]# nmap 192.168.0.10 #获取基本信息 5. [root@localhost ~]# nmap -O 192.168.0.10 #获取系统版本信息 6. [root@localhost ~]# nmap -A 192.168.0.10 #获取系统综合信息 7. [root@localhost ~]# nmap 192.168.0.0/24 # 获取一个网段工作设备基本信息 · -sSTCP 扫描 · -sV 系统版本检测 十三.Web 压力测试 - Httperf Httperf 比 ab 更强大,能测试出 web 服务能承载的最大服务量及发现潜在问题;比如:内存使用、稳定性。最大优势:可以指定规律进行压力测试,模拟真实环境。 1. [root@localhost ~]# tar zxvf httperf-0.9.0.tar.gz 2. [root@localhost ~]# cd httperf-0.9.0 3. [root@localhost httperf-0.9.0]# ./configure 4. [root@localhost httperf-0.9.0]# make && make install 5. [root@localhost ~]# httperf --hog --server=192.168.0.202 --uri=/index.html --num-conns=10000 --wsess=10,10,0.1 参数说明: --hog:让 httperf 尽可能多产生连接,httperf 会根据硬件配置,有规律的产生访问连接 --num-conns:连接数量,总发起 10000 请求 --wsess: 用户打开网页时间规律模拟,第一个 10 表示产生 10 个会话连接,第二个 10 表示每个会话连接进行 10 次请求,0.1 表示每个会话连接请求之间的间隔时间 / s 【编辑推荐】
点赞 0 (编辑:晋中站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |