As I said before you can run from an operating system that Java has a runtime for. So the first and probably most obvious one for a Windows developer, is running Cassandra on Windows. To install Cassandra on windows just follow these steps:
- Extract Cassandra to a directory of your choice (I used c:\development\cassandra)
- Set the following environment variables
- JAVA_HOME (To the directory where you install the JRE, this should not be the bin directory)
- CASSANDRA_HOME (To the directory you extracted the files to in step 1)
- Modify your Cassandra config file as you like and don’t forget to update the directory locations from a UNIX like path to something on your windows directory (in my example the config file is located at c:\development\cassandra\conf\storage-conf.xml)
- Open cmd and run the cassandra.bat file (in my example the batch file is located at c:\development\cassandra\bin\cassandra.bat)12
cd
c:\development\cassandra\bin\
.\cassandra.bat
- You can verify that Cassandra is running, by trying to connect to the server. To do this open a new cmd and run the cassandra-cli.bat file from the bin directory. 123
cd
c:\development\cassandra\bin\
.\cassandra
-cli
.bat
connect localhost/9160
This is easy to get running, but there is some manual process that you have to go through each time to get the server running. In the future when you want to start up the Cassandra database for development, just repeat Step 4.
Không có nhận xét nào:
Đăng nhận xét