首页 \ 问答 \ 如何在现场VPS上设置Solr?(How to setup Solr on a live VPS?)

如何在现场VPS上设置Solr?(How to setup Solr on a live VPS?)

我按照http://lucene.apache.org/solr/tutorial.html上的说明操作,我可以在我的电脑上设置Solr。

现在,当我来到我的VPS时,我无法克服这一步:$ java -jar start.jar

运行该命令后,搜索服务可在http:// xxxx:8983 / solr / select中找到。

但是,每当我关闭SSH客户端时,http:// xxxx:8983 / solr / select上的服务也会关闭。 所以我不能再搜索了。

我该怎么办?


我的VPS有512MB RAM,主要运行lighttpd,php和mySQL。 你认为Solr适合我,还是Sphinx是更好的选择? 我需要在我的网站上进行分面搜索。

谢谢你的帮助。


I follow the instruction on http://lucene.apache.org/solr/tutorial.html and I can setup Solr on my PC.

Now when I come to my VPS I cannot overcome the step: $ java -jar start.jar

Afer running that command, search service is available at http: //x.x.x.x:8983/solr/select .

But, Whenever I close the SSH client, the service on http: //x.x.x.x:8983/solr/select is also closed. So I can't search any more.

What should I do?


My VPS has 512MB RAM and run mainly lighttpd, php and mySQL. Do you think Solr is suitable for me, or Sphinx is a better choice? I need faceted search on my site.

Thanks for any help.


原文:https://stackoverflow.com/questions/2848456
更新时间:2023-06-21 18:06

最满意答案

只需发送(byte) 0xa0 。 是的,作为一个Java byte ,它将是负面的,但它仍然会有正确的模式,这是RFID所关心的。

基本上,你很少需要将字节视为数字 - 更常见的是将它们视为序列位,这些位恰好映射到数字。

例如,假设您有一个由单个字节组成的文件,其位数为11111111 。 如果您阅读了Java中的数据,则会得到-1的字节。 如果你阅读了C#中的数据,你将得到一个255的字节。这是相同的数据,只是以稍微不同的方式查看。


Just send (byte) 0xa0. Yes, as a Java byte it will be negative, but it will still have the right bit pattern, which is all the RFID will care about.

Basically, you rarely need to think of bytes as numbers as such - it's more usual to think of them as sequences of bits, which happen to map to numbers.

For example, suppose you have a file consisting of a single byte, with the bits 11111111. If you read the data for that in Java, you'll get a byte of -1. If you read the data for that in C#, you'll get a byte of 255. It's the same data, just viewed in a slightly different way.

相关问答

更多
  • -127-127基本上是一个带符号的字节。 对于Delphi中的那个,您可以使用ShortInt,请参见此处: http://www.delphibasics.co.uk/RTL.asp?Name=ShortInt -127-127 is basically a signed byte. For that in Delphi you can use a ShortInt, see here: http://www.delphibasics.co.uk/RTL.asp?Name=ShortInt
  • 问题出在这里: QString tempBuffer = serial->readAll(); *buffer += tempBuffer.toStdString(); 1)您依赖于从QByteArray到QString的默认转换,即utf-8,而不是本地拉丁语1,如果这是您想要的。 QString :: QString(const QByteArray&ba) 构造一个用字节数组ba初始化的字符串。 使用fromUtf8()将给定的字节数组转换为Unicode。 停止复制前0个字符,否则复制整个字节数组 ...
  • 答案是二的补充 。 简而言之,Java(和大多数现代语言)不使用带符号量表示法表示带符号整数。 换句话说,8位整数不是一个7位无符号整数后面的符号位。 相反,负整数在称为二进制补码的系统中表示,这允许在硬件中更容易的算术处理,并且还消除了具有正零和负零的潜在模糊性。 消除负零的副作用是在范围底部总是有一个额外的负数。 两个补码系统的另一个有趣的属性是第一个位有效地用作符号指示符(即,从位1开始的所有数字都是负数),但是下一个七位不能自己解释为无符号数哪个符号位被应用。 二的补充并不是非常复杂的,而是初步抓住 ...
  • 正如NPE所说,这是UTF-8的编码 - 128到2047(8 - 11位)之间的字节转换为两个字节:如果原始的11位是abcdefghijk,则utf-8版本是110abcde 10fghijk。 在您的示例中(填充左侧为0以生成11位),00010000000将转换为11000010 10000000或\ xc2 \ x80,这正是您所看到的。 有关更多信息,请参阅有关UTF-8的维基百科文章 您可以在python中看到这个代码(我用128替换int('10000000',base = 2): >>> ...
  • 实际上read返回一个整数.. public abstract int read() throws IOException 所以它通过将其存储在一个int中被隐式转换为无符号字节。 正如文件中所述: 从输入流中读取下一个字节的数据。 值字节在0到255范围内作为int返回。如果由于已到达流末尾而没有可用的字节,则返回值-1。 考虑一下这样一个事实,如果它是一个有符号的字节,那么-1不能用作流结束值。 对于OutputStream你有 public abstract void write(int b) th ...
  • 只需发送(byte) 0xa0 。 是的,作为一个Java byte ,它将是负面的,但它仍然会有正确的位模式,这是RFID所关心的。 基本上,你很少需要将字节视为数字 - 更常见的是将它们视为序列位,这些位恰好映射到数字。 例如,假设您有一个由单个字节组成的文件,其位数为11111111 。 如果您阅读了Java中的数据,则会得到-1的字节。 如果你阅读了C#中的数据,你将得到一个255的字节。这是相同的数据,只是以稍微不同的方式查看。 Just send (byte) 0xa0. Yes, as a J ...
  • 问题不在于WebUtility.HtmlDecode - 如果你单步执行,你会发现Visual Studio中的表示很好。 问题是,默认情况下,控制台不能显示Unicode。 The problem is not with WebUtility.HtmlDecode - if you step through you'll see the representation is fine in Visual Studio. The problem is that the Console can't, by de ...
  • 使用字符串作为字节数组持有者并调用String.getBytes()是一种不好的做法,总是会导致代码损坏。 您在C ++端使用Message.SerializeToString ,因此您应该使用Java端的com.google.protobuf.TextFormat.merge(CharSequence,MessageBuilder)来解析protobuf文本格式。 更好的是,而不是文本格式使用正常的二进制表示。 生成的消息和构建器类提供了直接与字节数组(以及Java中的流)一起工作的序列化和反序列化方法, ...
  • 忽略你正在做的好坏,编码ISO-8859-1将其所有字符映射到Unicode中具有相同代码的字符。 // Bytes with all the possible values 0-255 var bytes = Enumerable.Range(0, 256).Select(p => (byte)p).ToArray(); // String containing the values var all1bytechars = new string(bytes.Select(p => (char)p).To ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。