<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>明哥技术笔记</title>
    <link>http://test.mylass.com/</link>
    <description>Recent content on 明哥技术笔记</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <copyright>明哥技术笔记</copyright>
    <lastBuildDate>Sun, 28 Aug 2022 00:00:00 +0000</lastBuildDate><atom:link href="http://test.mylass.com/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>通过SQL查询zabbix历史数据</title>
      <link>http://test.mylass.com/database/zabbix-history-data-query/</link>
      <pubDate>Sun, 28 Aug 2022 00:00:00 +0000</pubDate>
      
      <guid>http://test.mylass.com/database/zabbix-history-data-query/</guid>
      <description>
        
          
            由于需要导出历史监控数据，但web界面不支持，所以通过mysqlL查询zabbix历史数据
          
          
        
      </description>
    </item>
    
    <item>
      <title>kafka 操作相关命令记录</title>
      <link>http://test.mylass.com/linux/kafka-command/</link>
      <pubDate>Thu, 25 Aug 2022 00:00:00 +0000</pubDate>
      
      <guid>http://test.mylass.com/linux/kafka-command/</guid>
      <description>
        
          
            kafka 操作相关命令记录，包含kafka ssl 和 sasl
          
          
        
      </description>
    </item>
    
    <item>
      <title>java 连接kafka demo程序</title>
      <link>http://test.mylass.com/linux/java-kafka/</link>
      <pubDate>Mon, 15 Aug 2022 00:00:00 +0000</pubDate>
      
      <guid>http://test.mylass.com/linux/java-kafka/</guid>
      <description>
        
          
            使用java连接kafka示例的demo程序，可以作为参考，同时还包含一些其它语言的测试
          
          
        
      </description>
    </item>
    
    <item>
      <title>python3客户端连接ssl kafka版本号错误</title>
      <link>http://test.mylass.com/linux/python-kafka-ssl-wrong-version-number/</link>
      <pubDate>Fri, 12 Aug 2022 00:00:00 +0000</pubDate>
      
      <guid>http://test.mylass.com/linux/python-kafka-ssl-wrong-version-number/</guid>
      <description>
        
          
            windows python客户端连接ssl kafka版本号错误，ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number
          
          
        
      </description>
    </item>
    
    <item>
      <title>nginx if判断实现逻辑运算 AND 和 OR 的方法</title>
      <link>http://test.mylass.com/linux/nginx-if-and-or/</link>
      <pubDate>Tue, 19 Jul 2022 00:00:00 +0000</pubDate>
      
      <guid>http://test.mylass.com/linux/nginx-if-and-or/</guid>
      <description>
        
          
            nginx if判断中实现 AND 和 OR 的逻辑的方法
          
          
        
      </description>
    </item>
    
    <item>
      <title>python3操作kafka sasl_ssl客户端程序</title>
      <link>http://test.mylass.com/python/python-ssl-kafka-clients/</link>
      <pubDate>Thu, 23 Jun 2022 00:00:00 +0000</pubDate>
      
      <guid>http://test.mylass.com/python/python-ssl-kafka-clients/</guid>
      <description>
        
          
            python kafkap客户端，带sasl认证和ssll加密
          
          
        
      </description>
    </item>
    
    <item>
      <title>pycurl 实现web服务质量探测</title>
      <link>http://test.mylass.com/python/web-service-quality/</link>
      <pubDate>Sun, 27 Feb 2022 00:00:00 +0000</pubDate>
      
      <guid>http://test.mylass.com/python/web-service-quality/</guid>
      <description>
        
          
            &lt;p&gt;这是一个小工具用，于测试接口响应时间，包括 DNS 解析时间， TCP建立连接时间， 传输数据时间等等。&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>kubeadmin安装k8s</title>
      <link>http://test.mylass.com/post/kubeadm_install/</link>
      <pubDate>Wed, 09 Feb 2022 00:00:00 +0000</pubDate>
      
      <guid>http://test.mylass.com/post/kubeadm_install/</guid>
      <description>
        
          
            &lt;p&gt;他是一个全新的基于容器技术的分布式架构领先方案。Kubernetes(k8s)是Google开源的容器集群管理系统（谷歌内部:Borg）。&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>alpine raspi 安装</title>
      <link>http://test.mylass.com/linux/alpine-raspi-install/</link>
      <pubDate>Thu, 19 Sep 2019 00:00:00 +0000</pubDate>
      
      <guid>http://test.mylass.com/linux/alpine-raspi-install/</guid>
      <description>
        
          
            参考 https://xts.so/linux/install-the-alpine-linux-on-raspberry-pi-zero-w.html
