Powershell 如何启动cassandra服务器

Powershell 如何启动cassandra服务器,powershell,datastax,cassandra-2.1,Powershell,Datastax,Cassandra 2.1,我正在尝试启动cassandra服务器 C:\Program Files\DataStax Community\apache-cassandra\bin>cassandra 但它给了我以下错误: 警告!Powershell脚本执行不可用 请在此用户帐户上使用“powershell Set ExecutionPolicy Unrestricted”,在此平台上运行功能齐全的cassandra 从传统启动选项开始 启动Cassandra服务器 VM初始化期间出错 无法为对象堆保留足够的空间

我正在尝试启动cassandra服务器

C:\Program Files\DataStax Community\apache-cassandra\bin>cassandra
但它给了我以下错误:

警告!Powershell脚本执行不可用

请在此用户帐户上使用
“powershell Set ExecutionPolicy Unrestricted”
,在此平台上运行功能齐全的cassandra

从传统启动选项开始
启动Cassandra服务器

VM初始化期间出错
无法为对象堆保留足够的空间
无法创建Java虚拟机

我还尝试了
powershell Set ExecutionPolicy Unrestricted
,但仍然出现了一些错误。。。像

C:\Program Files\DataStax Community\apache-cassandra\bin>powershell Set-ExecutionPolicy Unrestricted 

C:\Program Files\DataStax Community\apache-cassandra\bin>cassandra 
检测到powershell执行权限。使用增强的启动脚本运行

以下声明为红色

The term '/' is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again. At line:1 char:2 + /f <<<< ile C:\Program Files\DataStax Community\apache-cassandra\\bin\cassandra.ps1 术语“/”未被识别为cmdlet、函数、可操作程序或 脚本文件。请验证术语,然后重试。 第1行字符数:2
+/f我在研究卡桑德拉,我也有同样的问题。按照以下步骤启动。我希望它能帮助你

1-要打开windows变量编辑器,请执行以下操作:

2-根据Java物理路径(64位)、Cassandra物理路径和Java内存选项添加以下变量。就我而言:

JAVA\u HOME=C:\Program Files\JAVA\jre1.8.0\u 221

CASSANDRA_HOME=C:\Program Files(x86)\apache-CASSANDRA-3.11.4

_JAVA_选项=-Xmx2048‬M

3-以管理员身份打开powershell

4-访问您的Cassandra文件夹:

5-执行命令“\cassandra”,然后您的cassandra将启动


尝试“powershell Set ExecutionPolicy Unrestricted”时会出现什么错误?在我看来,错误消息似乎是您正在尝试运行
cassandra.bat
,并且文件被搞乱了。尝试重新安装卡桑德拉。你是怎么安装的?Windows安装程序应该已经安装了您需要的服务。