- 博客(345)
- 资源 (9)
- 收藏
- 关注
原创 secure keyboard entry is enabled because another app has turned it on.
secure keyboard entry is enabled because another app has turned it on.
2025-04-01 23:57:12
236
原创 Cassandra On Docker
创建创建网络docker network create cassandra启动一个临时的cassandra(注意,只是测试,关闭docker后cassandra容器会删除)docker run --rm -d --name cassandra --hostname cassandra --network cassandra cassandra连接cassandra直接进docker连接docker exec -it cassandra sh无用户名docker run -i.
2022-04-27 11:19:35
1042
原创 MQTT测试
使用mqttX + mosquitto测试QoS无论选0,1,2,选择Retain时,新加入的订阅者都只会收到最后一次消息。QoS说明:What is Quality of Service?The Quality of Service (QoS) level is an agreement between the sender of a message and the receiver of a message that defines the guarantee of delivery for
2022-04-26 22:34:22
1766
1
原创 MQTT简介
介绍说明mqtt协议说明MQTT Version 5.0https://docs.oasis-open.org/mqtt/mqtt/v5.0/mqtt-v5.0.htmlbroker的实现流行的有两个:Mosquitto,EMQXMosquittoeclipse对mqtt broker的官方实现An open source MQTT broker官网说明:https://mosquitto.org/The server listens on the following ports:.
2022-04-26 18:50:34
4644
原创 Kafka in Docker
先起 zookeeper ,依赖docker run -d --name zookeeper -p 2181:2181 -t wurstmeister/zookeeper再起kafkadocker run -d --name kafka -p 9092:9092 -e KAFKA_BROKER_ID=0 -e KAFKA_ZOOKEEPER_CONNECT=192.168.0.105:2181 -e KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://192.168.0.1
2021-12-15 21:20:01
1842
原创 thymeleaf内容替换
<ul th:each="poetrie : ${poetries}"> <li th:text="${poetrie.title}">Onions</li> <li th:text="${poetrie.author}">yes</li> <li th:utext="${poetrie.content.replace('|','<br />')}">2.41</li&g
2021-10-14 10:51:24
1831
原创 k8s删除pvc/pv/pod 时一直处在Terminating
##pvc,pvkubectl patch pvc data-nfs-server-provisioner-0 -p '{"metadata":{"finalizers": [null]}}' --type mergekubectl patch pv data-nfs-server-provisioner-0 -p '{"metadata":{"finalizers":null}}'##pok delete po nfs-server-provisioner-0 --grace-period=0
2021-10-02 00:22:59
1789
原创 k8s安装redis-sentinel
使用heml安装修改可修改的master名:masterSet: mymaster副本:replicaCount: 3开启sentinel:enabled: true设密码redis:password:安装helm install -ndev redis-sentinel bitnami/redis --values values.yaml查看看主从关系kubectl logs redis-sentinel-node-0 sentinel -ndev看redis主机信息
2021-09-30 16:48:42
799
原创 Springboot Redisson 配置
加入edisson-spring-boot-starter,注意 要替换成如下新版本implementation("org.redisson:redisson-spring-boot-starter:3.16.3")工程resources中加入配置文件redisson.yamlsentinelServersConfig: idleConnectionTimeout: 10000 connectTimeout: 10000 timeout: 3000 retryAttempts: 3
2021-09-29 13:37:51
6746
2
原创 k8s添加删除label
label是key/value形式存在如yamecloud.kubernetes.io=master添加:kubectl label node sm-node2 yamecloud.kubernetes.io/node=masterlabel可以是node,pod等等删除:kubectl label node starbucks-mysql2 yamecloud.kubernetes.io/node-注意后面的-号,就是删除的意思:)参考:https://kubernetes.io/z
2021-09-24 21:02:52
2151
原创 Could not find method compile() for arguments on object of type org.gradle.api.internal.artifacts.
在command line执行命令gradle clean bootJar --no-daemon报错Could not find method compile() for arguments [io.micrometer:micrometer-registry-prometheus:1.5.11] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.常出现在
2021-09-22 21:55:36
3500
1
原创 centos添加互信
ssh-keygen && cat .ssh/id_rsa.pub >> .ssh/authorized_keys && chmod 700 .ssh/ && chmod 600 .ssh/authorized_keys
2021-09-18 13:42:44
315
原创 centos 本地安装mysql client
下载MySQL client 5.7https://download.youkuaiyun.com/download/evane1890/22348534先解压,然后本地安装sudo yum localinstall -y mysql-client5.7/*如果报错大多是mariadb-libs冲突,删除即可sudo yum remove mariadb-libs-5.5.68-1.el7.x86_64...
2021-09-10 17:31:43
1250
原创 container is running 9441280B beyond the ‘PHYSICAL‘ memory limit问题处理
报错:[2021-08-09 16:10:02.211]Container [pid=92799,containerID=container_e01_1625131199794_0236_01_000005] is running 9441280B beyond the ‘PHYSICAL’ memory limit. Current usage: 1.0 GB of 1 GB physical memory used; 2.5 GB of 2.1 GB virtual memory used. Kil
2021-08-09 17:08:20
744
原创 mysql client(客户端) 5.7 rpm 离线安装
解压tar xvf mysql-client5.7.tar安装sudo yum localinstall mysql-client5.7/*rpm包下载链接: https://pan.baidu.com/s/18DgTT6QqCQ7izzH0lokmDA 密码: 1i92–来自百度网盘超级会员V2的分享
2021-04-14 14:49:55
1137
原创 TIDB创建用户并授权
创建create user test identified by '123456';修改密码alter user test identified by '123789';创建库create database test1 char set utf8;授权grant all privileges on test1.* to test identified by 'tyui67890';
2021-04-14 12:57:11
1897
原创 Cannot resolve jdk.tools:jdk.tools:1.7
Cannot resolve jdk.tools:jdk.tools:1.7解决办法:在报错工程里加第一步<properties> <maven.compiler.source>8</maven.compiler.source> <maven.compiler.target>8</maven.compiler.target></properties>…………第二步 <build>
2021-04-07 15:31:23
4682
2
原创 Hadoop3.3.0安装与使用
brew install hadoop配置本地登陆cat ~/.ssh/id_rsa.pub > ~/.ssh/authorized_keys系统配置系统->共享里的:配置hadoop四个文件hadoop-env.sh添加java homeexport JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Homemapred-site.xml添加<configuration&
2021-03-23 14:42:39
802
原创 Springboot2.4 redisson 配置redis cluster6.2
Springboot redisson 配置redis clusterspring: redis: cluster: nodes: 192.168.9.1:6379 192.168.9.2:6379 192.168.9.3:6379 192.168.9.1:6380 192.168.9.2:6380 192.168.9.3:6380 ## 连接超时时间(毫秒) timeout: 5000 lettuce: pool: max-
2021-03-16 16:02:28
1440
原创 Cento7安装redis cluster6.2.1
准备机器三台192.168.9.1192.168.9.2192.168.9.3在每个机器上执行$ wget https://download.redis.io/releases/redis-6.2.1.tar.gz$ tar xzf redis-6.2.1.tar.gz$ cd redis-6.2.1$ sudo make MALLOC=libc PREFIX=/data/redis install修改三台机器的redis配置文件cp redis-6.2.1/redis.conf /
2021-03-16 11:22:29
185
原创 MacOS配置使用perl5
安装brew install perl5查看安装的文件位置brew info perl5path is /usr/local/Cellar/perl/5.32.1配置CLion找到可执行perl文件位置:/usr/local/Cellar/perl/5.32.1/bin/perl注意:perl5 interprete 要选中执行文件perl也可以通过where perl找使用/usr/local/bin/perl也行...
2021-03-15 22:57:25
928
原创 sysbench简单使用
下载文件wget https://repo.percona.com/yum/release/7/RPMS/x86_64/sysbench-1.0.20-6.el7.x86_64.rpm安装yum localinstall -y sysbench-1.0.20-6.el7.x86_64.rpm使用创建配置文件$ cat sysbench/tidb_confmysql-host=192.168.100.38mysql-port=4000mysql-user=rootmysql-passwo
2021-03-03 14:43:00
360
1
原创 tidb4.0.6离线安装
下载tidb-community-server-v4.0.6https://download.pingcap.org/tidb-community-server-v4.0.6-linux-amd64.tar.gz解压安装组件version=4.0.6tar xzvf tidb-community-server-${version}-linux-amd64.tar.gzsh tidb-community-server-${version}-linux-amd64/local_install.sh
2021-03-03 10:22:10
368
2
原创 编译安装单机版Redis6
下载wget https://download.redis.io/releases/redis-6.2.1.tar.gztar xzf redis-6.2.1.tar.gzcd redis-6.2.1编译centos7 编译有报错,一定要加参数据MALLOC=libc,或者SYSTEMD=yes make MALLOC=libc如果出错,clean一下,再执行上面的makemake distclean测试make test如果没有问题就安装一下指定命令位置make PREF
2021-03-02 18:09:44
131
原创 Linux(Centos7)机器间做互信
假如我们有三台机器:192.168.9.1 用做master192.168.9.2 用做node1192.168.9.3 用做node2先在每台机器上创建keyssh-keygen一路回车再在每个机器查看系统版本cat /etc/os-release或者cat /proc/version
2021-03-01 17:24:28
494
原创 Linux(CentOS)离现安装kubernetes1.19.2和docker应用
获取rpm离线包可以去网上下载,rpm包是有依赖的,担心不完整,最好的办法是找一台能下载的机器,比如本地、开发、测试环境的机器导出……完美~#导出k8syum install -y --downloadonly --downloaddir=/tmp/rpm kubelet-1.19.2 kubeadm-1.19.2 kubectl-1.19.2#导出dockeryum install -y --downloadonly --downloaddir=/tmp/docker docker-ce-19.
2021-03-01 15:10:22
481
原创 Linux(centos7)离线安装Kubernetes1.19.2和docker——images导入导出
前言服务器访问网络受限时,里面导出docker image导出所有k8s 相关的images到文件k8s.tardocker images |awk '{print $1}' | grep google_containers | xargs docker save -o k8s.tar 把k8s.tar 上传到离线安装的机器上,如:scp k8s.tar docker@192.168.29.3:~/导入image docker load < k8s.tar查看一下dock
2021-02-28 14:16:41
481
1
原创 kubernetes安装kafka
使用helm3安装helm install kafka bitnami/kafka查看使用kafka-client做测试kubectl exec --tty -i kafka-client --namespace default -- bash测试启动消费者kafka-console-consumer.sh \ --bootstrap-server kafka.default.svc.cluster.local:9092 \ --topic test \ --fro
2021-02-24 15:43:35
698
原创 k8s pod同步时区
示例apiVersion: v1kind: Podmetadata: name: counterspec: containers: - name: count image: busybox args: [/bin/sh, -c, 'i=0; while true; do echo "hello world: $i: $(date)"; i=$((i+1)); sleep 10; done'] volumeMounts: - mo
2021-02-19 16:38:26
1142
原创 Kubernetes上安装ELK监控
安装elk operator自定义的resource里面包含了es,kibana,filebeat等资源的定义,以及RBACkubectl apply -f https://download.elastic.co/downloads/eck/1.3.1/all-in-one.yaml安装escat <<EOF | kubectl apply -f -apiVersion: elasticsearch.k8s.elastic.co/v1kind: Elasticsearchmet
2021-02-09 22:54:44
686
1
原创 使用prometheus和grafana监控springboot应用
在启动工程中添加依赖Gradle// monitoringimplementation 'org.springframework.boot:spring-boot-starter-actuator:2.3.4.RELEASE'compile 'io.micrometer:micrometer-registry-prometheus'compile 'io.micrometer:micrometer-core'Maven <dependency>
2021-02-08 20:39:53
229
1
原创 kubernetes使用secrets保存敏感信息
- name: REDIS_PASSWORD valueFrom: secretKeyRef: name: redis-cluster key: redis-password
2021-01-22 22:44:57
1962
4
原创 Spring boot 使用Jasypt加密用户名密码
在application-local.yml中加入jasypt: encryptor: algorithm: PBEWithMD5AndDES iv-generator-classname: org.jasypt.iv.NoIvGenerator password: XyO8tet6i4dX14S #生产注意去除修改密码为ENC()形式生成密码参考:https://github.com/chenjiangtao/spring-boot-on-k
2021-01-21 17:48:38
1075
9
原创 生成mysql亿级压测数据程序
mysql sysbenchmysql sysbench是一款压测数据生成工具python3 生成压测数据说明quick_insert.py使用程序方式批量插入数据的脚本,需要引入依赖包 pymysqlquick_insert_threads.py多线程批量插入数据的脚本,需要引入依赖包 pymysql参数配置说明:写入总数为:threads * times * sql_batchoffset : 偏移量,默认是0。如果数据库有数据,可以设一个起始点(偏移量)threads :
2021-01-20 21:47:58
554
原创 Tidb查配置和添加配置
线上查改配置先登陆mysql -uroot -pPassw0rd -h127.0.0.1 -P4000再查、改设置-- 查tidb所有配置show config;-- 带条件show config where type='tidb'-- 设置单个节点的参数set config "192.168.88.201:4000" `token-limit`=10000;-- 设置角色的参数set config tidb `token-limit`=10000;启动时设置参数参考:http
2021-01-20 18:39:28
1639
原创 Spring Boot On Kubernetes示例
*********************** 欢迎Star ***********************spring boot on kubernetes的示例,包括:MQ(ActiveMQ,Rabbit MQ), Redis Cluster,DB(Mysql,TiDB),Kong/Nginx ingress controller,PersistentVolumeClaim,PersistentVolume,DefaultStorageClass,hpa……不断更新中…… 欢迎"Star"一.
2021-01-20 15:28:52
230
原创 Linux(centos7)历史命令UP/DOWN自动补全
在.bashrc中添加一段vi ~/.bashrcif [[ $- == i ]]thenbind ‘"\e[A": history-search-backward’bind ‘"\e[B": history-search-forward’fi使生效source ~/.bashrc测试
2021-01-20 14:01:36
742
原创 mac时间机器删除旧备份
查sudo tmutil listlocalsnapshots /删除sudo tmutil deletelocalsnapshots 2020-12-30-160125
2021-01-17 23:28:23
2197
原创 k8s配置admission-plugins(如DefaultStorageClass等)
配置vi /etc/kubernetes/manifests/kube-apiserver.yaml修改enable-admission-plugins项- --enable-admission-plugins=NodeRestriction,NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmi
2021-01-15 18:30:32
1496
原创 helm安装redis-cluster
安装helm install redis-cluster bitnami/redis-cluster -ndev查看用户密码和测试export REDIS_PASSWORD=$(kubectl get secret --namespace dev redis-cluster -o jsonpath="{.data.redis-password}" | base64 --decode)#测试连接kubectl run --namespace dev redis-cluster-client --
2021-01-15 16:49:42
2119
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人