运行脚本
1setup-alpine 在安装的过程中，会提示你设置键盘布局、设置 WiFi 网络、设置时区、设置时间同步程序、设置apk软件源，设置root密码等等，按向导提示安装即可。
如果是普通安装，Alpine Linux 将会把整个系统安装到 FAT32 启动分区中，每次启动电脑的时候，会自动创建一个内存盘作为根分区。这种默认的安装方式比较简单，但却让 Zero W 本来就有限的内存显得更加捉襟见肘。
sys 模式
于是我选择了另一种安装方式—— sys 模式——将整个系统安装到一个 ext4 分区中。这样不需要内存盘作为根分区，可以节省出保贵的内存，也能让系统更可靠。请注意使用这种安装方式，在安装向导中需在 save config 和 save cache 步骤的提示中输入 none
走完setup-alpine脚本之后，我们还需要安装 ext4 文件系统的支持，这部分需要联网下载安装。
使用fdisk将剩余的空间划分 1fdisk /dev/mmcblk0 2	n 3	p 4	2 5	w 6	# 起始位置和结束位置，注意看原来的分区 安装 ext2/3/4 文件系统支持 1apk update 2apk add e2fsprogs 格式化之前创建的分区 1mkfs.ext4 /dev/mmcblk0p2 # 如果提示找不到，需要重启系统 把格式化好的分区挂载出来 1mount /dev/mmcblk0p2 /mnt 使用 setup-disk 安装系统 1setup-disk -m sys /mnt #因为setup-disk脚本还不太完善，安装过程中可能会提示一些错误，忽略即可。 清理用不到的文件 1mount -o remount,rw /dev/mmcblk0p1 2 3rm -f /media/mmcblk0p1/boot/* 4cd /mnt 5rm boot/boot 将启动镜像和 Alpine Linux 的init ram移动到 FAT32 分区中的正确位置 1mv boot/* /media/mmcblk0p1/boot/ 2rm -Rf boot # 删除 ext4 分区中的 boot 目录 3mkdir media/mmcblk0p1 # 下次重启后 FAT32 分区的新挂载点 建立一个软链，这样以后升级系统后无需人工复制到 FAT32 分区中。不用担心错误提示 1ln -s media/mmcblk0p1/boot boot 更新/etc/fstab分区挂载配置 1echo &amp;#34;/dev/mmcblk0p1 /media/mmcblk0p1 vfat defaults 0 0&amp;#34; &amp;gt;&amp;gt; etc/fstab 2sed -i &amp;#39;/cdrom/d&amp;#39; etc/fstab # 显示树莓派上没有光驱 3sed -i &amp;#39;/floppy/d&amp;#39; etc/fstab # 也没有软驱 
          
          
        
      </description>
    </item>
    
    <item>
      <title>nginx反向代理</title>
      <link>http://test.mylass.com/linux/nginx-proxy/</link>
      <pubDate>Wed, 08 May 2019 00:00:00 +0000</pubDate>
      
      <guid>http://test.mylass.com/linux/nginx-proxy/</guid>
      <description>
        
          
            在配置文件中定义，一般是nginx.conf
