原创 golang struct 使用總結:

golang  struct 使用總結:   struct 有點相當於 php的類(class) new一個struct的實例 package main import "fmt" type person struct { nam

原创 cc攻擊的一個小方法: nginx 限制 外掛用戶的 CC訪問

問題: 業務經常收到外掛用戶的訪問 ---- cc攻擊 解決方法: 使用nginx 的  limit_req_zone  限制ip訪問, 參數如下: http { limit_req_zone $binary_remote_a

原创 golang連接mysql的操作

1.下載go-sql-driver go get -v  github.com/go-sql-driver/mysql 2. import import ( _"github.com/go-sql-driver/mysql"

原创 golang 的testing.T 和 testing.M 的區別

testing.T 是普通測試包 : func TestUser(t *testing.T){ fmt.Println("main 測試") t.Run("開始測試第一個子測試函數:", testAddUser) }

原创 修改yum源帶來的問題 curl: (35) Cannot communicate securely with peer: no common encryption algorithm(s).

安裝zabbix 時帶來的問題: Retrieving https://repo.zabbix.com/zabbix/4.2/rhel/7/x86_64/zabbix-release-4.2-2.el7.noarch.rpm curl:

原创 vs 運行c代碼

原文鏈接:http://c.biancheng.net/cpp/html/3433.html http://c.biancheng.net/cpp/html/3433.html

原创 redis開多個服務進程(根據不同的端口)

本文參考該文章! 謝謝該作者! https://blog.csdn.net/weixin_42555019/article/details/93066379   問題描述:  我想在同一臺服務器上開兩個redis  服務兩個獨立的測試項目

原创 elasticsearch/ kibana / logstash 安裝/ 使用/ 同步

看我筆記 文檔:elasticsearch+kibana.doc https://download.csdn.net/download/chhnang2016/11483981   注: elasticsearch 同步mysql 這一

原创 vue 打包的靜態頁面 在nginx下出現404問題

參考url : https://blog.csdn.net/weixin_34379433/article/details/91369530 配置nginx如下: location / { root /www/dist;

原创 自動化使用apiDoc

參考:https://www.jianshu.com/p/34eac66b47e3 1. 安裝node  https://blog.csdn.net/jiekou0376/article/details/80499574 2. 安裝api

原创 yum安裝時出現:Cannot retrieve metalink for repository: epel. Please verify its path and try again

轉載  https://www.cnblogs.com/dadong616/p/5062727.html

原创 Info:fatal: could not read Username for 'http://': No suchcentos7 (git作爲webhook的常見問題)

開發環境:              程序員在本地開發完項目, 上傳至git(gitlab/ coding/ 碼雲/ github), 如何讓測試服務器自動獲取最新的代碼?   方案:            使用gitlab 自帶的web

原创 linux 上做webhook的細節

  業務環境:         A服務器是 git服務器       B服務器是 項目測試服務器       本地每次推代碼到A服務器, A服務器再自動的更新B服務器上項目代碼.    問題:  B服務器上使用ssh方式先git拉取 A服

原创 apache + php 兩種安裝模式 和 對接 模式

1. 編譯安裝apache + 編譯安裝php  注意細節: apache 一定要單獨 編譯安裝 apr  和 apr-util  參考地址 : https://blog.51cto.com/11010461/2113093 ./con

原创 php 不能加載擴展庫問題分析

1. 問題描述: php -v 或者 php -m  發現php的擴展庫不能加載; 如圖所示: 分析1: php 的配置文件有哪些?   除了   /etc/php.ini    還有  /etc/php.d/*.ini   (我們在