Zookeeper客户端zkCli使用说明

连接Zookeeper服务端

命令:bin/zkCli.sh -server localhost:2181

如下所示,即表示连接成功!

[root@node04 bin]# zkCli.sh
Connecting to localhost:2181
...
[zk: localhost:2181(CONNECTED) 0]
[root@node04 bin]# zkCli.sh -server localhost:2181
Connecting to localhost:2181
...
[zk: localhost:2181(CONNECTED) 0]

This application requires Visual Studio 2019 x64 Redistributable解决办法

问题场景:安装MySQL或mysql-connector时提示:
This application requires Visual Studio 2019 Redistributable. Please install the Redistributable then run this installer again.

问题原因:缺少C++环境

解决办法:安装Microsoft Visual C++ 2015-2022 Redistributable(x64)

官方下载地址:
https://learn.microsoft.com/zh-CN/cpp/windows/latest-supported-vc-redist?view=msvc-170

根据提示版本及操作系统类型下载:
vc_redist.x64.exe
vc_redist.x86.exe
双击安装即可。

Nginx多条件IF逻辑运算(与、或操作)不支持问题解决方法

Nginx配置不支持if条件的逻辑与、逻辑或运算,而且也不支持if嵌套,例如:

if ((!-e $request_filename) && ($request_uri !~ ^/apple-business/.*$)) {

}

if ((!-e $request_filename)) {
    if (($request_uri !~ ^/apple-business/.*$)) {
        
    }
}

对于这种情况,可以通过使用变量的方式来间接解决。例如:

Linux服务器使用rpm方式安装MySQL数据库

Linux使用rpm方式安装MySQL数据库主要分为以下几步:

MySQL下载地址:
http://downloads.mysql.com/archives/community/

1、Linux服务器检查是否安装MySQL服务
mysql --version

rpm -qa|grep -i mysql

2、下载和安装MySQL源:
wget https://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql57-community-release-el7-10.noarch.rpm