- 博客(19)
- 收藏
- 关注
原创 python 圣诞树、九九乘法表
#圣诞树:*for i in range(7,9): for k in range(1,i+1): print(format('*'*k,'>12') +format('*'*(k-1),'<12'))for j in range(1,5): print(format("*"*3,'^24'))#九九乘法表:k = 1sum = 1whil...
2019-12-26 21:41:32
229
转载 elk平台 --elasticsearch 中插件 head插件连不上其他主机问题解决
在elasticsearch 的配置文件/etc/elasticsearch/elasticsearch.yml 中写入下面代码:http.cors.enabled: truehttp.cors.allow-origin: "*然后刷新web界面即可。引用于https://www.cnblogs.com/wt645631686/p/10056023.html...
2019-05-10 12:10:34
583
原创 ftp 文件共享
FTP : 文件传输协议软件包: vsftpdftp端口: 控制端口 21/tcp数据端口 20/tcp配置文件: /etc/vsftpd/vsftpd.conf有主动模式和被动模式注释:1、控制端口是用来建立连接的,不能传数据2、主动模式是服务器主动送达,客户端需要提供地址,不安全3、被动模式是客户端去服务器取4、主动和被动是由客户端决定的两种模式的工作原理:主动模式...
2019-05-08 09:21:32
516
原创 nfs 同步共享文件
nfs 服务器软件包: nfs-utils端口号: 2049/tcp配置文件 /etc/exports服务器端:yum -y install nfs-utils 安装nfssystemctl start nfssystemctl enable nfs例如:mkdir -p /etc/dir1vim /etc/exports 建立分享区/etc/dir1 ...
2019-05-08 09:04:02
508
转载 集群概述
集群技术有:LB :load balancing 负载均衡集群 :提高负载,提高并发量qps分为7层负载均衡: nginx 和 HAproxy4层负载均衡 软件: lvs 和 HAproxy硬件: 集群F5(BigIP) 和redwareHA : 好、High Availability 高可用 : 使用虚拟ip 解决单点故障问题RHCS : 红帽推出的集群软件HPC...
2019-05-01 15:18:20
129
转载 rabbitmq 集群部署
安装 erlang 环境yum安装socat 的rpm包安装 rabbitmq安装Erlang[root@localhost ~]# vim /etc/yum.repos.d/erlang.repo[rabbitmq-erlang]name=rabbitmq-erlangbaseurl=https://dl.bintray.com/rabbitmq-erlang/rpm/erlang...
2019-04-28 12:49:37
128
转载 LB
保证dr这台机器数据包是从dip发出去的如何判断:谁的路由条目在上面,谁就是dip,另一个就是vipVS/DR模式的原理是: 当一个client发送一个请求到VIP,Director根据VIP选择对应的real-server的Pool,根据算法,在Pool中选择一台Real-server,然后将client的请求包发给选择的Real-server,最后选择的Real-server把应答包直...
2019-04-25 10:38:45
313
转载 删除bond0
删除bonding:1.ifconfig bond0 down(这步只能临时禁用)2.rm -rf ifconfig-bond0引用于> https://blog.youkuaiyun.com/Ketchup_/article/details/77917634
2019-04-22 16:17:58
6144
原创 nginx 知识小点
nginx 基本配置coremodule 全局配置 核心模块eventmodule 事件驱动模块httpcoremodule http内核模块–网站服务器模块1、查看nginx的版本[root@www ~]# nginx -vnginx version: nginx/1.14.22、 检查nginx的语法nginx -t3、nginx 命令nginx -s stopng...
2019-04-19 15:35:57
154
原创 检测是否有人在抢自己的ip
检查别人抢ip 方法 mac一个就是没人抢[root@www html]# arping -I eth0 10.0.112.47ARPING 10.0.112.47 from 10.0.112.134 eth0Unicast reply from 10.0.112.47 [00:0C:29:21:F6:3C] 1.560msUnicast reply from 10.0.112.47 ...
2019-04-17 21:07:18
315
原创 nginx安装源代码
centos7 下载nginx源码包的代码,有些地方可能会停下,重跑一次有可能解决问题#!/bin/bashif test -e /etc/yum.repos.d/base.repothen echo "base.repo is existed"else wget -O /etc/yum.repos.d/base.repo http://mirrors.aliyun.com/repo/...
2019-04-15 21:44:21
129
原创 iptables A主机 ping B 主机
在iptables中, 想要 A 主机 可以ping B 主机 可以如下设置:[root@localhost ~]# iptables -A INPUT -s IP(B主机) -d IP(A主机) -p icmp --icmp-type 0 -j ACCEPT[root@localhost ~]# iptables -A OUTPUT -s IP(A主机) -d IP(B主机) -p ...
2019-04-14 15:17:49
822
转载 linux命令缩写
项目名Linux – LINUs’ uniX (开个玩笑不是这样的,别当真)GNU – Gnu is Not Unix目录名/boot:顾名思义/root :同上/run:同上/home:同上/etc:ETCetera/bin:BINaries/dev:DEVices/lib:LIBraries/mnt:MouNT/proc:PROCesses/tmp:TeMPorar...
2019-04-14 11:28:21
271
原创 Python猜数字游戏脚本
Python猜数字游戏脚本while True: k=0 while k < 3: inp=input("\033[31m 请输入数字: \033[0m") if inp.isdigit(): ip = int(inp) if ip == 18: print("\033[31m 答对了 \033[0m") break elif ip > ...
2019-04-13 09:38:39
237
原创 安装python 脚本初稿
2019 04 11 初写自动安装Python脚本,以后完善#!/bin/bashif ! ping -c2 www.baidu.com &> /dev/nullthen echo yum is bad exitfi yum -y install gcc gcc-c++ zlib-devel bzip2-devel openssl-devel sqlite-deve...
2019-04-11 13:43:32
109
原创 nginx Job for nginx.service failed because the control process exited with error code. See "systemct
在centos7刚安装nginx 后启动报错:[root@localhost html]# systemctl restart nginxJob for nginx.service failed because the control process exited with error code. See “systemctl status nginx.service” and “journa...
2019-04-09 21:17:20
1445
原创 ssh 自动链接 shell 练习脚本
!/bin/baship=10.0.112.144pass=centosif test ! -e /root/.ssh/id_rsathenssh-keygen -t rsa -f /root/.ssh/id_rsa -P “”fi/bin/expect <<EOFspawn ssh-copy-id -i root@KaTeX parse error: Can't u...
2019-04-09 20:34:14
253
原创 连不上xshell
centos7 昨天安装阿帕奇,导致今天虚拟机连不上shell了,可以ping外网,yum 安装ssh-server 或clients 都显示已安装过了,ss -ant 没有22 号端口 ,最后重启ssh systemctl start sshd启动服务了。可以连xshell了。但查以前的文章说重启服务是service ssh start 可能是之前的版本。...
2019-04-08 10:53:25
230
原创 Last_IO_Errno: 1130
菜鸟上路——1130 :Last_IO_Error: error connecting to master ‘cong@10.0.112.176:3306’ - retry-time: 60 retries: 95今天,学习搭建centos7 mysqld 的主从复制,出现了代码为1130 :Last_IO_Error: error connecting to master ‘cong@1...
2019-03-28 20:39:42
1184
2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人