- 博客(15)
- 收藏
- 关注
转载 使用tcpdump抓包实例
tcpdump通过调用网卡驱动进行网络抓包,在网络诊断,数据包分析的时候,特别有用。例子如下: tcpdump -i eno16777728 host 192.168.52.1 #抓取本机到192.168.52.1主机的数据包 tcpdump -i eno16777728 -nnn host 192.168.52.1 and tcp port 25 #...
2019-08-12 18:53:00
315
转载 导入模块的2种方法
模块其实就是计算机中的一个py文件,可以把一个模块导入到当前py程序中,以增强其功能。导入模块使用import命令。 例如i mport math math.sqrt(9) In [7]: mathmath In [7]: math.sqrt(9)Out[7]: 3.0 使用import math。这必须先写上模块名,然后写函数名。例如math.sqrt() 另外一个...
2019-08-11 22:06:00
749
转载 ansible启用sudo执行命令
今天又一个要求,想通过sudo的普通用户执行ansible的命令,而不是通过root用户去执行系统管理的命令。步骤如下 一、先修改ansible.cfg文件,启用sudo,指定sudo的用户为lisi forks = 5#poll_interval = 15sudo_user = lisi#ask_sudo_pass = True#ask_pass = Tr...
2019-08-05 10:53:00
1127
转载 centos6 安装完epel 解决yum的问题
转载于:https://www.cnblogs.com/gdlinux/p/11235770.html
2019-07-24 09:07:00
280
转载 mysql MHA的工作原理
图片说明: Manager实际为一个监控,不断的对master、slave1、slave2、slave3进行监控 Manger如果发现其中一个slave有异常,则会将其中一个延迟较小的从库提升为主库,而且使得数据一致 转载于:https://www.cnblogs.com/gdlinux/p/11075181.html...
2019-06-24 07:57:00
891
转载 shell脚本1例 自动安装httpd
#!/bin/bash read -n 1 -p "是否已将httpd-2.2.17源码包放到root目录下,确认按Y" p # -n 1指定只能读入一个字符 test "$p" = "y" -o "$p" = "Y" if [ $? -eq 0 ] then rpm -qa | grep httpd rpm -e ...
2017-06-21 15:01:00
261
转载 自动安装zabbix agent的shell脚本
#!/bin/bash #install the zabbix agent #Create by ShiYong id zabbix &> /dev/null || useradd -s /sbin/nologin zabbix mkdir /etc/zabbix /var/log/zabbix chown zabbix.zabbix /var/log/zabbi...
2017-05-12 17:07:00
256
转载 centos6 10分钟快速搭建iscsi存储服务器
1、系统架构 2、安装软件 yum list | grep target yum -y install scsi-target-utils.x86_64 3、修改配置文件 先准备一个硬盘进行分区 /dev/sdb1(这里省略) vi /etc/tgt/targets.conf 16 default-driver iscsi ...
2017-05-03 11:33:00
271
转载 iptables之raw表
防火墙iptables对于系统安装特别重要,我们知道,iptables默认有4个表5个链,表我们一般使用filter、nat表,但是raw(原始表)不怎使用 举例: iptables -t raw -A PREROUTING -s 192.168.10.117 -j NOTRACK #在raw表的PREROUTING链中添加一个规则,对来自于地址 192.168.10....
2017-05-02 17:39:00
598
转载 awk技巧一则——指定多个分隔符
cat /proc/net/dev Inter-| Receive | Transmit face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo ...
2017-05-02 16:10:00
945
转载 mysqld_safe启动mysql数据库的参数
一般启动mysql可以使用/etc/init.d/mysqld启动进行启动 #/etc/init.d/mysqld start 也可以使用/usr/local/mysql/bin/mysqld_safe进行启动 chown -R mysql:mysql /data 1)#/usr/local/mysql/scripts/mysql_install_db --user=m...
2017-05-01 21:50:00
382
转载 在apache中运行 cgi程序
cgi 就是网站中各种后台的程序,该程序可以通过网页运行,cgi可以通过C编写,也可以通过shell,python编写 如何在apache中运行各种cgi程序,例如shell perl等程序 1、在apache的主配置文件httpd.conf 中添加 Scriptalias /cgi "/usr/local/httpd/cgi-bin/" 然后重启 httpd service ...
2017-04-30 15:13:00
283
转载 修改Centos7/RHEL7的主机名
Centos7修改主机名与Centos6不一样 使用命令 # hostnamectl set-hostname ipa7.example.com 文件为 /etc/hostname cat /etc/hostname ipa7.example.com 查询主机名 # hostname ipa7.example.com 转载于:https://www....
2017-04-30 14:51:00
169
转载 解决zabbix启动报错
当启动zabbix_server的时,报错:zabbix is not running ,the information displayed may not be current 解决办法:查看zabbix服务器日志/var/log/zabbix_server.log tail -f /var/log/zabbix_server.log ...
2017-04-25 11:40:00
373
转载 使用docker搭建gitlab版本控制系统
1. GitLab 简介 GitLab 是一款基于 git 的开源代码仓库系统 GitLab 与著名的 GitHub 最大的区别就是: 允许我们搭建自己的 git 代码私有仓库,非常方便 2、安装Gitlab 安装Gitlab特别的复杂,因此这里我们使用docker搭建一款Gitlab,特别方便 (1)在Centos7上面安装docker #...
2017-04-25 10:57:00
238
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