ubuntu - 在 Ubuntu 12.04 上安装 Elasticsearch 1.0.1 失败并显示 sudo dpkg -i elasticsearch-1.0.1.deb

标签 ubuntu elasticsearch debian ubuntu-12.04 elasticsearch-1.0.0

我正在尝试在 Ubuntu 12.04 上安装 Elasticsearch 1.0.1。到目前为止,我已经完成了:

首先,我删除了旧的 elasticsearch 0.90 包

sudo dpkg -r elasticsearch

然后
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y

wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.1.deb
sudo dpkg -i elasticsearch-1.0.1.deb

最后一步结果如下
(Reading database ... 57341 files and directories currently installed.)
Preparing to replace elasticsearch 1.0.1 (using elasticsearch-1.0.1.deb) ...
Unpacking replacement elasticsearch ...
Setting up elasticsearch (1.0.1) ...
chown: cannot access `/etc/elasticsearch/*': No such file or directory

所以我创建了/etc/elasticsearch ,里面有一个虚拟文件,然后做了
sudo chmod 777 /etc/elasticsearch

现在当我跑
sudo dpkg -i elasticsearch-1.0.1.deb

我明白了
(Reading database ... 57341 files and directories currently installed.)
Preparing to replace elasticsearch 1.0.1 (using elasticsearch-1.0.1.deb) ...
Unpacking replacement elasticsearch ...
Setting up elasticsearch (1.0.1) ...
Processing triggers for ureadahead ...

但是/etc/elasticsearch 中什么也没有出现

但是我确实有一个文件夹出现在
/usr/share/elasticsearch

有以下内容
bin  core-signatures.txt  lib  NOTICE.txt  README.textile

从这里如果我跑
sudo bin/elasticsearch

我明白了

log4j:WARN 找不到记录器(节点)的附加程序。
log4j:WARN 请正确初始化 log4j 系统。
log4j:警告见 http://logging.apache.org/log4j/1.2/faq.html#noconfig了解更多信息。

并继续运行

如果我打开一个新窗口并运行
curl -XGET 'localhost:9200'

我明白了
{
  "status" : 200,
  "name" : "Volstagg",
  "version" : {
    "number" : "1.0.1",
    "build_hash" : "5c03844e1978e5cc924dab2a423dc63ce881c42b",
    "build_timestamp" : "2014-02-25T15:52:53Z",
    "build_snapshot" : false,
    "lucene_version" : "4.6"
  },
  "tagline" : "You Know, for Search"
}

所以它似乎正在运行,我可以填充搜索(symfony2 FOSElasticaBundle)
php app/console fos:elastica:populate

但是,如果我进行搜索,则找不到任何结果。

所以问题是,它是否安装了,为什么它不能正常工作?

我正在使用 github.com/FriendsOfSymfony/FOSElasticaBundle 和 Symfony2 PHP 框架。捆绑包的配置是这样的:
fos_elastica:
clients:
    default: { host: localhost, port: 9200 }
indexes:
    products:
        client: default
        types:
            product:
                mappings:
                    name: { boost: 5 }
                    commonName: { boost: 5 }
                    sku: { boost: 3 }
                    description:
                    isRemedy:
                    countries:
                        type: "nested"
                        properties:
                            code: ~
                    book:
                        type: "nested"
                        properties:
                            author: ~
                            isbn: ~

                persistence:
                    driver: orm
                    model: Helios\CoreBundle\Entity\Product
                    provider: ~
                    finder: ~
                    listener: ~
                    elastica_to_model_transformer:
                        ignore_missing: true

当我填充时,我没有收到任何错误,但搜索仍然不起作用。

谢谢

最佳答案

不知道为什么你不能搜索,但你可以检查一些事情。在本页面
提到了配置文件的路径。

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/setup-service.html

The init script is placed at /etc/init.d/elasticsearch is you would expect it. The configuration file is placed at /etc/default/elasticsearch.



通过运行以下查询来检查一切是否正常:
/_cluster/健康
/_nodes/统计

希望有帮助

关于ubuntu - 在 Ubuntu 12.04 上安装 Elasticsearch 1.0.1 失败并显示 sudo dpkg -i elasticsearch-1.0.1.deb,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22574386/

相关文章:

linux - 无法在 debian beaglebone 上将 IP 更改为静态

docker - apt-key 最近在 docker 中失败

postgresql - 如何在 ubuntu 上彻底清除并重新安装 postgresql?

ubuntu - SLURM Controller 和 "Worker"是否可能在同一个节点中?

c++ - 如何在我的二进制文件中包含共享库依赖项(不使用 .deb 或 .rpm)和/或静态链接到 PulseAudio?

elasticsearch - 如何使用 Scala 中的高级 REST 客户端从 json 字符串在 ES 6.0 中创建 SearchRequest

amazon-web-services - 在 EC2 Ubuntu 或 Linux 中记录每个请求和输出

elasticsearch - Elasticsearch Java HighLevelRestClient如何创建not_analyzed索引?

elasticsearch - 对多个Logstash实例的协调操作

ssh - 第二个SSH session 无法连接到Docker主机