Cassandra資料庫叢集的安裝配置

來源:互聯網
上載者:User

我們使用的是DataStax Community Edition, ,官網對於叢集控制中心(opscenter)的配置太簡略了,我嘗試了10多次才搞定:網上應該沒有比我這份更詳細的配置說明了。

以下是詳細步驟(我全裝在 bleum 的192.168.129.34 Linux VM 上了):

Part 1: 安裝Python

先安裝python (這裡吃了好多苦頭,其實這個叢集只支援python2.5,2,6,2,7,  然而事實只有2.5可以。結果我先下了個3.1,後來Linux內建有個2.4,試了下都不行,最後從2.7開始版本依次遞減的嘗試,終於2.5可以了)

編譯安裝python,將其安裝到/usr/local/python2.5目錄下

wget http://www.python.org/ftp/python/2.5.4/Python-2.5.4.tgz

tar -zxvf Python-2.5.4.tgz

cd Python-2.5.4

./configure --prefix=/usr/local/python2.5

make

make install

安裝Python 網路開發架構Twisted

wget http://twistedmatrix.com/Releases/Twisted/10.0/Twisted-10.0.0.tar.bz2

tar -jxvf Twisted-10.0.0.tar.bz2

cd Twisted-10.0.0

python setup.py install

配置Python 環境變數

vi ~/bashrc

export PYTHON=/usr/local/python2.5/bin/python

Part 2:搭建Cassandra 叢集

假定所有的軟體都安裝在 ~/datastax目錄下

下載Cassandra發布包: (我們這裡有3個包,依次是cassandra伺服器包,基於web的可視的叢集監控器包,叢集上的例子demo包)

wget http://downloads.datastax.com/community/dsc.tar.gz

wget http://downloads.datastax.com/community/opscenter.tar.gz

wget http://downloads.datastax.com/community/dsc-1.0.2-demo-bin.tar.gz

解壓這些包:

tar -zxvf dsc-cassandra-1.0.9-bin.tar.gz

tar -zxvf opscenter-2.0-free.tar.gz

tar -zxvf dsc-1.0.2-demo-bin.tar.gz

配置環境變數:

vi ~/.bashrc

add the following environment variable setting and reconfigure the PATH:

export CASSANDRA_HOME=/home/tbenjamin/datastax/dsc-cassandra-1.0.9

export DSCDEMO_HOME=/home/tbenjamin/datastax/dsc-1.0.2/demos/portfolio_manager

export OPSC_HOME=/home/tbenjamin/datastax/opscenter-2.0

export PATH=$PATH:$JAVA_HOME/bin:$CASSANDRA_HOME/bin:$DSCDEMO_HOME/bin:$OPSC_HOME/bin

最終如下圖所示:

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.