原创 源碼安裝Nginx服務啓動腳本

#!/bin/bash # nginx Startup script for the Nginx HTTP Server # it is v.0.0.2 version. # chkconfig: 2345 08 99 # descrip

原创 git log 常用選項參數

# 展示前n條數據 git log -n #展示簡要的每次提交行數的變化,及其他基本信息。 git log –stat #展示每次提交詳細的代碼變化 git log -p #用一行展示每次提交的commit id 和 提交註釋信息

原创 Docker基於centos7搭建Java環境

# Pull base image FROM hub.c.163.com/netease_comb/centos:7 MAINTAINER Alenx "[email protected]" # update source RUN yu

原创 Linux 生產環境實時監控Tomcat腳本

#!/bin/bash # name : Alenx # start_user : admin V_LOG=/opt/logs/listen_tomcat.log V_TOMCAT="sh /opt/script/tomcat.sh

原创 Linux 生產環境實時監控Nginx腳本

#!/bin/bash # name : Alenx # start_user : admin V_LOG="/opt/logs/listen_nginx.log" V_NGINX="systemctl restart nginx.se

原创 ssserver服務啓動腳本

#!/bin/sh # chkconfig: 2345 90 10 # description: Start or stop the Shadowsocks server # ### BEGIN INIT INFO # Provides:

原创 Nginx靜態文件緩存配置

upstream web.com { server 10.10.0.62 weight=1; server 10.10.0.63 weight=1; } proxy_cache_path /var/www/web/ou

原创 Iptables規則大全

# 1. 刪除所有現有規則 iptables -F # 2. 設置默認的 chain 策略 iptables -P INPUT DROP iptables -P FORWARD DROP iptables -P OUTPUT D

原创 Linux find命令特殊查詢

按照文件特徵查找 find / -amin -10 ===> 查找在系統中最後10分鐘訪問的文件(access time) find / -atime -2 ===> 查找在系統中最後48小時訪問的文件 find / -empty ===

原创 Ansible詳解

Usage: ansible <host-pattern> [options] Options: -m MODULE\_NAME, --module-name=MODULE\_NAME 要執行的模塊,默認爲 co

原创 jenkins-pipelines

node{ stage('clean file'){ sh 'rm -rf openapi' sh 'ls -l' } stage('Clone Code') { // for dis

原创 Linux下進行業務進程監控併發送告警

# -*- coding:utf-8 -*- # !/usr/bin/env python # name : Alenx import os import time import stat import pexpect import C

原创 Rsync實現主機間實時備份文件

#!/usr/bin/env bash # yum install -y inotify-tools rsync xinetd # ------ /etc/rsyncd.conf ------- # uid=root # gid=ro

原创 python實現自動保留最近的幾個文件

# -*- coding:utf-8 -*- # !/usr/bin/env python3 # name : Alenx # 實現自動保留ctime最近的幾個文件 import os def rm_backup(rm_path,

原创 通過python編寫定時任務壓縮日誌文件

# -*- coding:utf-8 -*- # !/usr/bin/env python3 # name : Alenx ''' 通過python編寫定時任務壓縮日誌文件 nohup python compressLog.py > m