ClickHouse系列教程: ClickHouse系列教程
先查看ClickHouse server端监听端口的状态:
root@ubuntu:/var/lib/clickhouse/# lsof -i :8123
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
clickhous 653 clickhouse 41u IPv6 32544 0t0 TCP ip6-localhost:8123 (LISTEN)
clickhous 653 clickhouse 44u IPv4 32547 0t0 TCP localhost:8123 (LISTEN)
1
2
3
4
这里显示监听本地端口,需要修改配置:
nano /etc/clickhouse-server/config.xml
1
<!-- Default values - try listen localhost on ipv4 and ipv6: -->
<!--
<listen_host>::1</listen_host>
<listen_host>127.0.0.1</listen_host>
-->
<!-- Don't exit if ipv6 or ipv4 unavailable, but listen_host with this protocol specified -->
<!-- <listen_try>0</listen_try> -->
1
2
3
4
5
6
7
8
9
10
11
12
13
把注释掉的<listen_host>::</listen_host>取消注释,然后重启服务:
service clickhouse-server restart
1
现在就的端口监听情况:
root@ubuntu:/var/lib/clickhouse/data/# lsof -i :8123
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
clickhous 9188 clickhouse 32u IPv6 61573 0t0 TCP *:8123 (LISTEN)
1
2
3
一般来说不需要修改 users.xml这个文件。
-> # locate users.xml
/etc/clickhouse-server/users.xml
/var/lib/clickhouse/preprocessed_configs/users.xml
-> # nano /etc/clickhouse-server/users.xml
1
2
3
4
里面的内容如果是::/0那就不用修改了:
<networks incl="networks" replace="replace">
<ip>::/0</ip>
</networks>
————————————————
版权声明:本文为CSDN博主「zhang0peter」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/zhangpeterx/article/details/95059059