19
2020
02

JMeter中MD5和urlencode函数的使用

${__digest(MD5,123456,,,)}
${__digest(MD5,${password},,,)}    // 表达式嵌套参数
${__urlencode(你好)}
${__urlencode(${data})}            // 表达式嵌套参数
13
2020
02

python中time和datetime的常用操作

def demo_time():
    # 时间戳
    print(time.time())
    # 1557472133.02831

    # 计算代码执行时间
    t_begin = time.time()
    # 延时
    time.sleep(0.1)
    t = time.time() - t_begin
    print('used time %0.3f' % t)
    # used time 0.101
22
2020
01

windows安装mysql (通过zip安装)

# 下载地址
# https://dev.mysql.com/downloads/mysql/
# 解压
unzip mysql-5.7.xx-winx64.zip
# 初始化
cd mysql-5.7.xx-winx64\bin
mysqld --initialize-insecure
17
2020
01

pycharm自动生成html代码

在空白html文件中输入!,然后按TAB,即可自动生成html模板

html.gif

03
2020
01

redhat安装mysql (分布式数据库系统)

# 清理原有的mysql数据库
# https://dev.mysql.com/downloads/repo/yum/    # rpm下载地址
# 下载 mysql80-community-release-el7-11.noarch.rpm 

# 安装 yum repo文件并更新 yum 缓存
rpm -ivh mysql57-community-release-el7-11.noarch.rpm
yum clean all
yum makecache
03
2020
01

redhat安装mycat (分布式数据库系统)

# mycat下载地址:
# http://dl.mycat.io/

# 书籍:
# http://www.mycat.io/document/mycat-definitive-guide.pdf

# 官网:
# http://www.mycat.io/

# jdk下载地址:
# https://repo.huaweicloud.com/java/jdk/
03
2020
01

redhat安装FastDFS的nginx插件 (分布式文件系统) (下)

# https://github.com/happyfish100/    # 下载地址
# fastdfs-nginx-module-master.zip    # 下载这个文件
03
2020
01

redhat安装FastDFS (分布式文件系统) (上)

# 下载文件
# https://github.com/happyfish100/  # 下载地址 
# libfastcommon-master.zip          # 库
# fastdfs-master.zip                # 主程序
# fastdfs-nginx-module-master.zip   # nginx插件
# fastdfs-client-java-master.zip    # java代码demo
# 准备工作
yum install gcc-c++
yum install unzip
# 安装libfastcommon
unzip libfastcommon-master.zip
cd libfastcommon-master
./make.sh
./make.sh install
02
2020
01

redhat安装keepalived (HA)

wget https://www.keepalived.org/software/keepalived-2.0.19.tar.gz
tar -xzvf keepalived-x.x.xx.tar.gz
cd keepalived-x.x.xx
./configure
make
make install
mkdir /etc/keepalived
cp keepalived/etc/keepalived/keepalived.conf /etc/keepalived/
30
2019
12

nginx负载均衡配置

upstream websrvs {
    ip_hash;                # 使session有效
    server 192.168.1.51:80;
    server 192.168.1.52:80;
    server 192.168.1.53:80;
    server 192.168.1.54:80;
}
server {
    listen 80;
    server_name localhost;
    location / {
        root   html;
        index  index.html index.htm;
        proxy_pass http://websrvs;
    }
}