【StarRocks】验证使用的单节点部署

环境准备

Java8及以上版本,推荐Java17

端口占用检查

netstat -tunlp | grep 8030
netstat -tunlp | grep 9020
netstat -tunlp | grep 9030
netstat -tunlp | grep 9010
netstat -tunlp | grep 9060
netstat -tunlp | grep 8040
netstat -tunlp | grep 9050
netstat -tunlp | grep 8060

官方软件包下载

https://www.starrocks.io/download/community
wget https://releases.starrocks.io/starrocks/StarRocks-2.5.16.tar.gz

解压并调整配置

tar -zxvf StarRocks-3.0.1.tar.gz
mv StarRocks-3.0.1.tar.gz starrocks
mkdir /root/starrocks/meta
mkdir -p /root/starrocks/data/storage

vim /root/starrocks/fe/conf/fe.conf
meta_dir = /root/starrocks/meta
LOG_DIR = /root/starrocks/log

vim /root/starrocks/be/conf/be.conf
storage_root_path = /root/starrocks/data/storage

启动节点

. /root/starrocks/fe/bin/start_fe.sh –daemon
jps
cat fe/log/fe.log | grep thrift
. /root/starrocks/be/bin/start_be.sh –daemon
cat be/log/be.INFO | grep heartbeat

登录MySQL并关联节点

mysql -h 192.168.155.111 -P 9030 -u root
SHOW PROC ‘/frontends’\G
ALTER SYSTEM ADD BACKEND “192.168.155.111:9050”;
SHOW PROC ‘/backends’\G

修改root密码

SET PASSWORD = PASSWORD(‘yourPasswd’);

关闭服务

sh /root/starrocks/fe/bin/stop_fe.sh
sh /root/starrocks/be/bin/stop_be.sh