场景：如，有两个网站，使用不同的服务器来提供的，但是我的公网IP只有一个。 现在把这个公网IP的80端口映射到一台转发的nginx上面，再在这一台上面配置反向代理，就可以实现。
如A网站的地址是 192.168.10.23 域名是 www.example.com B网站的地址是 192.168.10.24 域名是 www.test.com
在 nginx 的配置反向代理如下
1server { 2 listen 80; 3 server_name www.example.com; 4 5 location / { 6 proxy_pass http://192.168.10.23; 7 } 8} 9 10server { 11 listen 80; 12 server_name www.test.com; 13 14 location / { 15 proxy_pass http://192.168.10.24; 16 } 17} 主要是 server_name 指定域名，以及 proxy_pass 指定后端的服务器
启用 http 的 ssl 配置 1server { 2 listen 443 http2;	# 监听的端口， https的默认端口为443 3 server_name www.
          
          
        
      </description>
    </item>
    
    <item>
      <title>nginx站点配置</title>
      <link>http://test.mylass.com/linux/nginx/</link>
      <pubDate>Sun, 09 Dec 2018 00:00:00 +0000</pubDate>
      
      <guid>http://test.mylass.com/linux/nginx/</guid>
      <description>
        
          
            使用 docker 容器，使用 docker-compose 管理
compose 目录 /root/nginx-container
nginx 配置文件：
1/root/nginx-container/conf/nginx.conf 2/root/nginx-container/conf.d/*.conf SSL 证书存放路径，在此目录再以项目或站点名称创建文件夹存放
1/root/nginx-container/ssl/ 目前 sxsc 站点的配置文件 /root/nginx-container/conf/conf.d/sxsc.ltd.conf ， SSL 证书存放路径 /root/nginx-container/ssl/sxsc.ltd/ .
添加新站点 在 /root/nginx-container/conf/conf.d/ 目录下创建一个新文件，并以 .conf 结尾， 可以用站点名称命名，如：www.sxsc.com.conf, 配置文件内容，可参考以下
1server { 2 listen 80; # 监听端口 3 server_name sxsc.ltd www.sxsc.ltd; # 域名、主机名 4 # 以下是 http 跳转到 https，并返回 HTTP 301 永久重写向. 5 # 适合开启了https的站点，若用户从https访问则自动跳转到https 6 location / { 7 rewrite ^/(.*)$ https://www.sxsc.ltd/$1 permanent; 8 } 9} 10server { 11 listen 443 ssl; # 监听端口，并开启 SSL 12 server_name sxsc.
          
          
        
      </description>
    </item>
    
    <item>
      <title>mariadb权限配置</title>
      <link>http://test.mylass.com/post/mariadb-privileges/</link>
      <pubDate>Thu, 09 Aug 2018 00:00:00 +0000</pubDate>
      
      <guid>http://test.mylass.com/post/mariadb-privileges/</guid>
      <description>
        
          
            简介 在默认情况下，必须授权于用户权限，用户才可以连接，例如：授权 tom 用户，可以从 192.168.1.10 来连接
权限方面，则可以配置用户，如创建表，修改表结构，删除表，创建索引、视图，等等
以下是命令行相关的配置，若使用管理工具，则管理工具可以GUI方面配置
可以配置权限如下所示：
数据 表结构 管理 SELECT CREATE GRANT INSERT ALTER SUPER UPDATE INDEX PROCESS DELETE DROP RELOAD FILE CREATE TEMPORARY TABLES SHUTDOWN . SHOW VIEW SHOW DATABASES . CREATE ROUTINE LOCK TABLES . EXECUTE REFERENCES . CREATE VIEW REPLICATION CLIENT . EVENT REPLICATION SLAVE . TRIGGER CREATE USER 可以先创建用户，然后再授权，也可以在授权的时候直接创建，都可以，一个是两条指令，一个是一条 以下实例是直接授权并创建
使用 GRANT 授权， REVOKE 撤销授权
查看当前连接的用户权限
1mysql&amp;gt; SHOW GRANTS\G; 2*************************** 1. row *************************** 3Grants for root@localhost: GRANT ALL PRIVILEGES ON *.
          
          
        
      </description>
    </item>
    
    <item>
      <title>扫描目所有文件，并计算md5值和sha1值</title>
      <link>http://test.mylass.com/linux/scan-directory-all-file-md5/</link>
      <pubDate>Thu, 06 Jul 2017 00:00:00 +0000</pubDate>
      
      <guid>http://test.mylass.com/linux/scan-directory-all-file-md5/</guid>
      <description>
        
          
            扫描某个目录下所有文件，并计算出md5值和sha1值，之后保存到文件里面。
          
          
        
      </description>
    </item>
    
    <item>
      <title>linux开机自动启动</title>
      <link>http://test.mylass.com/linux/linux-auto-start/</link>
      <pubDate>Mon, 06 Mar 2017 00:00:00 +0000</pubDate>
      
      <guid>http://test.mylass.com/linux/linux-auto-start/</guid>
      <description>
        
          
            &lt;p&gt;本文介绍linux服务的开户自动启动方式，分两两种，以下&lt;/p&gt;
          
          
        
      </description>
    </item>
    
    <item>
      <title>ubuntu14.04 pxe 安装步骤失败</title>
      <link>http://test.mylass.com/linux/ubuntu-install-step-fail/</link>
      <pubDate>Mon, 19 Sep 2016 00:00:00 +0000</pubDate>
      
      <guid>http://test.mylass.com/linux/ubuntu-install-step-fail/</guid>
      <description>
        
          
            之前有文章介绍过 ubuntu 12.04的pxe无人值守安装，后来升级到 14.04 时，出现了一个问题，也解决了好久，才找到方法的，特此，记录一下，大家再遇到相同的时，可以直接用，不用再费时间找
          
          
        
      </description>
    </item>
    
    <item>
      <title>vsftpd 3.x 禁止用户切换(访问)到上一级目录</title>
      <link>http://test.mylass.com/linux/vsftpd-disable-directory/</link>
      <pubDate>Fri, 08 Jul 2016 00:00:00 +0000</pubDate>
      
      <guid>http://test.mylass.com/linux/vsftpd-disable-directory/</guid>
      <description>
        
          
            在linux vsftpd中，默认情况下，用户连接以后，是可以通过 cd ../ 来切换到上一层目录，这个情况是很危险的，系统中的文件，只要是有r权限位的，都可以被下载，极大的带来了安全就隐患，这里以展示一下实验，并附上解决的办法
          
          
        
      </description>
    </item>
    
    <item>
      <title>centos 本地yum源配置</title>
      <link>http://test.mylass.com/linux/centos-local-yum-repo/</link>
      <pubDate>Mon, 23 May 2016 00:00:00 +0000</pubDate>
      
      <guid>http://test.mylass.com/linux/centos-local-yum-repo/</guid>
      <description>
        
          
            使用 yum 来安装软件，可以自动的解决软件包之间的依赖关系，但有的时候，我们的 linux 服务器并不能上网，所以这种场景下，就必须要制作一个本地的 yum 源了
          
          
        
      </description>
    </item>
    
    <item>
      <title>ubuntu linux pxe 无人值守安装</title>
      <link>http://test.mylass.com/linux/linux-auto-install/</link>
      <pubDate>Fri, 20 May 2016 00:00:00 +0000</pubDate>
      
      <guid>http://test.mylass.com/linux/linux-auto-install/</guid>
      <description>
        
          
            在很多台机器都要安装同一个操作系统的情况下，可以使用 pxe 和 kickstart 来自动安装系统，无人值守安装，可以大幅度的减少工作量
          
          
        
      </description>
    </item>
    
    <item>
      <title>cisco asa vpn配置</title>
      <link>http://test.mylass.com/post/ciscoasavpn/</link>
      <pubDate>Sat, 08 Jun 2013 00:00:00 +0000</pubDate>
      
      <guid>http://test.mylass.com/post/ciscoasavpn/</guid>
      <description>
        
          
            配置 crypto 策略 第一阶段协商，或是做ipsec，需保证两端一致，否则协商不会成功 1crypto ikev1 policy 10 2 authentication pre-share 3 encryption 3des 4 hash md5 5 group 2 6 lifetime 86400 配置 crypto 动态map和 map 1crypto ipsec ikev1 transform-set ezvpn_set esp-3des esp-md5-hmac 2crypto dynamic-map ezvpn_dymap 10 set ikev1 transform-set ezvpn_set 3crypto map ezvpn_map 10 ipsec-isakmp dynamic ezvpn_dymap 将 ikev1 和 crypto map 应用到出接口 1crypto ikev1 enable outside 2crypto map ezvpn_map interface outside 配置 tunnel group 及 pre-shared 密钥 1tunnel-group ezvpn_group type remote-access 2tunnel-group ezvpn_group ipsec-attributes 3 ikev1 pre-shared-key qq123456 用户相关 允许用户访问的内网网段 1access-list Split_tunnel_list extended permit ip 10.
          
          
        
      </description>
    </item>
    
  </channel>
</rss>
