发布于 2024-05-24
58人围观 0条评论
配置
vim /etc/clickhouse-server/config.xml
修改 http[s] 端口 => 18123
# http端口
<http_port>8123</http_port>
# tcp 端口
修改端口 9000 => 19000
开放外网访问
vim /etc/clickhouse-server/config.xml
## 取消注释
<listen_host>0.0.0.0</listen_host>
防火墙
firewall-cmd --add-port=19000/tcp --permanent
firewall-cmd --add-port=18123/tcp --permanent
重新加载防火墙配置
firewall-cmd --reload
修改 default 密码
生成密码密文
PASSWORD=$(base64 < /dev/urandom | head -c8); echo "$PASSWORD";
echo -n "$PASSWORD" | sha256sum | tr -d '-'
第一行是密码明文,第二行是密码密文
touch /etc/clickhouse-server/users.xml
从 https://github.com/ClickHouse/ClickHouse/blob/master/programs/server/users.xml 复制粘贴,不用重启,实时生效
<clickhouse>
<!-- See also the files in users.d directory where the settings can be overridden. -->
<!-- Profiles of settings. -->
<profiles>
<!-- Default settings. -->
<default>
发布于 2023-09-23
83人围观 0条评论
golang
launch.json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Package",
"type": "go",
"request": "launch",
"mode": "auto",
// "program": "${fileDirname}",
"program": "${workspaceFolder}/main.go",
"cwd": "${workspaceFolder}",
// "debugAdapter": "dlv-dap",
"debugAdapter": "legacy",
// "showLog": true,
// "trace": "verbose",
// "logOutput": "dap",
// "stopOnEntry": true,
// "env": {
// "HOME": "/mnt/hdd_00_09/home_repository/ResearchDev",
// "GOPATH": "/mnt/hdd_00_09/workspace/ResearchDev/go",
// "GOROOT":
发布于 2023-08-17
78人围观 0条评论
环境
节点名 | IP |
---|---|
kafka01 | 10.15.4.244 |
kafka02 | 10.15.4.245 |
kafka03 | 10.15.4.138 |
依赖 | 版本 |
---|---|
Linux Server | Centos 9 |
ZooKeeper | 3.8.1 |
kafka | 3.5.0 |
部署
每个节点均需操作
创建相关目录
mkdir /root/kafka
mkdir /root/kafka/logs
下载 kafka
# https://downloads.apache.org/kafka/3.5.1/kafka_2.13-3.5.1.tgz
cd /root/kafka
wget https://downloads.apache.org/kafka/3.5.0/kafka_2.13-3.5.0.tgz
tar zxvf kafka_2.13-3.5.0.tgz
修改配置
cd /root/kafka/kafka_2.13-3.5.0
vim config/server.properties
# 修改以下内容
log.dirs=/root/kafka/logs
zookeeper.connect=10.15.4.244:2181,10.15.4.245:2181,10.15.4.138:2181
# 分节点配置
# 配置在节点 0 上
broker.id=0
listeners=PLAINTEXT://10.15.4.244:9092
# 配置在节点 1 上
broker.id=1
listeners=PLAINTEXT://10.15.4.245:9092
# 配置在节点 2 上
broker.id=2
listeners=PLAINTEXT://10.15.4.138:9092
# 以提供其他生产、消费程序的远程端口连接
# host.name=128.1.136.129
# 让 topic 可以真的删除
delete.topic.enable=true
# 禁止 consumer 或者 producer 使用时自动创建
auto.create.topics.enable=
发布于 2023-06-30
87人围观 0条评论
环境
节点名 | IP |
---|---|
zk01 | 10.15.4.244 |
zk02 | 10.15.4.245 |
zk03 | 10.15.4.138 |
依赖 | 版本 |
---|---|
Linux Server | Centos 9 |
JDK | yum install java-11-openjdk |
ZooKeeper | 3.8.1 |
部署
每个节点均需操作
创建相关目录
mkdir /root/zookeeper
mkdir /root/zookeeper/data
mkdir /root/zookeeper/logs
下载 zookeeper
cd /root/zookeeper
wget https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/zookeeper-3.8.1/apache-zookeeper-3.8.1-bin.tar.gz
tar zxvf apache-zookeeper-3.8.1-bin.tar.gz
修改环境变量
vim ~/.bashrc
# 添加以下下内容
# zookeeper
export ZOOKEEPER_HOME=/root/zookeeper/apache-zookeeper-3.8.1-bin
export PATH=$ZOOKEEPER_HOME/bin:$PATH
# 使环境变量生效
source ~/.bashrc
新建配置文件
cd /root/zookeeper/apache-zookeeper-3.8.1-bin/conf
touch zoo.cfg
# 添加以下内容
tickTime=2000
initLimit=10
syncLimit=5
dataDir=/root/zookeeper/data
dataLogDir=/root/zookeeper/logs
clientPort=2181
server.1=10.15.4.244:2888:3888
server.2=10.15.4.245:2888:3888
server.3=10.15.4.138:2888:3888