Learn about Centmin Mod LEMP Stack today
Register Now

Install Xenforo CentOS 7.x How To Install Elasticsearch 7.x for Xenforo

Discussion in 'Centmin Mod User Tutorials & Guides' started by Sunka, Mar 6, 2020.

  1. modder

    modder Member

    127
    16
    18
    Dec 6, 2019
    Ratings:
    +27
    Local Time:
    12:35 AM
    What should I enter for username and password? Do I need to use HTTPS if the ES server is installed in the same server as centimin?


    upload_2025-4-15_21-22-21.png
     
  2. duderuud

    duderuud Active Member

    320
    97
    28
    Dec 5, 2020
    The Netherlands
    Ratings:
    +217
    Local Time:
    6:35 PM
    1.29 x
    11.4
    If you installed ES correctly the username and password were shown in the install log.
     
  3. modder

    modder Member

    127
    16
    18
    Dec 6, 2019
    Ratings:
    +27
    Local Time:
    12:35 AM
    I think it's correctly installed.

    upload_2025-4-15_23-16-34.png

    But how can I retrieve the username and password? I can't use the HTTPS btw. It said connection problem with the server.
     
  4. duderuud

    duderuud Active Member

    320
    97
    28
    Dec 5, 2020
    The Netherlands
    Ratings:
    +217
    Local Time:
    6:35 PM
    1.29 x
    11.4
    You are using version 7. That doesn't come with https (by default) so you don't need to use it.

    ES8 supports https though.
     
  5. deltahf

    deltahf Premium Member Premium Member

    598
    274
    63
    Jun 8, 2014
    Ratings:
    +506
    Local Time:
    12:35 PM
    Just checking in to confirm this is still working to install ElasticSearch 7.17.28 on AlmaLinux 9. Thank you once again for this resource, @Sunka! :)

    Only one very minor issue with the commands in the guide:

    Code (Text):
    $ service elasticsearch start
    Starting elasticsearch: /etc/init.d/elasticsearch: line 99: daemon: command not found
    


    Of course, just use systemctl instead:

    Code (Text):
    $ systemctl start elasticsearch
    
     
  6. mknobbe

    mknobbe New Member

    21
    4
    3
    Jul 12, 2022
    Ratings:
    +21
    Local Time:
    11:35 AM
    Nginx 1.31.0
    Maria DB 11.4.x
    I've successfully installed elasticsearch using this thread multiple times. However, I recently ran into an issue on an install where elasticsearch failed to start and I would get an error message along the lines of

    java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
    Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.UnsatisfiedLinkError: /tmp/elasticsearch-6278881121764626280/jna13378800042182009509.tmp: /tmp/elasticsearch-6278881121764626280/jna13378800042182009509.tmp: failed to map segment from shared object [in thread "main"]

    Even though I had defined the tmp directory as before, it did not seem to use this command was attempting to use /tmp which meant i'd have to modify the permissions of tmp which i did not want to do.
    I could not make a change in file user/group ownership that seemed to fix reading jvm.options
    A workaround I found was to add the tmp directory command in /etc/sysconfig/elasticsearch
    Adding

    Code:
    ES_TMPDIR=/home/elasticsearch
    fixed the issue for me.

    Hope this helps someone in the future, including myself.:cool:
     
  7. pamamolf

    pamamolf Well-Known Member

    4,127
    429
    83
    May 31, 2014
    Ratings:
    +841
    Local Time:
    7:35 PM
    Nginx-1.29.x
    MariaDB 10.6.x
    Which Elasticsearch version?
     
  8. eva2000

    eva2000 Administrator Staff Member

    59,718
    12,541
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,185
    Local Time:
    2:35 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    that is correct solution
     
  9. mknobbe

    mknobbe New Member

    21
    4
    3
    Jul 12, 2022
    Ratings:
    +21
    Local Time:
    11:35 AM
    Nginx 1.31.0
    Maria DB 11.4.x
    That was for 8. Pretty sure this also works for 7 is necessary.
     
  10. pamamolf

    pamamolf Well-Known Member

    4,127
    429
    83
    May 31, 2014
    Ratings:
    +841
    Local Time:
    7:35 PM
    Nginx-1.29.x
    MariaDB 10.6.x
    What about this?

    /etc/elasticsearch/jvm.options

    Code:
    -Djava.io.tmpdir=
     
  11. mknobbe

    mknobbe New Member

    21
    4
    3
    Jul 12, 2022
    Ratings:
    +21
    Local Time:
    11:35 AM
    Nginx 1.31.0
    Maria DB 11.4.x
    To clarify, the installation instructions to start this thread will work for both Elasticsearch 7.x and 8.x. However, for 8.x you either need to disable the security or configure it, else you will not be able to connect to the service.

    The workaround I posted was something to be used if the temp directory setting, "Djava.io.tmpdir=", was not being read which would cause the service to bomb.