FlashUltron
FlashUltron

Reputation: 181

Getting Issue while setting up Cassandra in Windows 8.1

Below are steps to Install and configure Cassandra on windows 1) Downloaded Java setup from http://java.com/en/download/win8.jsp , Java Set up version is Version 8 Update 73

2) I have gone to http://cassandra.apache.org/download/ and downloaded apache-cassandra-3.4-bin.tar.gz

3) extract apache-cassandra-3.4-bin.tar.gz in D:\Learning Office work\Learning\Cassandra

4) After extraction it will create a folder called apache-cassandra-3.4

5) Set JAVA_HOME variable in windows 8.1 Steps : • Go To My Computer • Right Click on it select Properties • Click on Security • Click on environmental varoables • In The System variable Section click on New • enter variable name as JAVA_HOME • enter variable value as C:\Program Files (x86)\Java\jre1.8.0_73 This depends upon in which drive you have installed java

• create a new system variable named, CLASSPATH as like above box, and its value %JAVA_HOME%\jre\lib

• For PATH, if it already exists, select it and choose the Edit option; in the editor add the value;%JAVA_HOME%\bin (the new values are separated by a semicolon from the existing ones)

• To check the system variables is done by opening a new command prompt window (Start -> cmd) and try with following commands.

C:\Users\Catalin>echo %CLASSPATH% C:\Program Files\Java\jdk1.6.0_16\jre\lib

C:\Users\Catalin>echo %JAVA_HOME% C:\Program Files\Java\jdk1.6.0_16

C:\Users\Catalin>echo %PATH%

• To make your system know of these changes, Restart your computer

6) Create three New Folders anyware(inside the - D:\Learning Office work\Learning\Cassandra /new folder or out of the - D:\Learning Office work\Learning\Cassandra) your in your directory structure with names commitlog, data, saved cache

7) Go to Cassandraa extracted archive and navigate to folder named “conf” 8) Open the file named “cassandra.yaml” in your favorite text editor. 9) In the “Cassandra.yaml” Set the values of

“data_file_directories” to the path of newly created “data” folder. “commitlog_directory” to the path of newly created “commitlog” folder. “saved_caches_directory” to the path of newly created “saved cache” folder.

So my values in “cassandra.yaml” look like this:

directories where Cassandra should store data on disk.

data_file_directories: - D:\Learning Office work\Learning\Cassandra\Data

commit log

commitlog_directory: D:\Learning Office work\Learning\Cassandra\commitlog

saved caches

saved_caches_directory: D:\Learning Office work\Learning\Cassandra\saved_caches

10) Add new environment variable “CASSANDRA_HOME”

Steps : 
 1) Go To My Computer
 2) Right Click on it select Properties
            3) Click on Security
            4) Click on environmental varoables
            5) In The User variable Section click on New
            6) enter variable name as CASSANDRA_HOME
             7) enter variable value as D:\Learning Office work\Learning\Cassandra\apache-cassandra-3.4

11) Open cmd as Adminstartor and navigated to the D:\Learning Office work\Learning\Cassandra\apache-cassandra-3.4\bin (bin of the Cassandra) type cassandra -f as like below

Once I run above command in CMD I started getting below error

enter image description here

Upvotes: 0

Views: 357

Answers (1)

Abhishek Anand
Abhishek Anand

Reputation: 1992

Sounds like you're missing an environment variable.

Add this to your Path environment variable:

%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\

OR

Change your script to this:

%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe -Command "your command"

Upvotes: 0

Related Questions