http://w.cn {
reverse_proxy 127.0.0.1:8100
}
http://hyperf.web {
reverse_proxy 127.0.0.1:9501
}
es批量跟新某个字段 my_field 和 index改成自己的字段
POST /index/basic/_update_by_query
{
“script”: {
“source”: “ctx._source[‘my_field’]=’true'”
},
“query”:{
“bool”:{
“filter”:[
{
“bool”:{
“must”:[
{
“match_phrase”:{
“my_field”:{
“query”:”false”
}
}
}
]
}
}
]
}
}
}
gt: greater than 大于
gte: greater than or equal 大于等于
lt: less than 小于
lte: less than or equal 小于等于
1、开放端口
firewall-cmd –zone=public –add-port=12345/tcp –permanent # 开放12345端口
firewall-cmd –zone=public –remove-port=12345/tcp –permanent #关闭12345端口
firewall-cmd –reload # 配置立即生效
2、查看防火墙所有开放的端口
firewall-cmd –zone=public –list-ports
3、关闭防火墙
systemctl stop firewalld.service
4、查看防火墙状态
firewall-cmd –state
5、查看监听的端口
yum install -y net-tools
netstat -lnpt
6、检查端口被哪个进程占用
netstat -lnpt |grep 12345
function rateConfig()
{
return [
1 => 0.397,
2 => 0.400,
3 => 0.203,
];
}
function randRate()
{
$rateConfig = rateConfig();
foreach ($rateConfig as $k => $v) {
$rateConfig[$k] = $v * 10000;
}
//概率数组的总概率精度
$proSum = array_sum($rateConfig);
//概率数组循环
foreach ($rateConfig as $key => $proCur) {
$randNum = mt_rand(1, $proSum);
if ($randNum <= $proCur) {
$result = $key;
break;
} else {
$proSum -= $proCur;
}
}
unset ($proArr);
return $result;
}