Install Cassandra on mac

Installation

Homebrew๋ฅผ ์ด์šฉํ•ด cassandra ์„ค์น˜ํ•˜๊ธฐ

$ brew update
$ brew install cassandra

python ์„ค์น˜ ์˜ค๋ฅ˜

==> Installing cassandra dependency: python
==> Downloading https://homebrew.bintray.com/bottles/python-3.7.6_1.catalina.bot
==> Downloading from https://akamai.bintray.com/38/3871ef8b53270576c46489ae397f2
######################################################################## 100.0%
==> Pouring python-3.7.6_1.catalina.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink Frameworks/Python.framework/Headers
Target /usr/local/Frameworks/Python.framework/Headers
is a symlink belonging to python@2. You can unlink it:
  brew unlink python@2

To force the link and overwrite all conflicting files:
  brew link --overwrite python

To list all files that would be deleted:
  brew link --overwrite --dry-run python

Possible conflicting files are:
/usr/local/Frameworks/Python.framework/Headers -> /usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Headers
/usr/local/Frameworks/Python.framework/Python -> /usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Python
/usr/local/Frameworks/Python.framework/Resources -> /usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Resources
/usr/local/Frameworks/Python.framework/Versions/Current -> /usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/Current
==> /usr/local/Cellar/python/3.7.6_1/bin/python3 -s setup.py --no-user-cfg insta
==> /usr/local/Cellar/python/3.7.6_1/bin/python3 -s setup.py --no-user-cfg insta
==> /usr/local/Cellar/python/3.7.6_1/bin/python3 -s setup.py --no-user-cfg insta
==> Caveats
Python has been installed as
  /usr/local/bin/python3

Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
  /usr/local/opt/python/libexec/bin

If you need Homebrew's Python 2.7 run
  brew install python@2

You can install Python packages with
  pip3 install <package>
They will install into the site-package directory
  /usr/local/lib/python3.7/site-packages

See: https://docs.brew.sh/Homebrew-and-Python
==> Summary
๐Ÿบ  /usr/local/Cellar/python/3.7.6_1: 3,977 files, 61MB

๋‹ค์Œ๊ณผ ๊ฐ™์ด brew link ๊ด€๋ จํ•ด์„œ ์˜ค๋ฅ˜๊ฐ€ ๋œฌ๋‹ค๋ฉด

$ brew unlink python@2

๋ฅผ ํ•ด์ฃผ๋ฉด ์ •์ƒ์ ์œผ๋กœ ์—ฐ๋™๋˜๋Š” ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.

cql ์„ค์น˜ํ•˜๊ธฐ

์ด๋•Œ pip๊ฐ€ ์„ค์น˜๋˜์–ด์žˆ์–ด์•ผํ•œ๋‹ค.

$ pip install --upgrade pip
$ pip install cql

cassandra ์‚ฌ์šฉํ•˜๊ธฐ

cassandra ์‹œ์ž‘ํ•˜๊ธฐ

$ brew services start cassandra

cassandra ์ข…๋ฃŒ

$ brew services stop cassandra

์ฐธ์กฐํŽ˜์ด์ง€

Last updated