在整个贡献代码过程中,应该牢记以下几个环境。其实绝大部分的操作都是在我们的本地电脑完成。
- 别人的github项目A: https://github.com/rwx------/zabbix-templates
- 我的github账号B: https://github.com/RickieL
- 我的本地电脑C: local
后面的介绍中,每个步骤的操作环境都会以[A]、[B]、[C]来标示。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ { | |
etag off; #关闭etag | |
expires 1d; #有效期一天 | |
# expires的单位可以使用 | |
# ms: 毫秒 | |
# s: 秒 | |
# m: 分钟 | |
# h: 小时 | |
# d: 天 | |
# w: 星期 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Producer | |
Setup | |
bin/kafka-topics.sh --zookeeper hdp-241:2181 --create --topic test-rep-one --partitions 6 --replication-factor 1 | |
bin/kafka-topics.sh --zookeeper hdp-241:2181 --create --topic test --partitions 6 --replication-factor 3 | |
Single thread, no replication | |
bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test7 50000000 100 -1 acks=1 bootstrap.servers=hdp-241:9092 buffer.memory=67108864 batch.size=8196 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 环境 CentOS 7.2 | |
# 统一语言环境,方便后面的匹配 | |
export LANG=en_US.UTF-8 | |
# 标记个时间吧^_^ | |
DateTime=$(date +"%F %T") | |
Timestamp=$(date +"%s") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/zsh | |
DirConf="/usr/local/etc" | |
PIDPATH="/usr/local/var/run" | |
PHPVersion="5.6" | |
MYSQL="/usr/local/bin/mysql.server" | |
NGINX="/usr/local/bin/nginx" | |
PHPFPM="/usr/local/sbin/php-fpm" | |
MEMCACHED="/usr/local/bin/memcached -m 24 -P $PIDPATH/memcached.pid -u root" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
############################# | |
# For: backup a file with a uniq name | |
# Usage: bcp file_or_dir | |
# Create: Rickie Liao <rickie622 at gmail.com> | |
# Version: v0.01 create 2012-02-28 | |
########################################################## | |
# Usage: | |
# bcp [-h|--help] [-V|--version] |