wget https://mirrors.tuna.tsinghua.edu.cn/apache/cassandra/3.11.2/apache-cassandra-3.11.2-bin.tar.gz
tar -zxf apache-cassandra-3.11.2-bin.tar.gz
sudo mkdir /opt/cassandra
sudo mv apache-cassandra-3.11.2 /opt/cassandra/
首先已经安装了Java[查看章节2.4.2 安装Java]
sudo vim /etc/profile.d/cassandra-3.sh
添加如下内容
#!/bin/sh
# Author:wangxiaolei(王小雷)
# Blog: http://blog.csdn.net/dream_an
# Github: https://github.com/lycheeman
# Date:201807
export CASSANDRA_HOME=/opt/cassandra/apache-cassandra-3.11.2
export PATH=$CASSANDRA_HOME/bin:$PATH
变量生效
source /etc/profile
后台启动
bin/cassandra
查找出Cassandra运行ID
ps aux | grep CassandraDaemon
结束Cassandra
kill -9 pid
内容来源于网络,如有侵权,请联系作者删除!