Serveur local Installer Elastic Search avec Laragon

Nicolas

Administrateur
Membre du Staff
Quelqu'un a déjà essayé... et réussi ?
J'ai suivi le petit tuto de cette page : https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/installation.html

Code:
C:\laragon\www
λ curl -s http://getcomposer.org/installer | php
All settings correct for using Composer
Downloading...

Composer (version 2.5.1) successfully installed to: C:\laragon\www\composer.phar
Use it: php composer.phar

Puis je reçois ce message d'erreur pour la deuxième ligne de commande
Code:
C:\laragon\www
λ php composer.phar install
Composer could not find a composer.json file in C:\laragon\www
To initialize a project, please create a composer.json file. See https://getcomposer.org/basic-usage

Je passe outre et envoie la CLI pour installer ES
Code:
C:\laragon\www
λ composer require elasticsearch/elasticsearch
Info from https://repo.packagist.org: #StandWithUkraine
Using version ^8.6 for elasticsearch/elasticsearch
./composer.json has been created
Running composer update elasticsearch/elasticsearch
Loading composer repositories with package information
Updating dependencies
Lock file operations: 14 installs, 0 updates, 0 removals
  - Locking elastic/transport (v8.6.0)
  - Locking elasticsearch/elasticsearch (v8.6.1)
  - Locking guzzlehttp/guzzle (7.5.0)
  - Locking guzzlehttp/promises (1.5.2)
  - Locking guzzlehttp/psr7 (2.4.3)
  - Locking php-http/discovery (1.14.3)
  - Locking php-http/httplug (2.3.0)
  - Locking php-http/promise (1.1.0)
  - Locking psr/http-client (1.0.1)
  - Locking psr/http-factory (1.0.1)
  - Locking psr/http-message (1.0.1)
  - Locking psr/log (3.0.0)
  - Locking ralouphie/getallheaders (3.0.3)
  - Locking symfony/deprecation-contracts (v3.2.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 14 installs, 0 updates, 0 removals
  - Downloading psr/log (3.0.0)
  - Downloading psr/http-message (1.0.1)
  - Downloading psr/http-client (1.0.1)
  - Downloading symfony/deprecation-contracts (v3.2.0)
  - Downloading ralouphie/getallheaders (3.0.3)
  - Downloading psr/http-factory (1.0.1)
  - Downloading guzzlehttp/psr7 (2.4.3)
  - Downloading guzzlehttp/promises (1.5.2)
  - Downloading guzzlehttp/guzzle (7.5.0)
  - Downloading php-http/promise (1.1.0)
  - Downloading php-http/httplug (2.3.0)
  - Downloading php-http/discovery (1.14.3)
  - Downloading elastic/transport (v8.6.0)
  - Downloading elasticsearch/elasticsearch (v8.6.1)
  - Installing psr/log (3.0.0): Extracting archive
  - Installing psr/http-message (1.0.1): Extracting archive
  - Installing psr/http-client (1.0.1): Extracting archive
  - Installing symfony/deprecation-contracts (v3.2.0): Extracting archive
  - Installing ralouphie/getallheaders (3.0.3): Extracting archive
  - Installing psr/http-factory (1.0.1): Extracting archive
  - Installing guzzlehttp/psr7 (2.4.3): Extracting archive
  - Installing guzzlehttp/promises (1.5.2): Extracting archive
  - Installing guzzlehttp/guzzle (7.5.0): Extracting archive
  - Installing php-http/promise (1.1.0): Extracting archive
  - Installing php-http/httplug (2.3.0): Extracting archive
  - Installing php-http/discovery (1.14.3): Extracting archive
  - Installing elastic/transport (v8.6.0): Extracting archive
  - Installing elasticsearch/elasticsearch (v8.6.1): Extracting archive
2 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating autoload files
4 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found

Ensuite je bloque sur :
1675503971344.png

Une idée ?;
ES semble correctement installé mais pour l'instant je ne parviens pas à connecter XFES...
 

Nicolas

Administrateur
Membre du Staff
Ok en positionnant sur C:\laragon\www\vendor j'arrive à lancer autoload.php
Code:
C:\laragon\www
λ cd vendor

C:\laragon\www\vendor
λ autoload.php

C:\laragon\www\vendor
λ [main 2023-02-06T18:44:40.809Z] update#setState idle
[main 2023-02-06T18:44:41.764Z] [UtilityProcess id: 1, type: extensionHost, pid: <none>]: creating new...
[main 2023-02-06T18:44:41.782Z] [UtilityProcess id: 1, type: extensionHost, pid: 3724]: successfully created
[main 2023-02-06T18:44:43.755Z] [UtilityProcess id: 1, type: extensionHost, pid: 3724]: waiting to exit...
[main 2023-02-06T18:44:43.774Z] [UtilityProcess id: 1, type: extensionHost, pid: 3724]: received exit event with code 0
[main 2023-02-06T18:44:43.774Z] Extension host with pid 3724 exited with code: 0, signal: unknown.

Pas certain de comprendre, est-ce que la commande a bien été exécutée ?
De toutes façons je suis complètement perdu avec la suite...

$client = Elastic\Elasticsearch\ClientBuilder::create()->build();
Que faire avec ça ??

 

Maxime H

Membre 
Peut-être que ces lignes de commande pourraient aider (from AndyB)

Notes:

To start Elasticsearch issue the following command:

service elasticsearch start

To verify Elasticsearch is running issue the following command:

service elasticsearch status

To stop Elasticsearch issue the following command:

service elasticsearch stop

Install XenForo Enhanced Search and create an index, then you can use the commands below:

curl -XGET 'localhost:9200'

You can verify Elasticsearch is running with this command:

curl http://localhost:9200/_cluster/health?pretty
 

Membres en ligne

Aucun membre en ligne actuellement.
Extras
Les tutoriels
en français
Collection de tutoriels exclusifs pour découvrir l'environnement XenForo.
Our translations
exclusives
French translation of official XenForo and XenAddons softwares.
The subscription
19.90 €
A premium account to access all our official resources.
Contribute to the development and sustainability of the forum with a donation to our PayPal account.
Haut