Welcome to Centmin Mod Community
Register Now

Xenforo Elasticsearch Install for Xenforo

Discussion in 'Forum software usage' started by Sunka, Nov 27, 2015.

  1. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    11:56 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    @eva2000 anything like this for elastic search 2.1?
    I bought xenforo addon, but Floren did not update repo to new version of elastic search, nor it is available for Centos 7.
    Is your advice to setup minor version (1.7) and install xenforo addon and update both (ES to 2,1 when xenforo addon be updated), or to install ES 2.1 and install above that xenforo addon with tweaking advices to work with ES 2.1?


    Or to wait for Florens 2.1 version and xenforo new version of addon?
     
  2. Xon

    Xon Active Member

    173
    61
    28
    Nov 16, 2015
    Ratings:
    +229
    Local Time:
    6:56 PM
    1.15.x
    MariaDB 10.3.x
    XenForo doesn't support Elastic Search 2.x properly yet.
     
  3. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    11:56 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    @Xon, yep I read about it, many problems with last xenforo addon and newest ES.
    So, what should I do?
    Wait for new version of xenforo enchaned search and then maybe I will be luck to find somewhere tutorial to install elastic search as it shoud be installed
    It is not good... I hoped that tonight I will setup both, but I have no luck
     
  4. rdan

    rdan Well-Known Member

    5,446
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    6:56 PM
    Mainline
    10.2
    Just install ES 1.7, very stable and fully supported by XenForo.
     
  5. eva2000

    eva2000 Administrator Staff Member

    54,522
    12,211
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,780
    Local Time:
    8:56 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    this :D

    does Axivo repo get updated anymore ? I'd use official Elasticsearch yum repo instead elasticsearch 1.5 to 1.7 for CentOS 7 and CentOS 6.6 · GitHub
     
  6. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    11:56 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    @RoldanLT
    This tutorial by @eva2000 will be enough?

    Code:
    rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch
    nano /etc/yum.repos.d/elasticsearch.repo
    Add:
    Code:
    [elasticsearch-1.7]
    name=Elasticsearch repository for 1.7.x packages
    baseurl=http://packages.elastic.co/elasticsearch/1.7/centos
    gpgcheck=1
    gpgkey=http://packages.elastic.co/GPG-KEY-elasticsearch
    enabled=1
    Code:
    yum list available --disablerepo=* --enablerepo=elasticsearch-1.7 -q
    yum -y install java-1.8.0-openjdk
    yum -y install elasticsearch
    sed -i 's|^#network.host.*|network.host: 127.0.0.1|' /etc/elasticsearch/elasticsearch.yml
    sed -i 's|^#index.number_of_shards.*|index.number_of_shards: 1|' /etc/elasticsearch/elasticsearch.yml
    sed -i 's|^#index.number_of_replicas.*|index.number_of_replicas: 0|' /etc/elasticsearch/elasticsearch.yml
    sed -i 's|^#script.disable_dynamic.*|script.disable_dynamic: true|' /etc/elasticsearch/elasticsearch.yml
    mkdir /etc/elasticsearch/scripts/
    cp -a /path/to/xenforoinstall/library/XenES/_scripts/*.groovy /etc/elasticsearch/scripts/
    service elasticsearch start
    systemctl daemon-reload
    systemctl enable elasticsearch.service
    systemctl start elasticsearch.service
    Anything else to do except open port 9200 in firewall and set 512MB ram for elastic search (in /etc/sysconfig/elasticsearch => set.default.ES_HEAP_SIZE=512)

    Any other settings to change, or variable?
     
  7. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    11:56 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    Which steps to do vs your install tutorial?
     
  8. eva2000

    eva2000 Administrator Staff Member

    54,522
    12,211
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,780
    Local Time:
    8:56 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Yes those steps
    No need to open the port if elasticsearch is installed on same server as forums as communication is internal. It is a security risk to open the port to public access.
    steps i outlined for ES 1.7 install and then depending on CentOS 6 or 7 the required start and enable service commands
     
  9. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    11:56 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    You are both online (@eva2000 and @RoldanLT). I have to use that fact. I am going to install ES.
     
  10. rdan

    rdan Well-Known Member

    5,446
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    6:56 PM
    Mainline
    10.2
    You can't compare Eva to me, LOL.
    We are on the same boat Sunka:).
    Still learning things :).
     
  11. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    11:56 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    I am installing ES now, in meanwhile, could you post your xenforo settings for Enchaned search? :)
     
  12. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    11:56 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    Installed, and now my search is rebuilding on forum.
    (y)
     
  13. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    11:56 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    uhhh... errors
     
  14. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    11:56 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    uhhh, I fixed all by my self :cigar::ROFLMAO:
     
  15. rdan

    rdan Well-Known Member

    5,446
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    6:56 PM
    Mainline
    10.2
    Just updated :).
    [​IMG]
     
  16. Andy

    Andy Active Member

    543
    89
    28
    Aug 6, 2014
    Ratings:
    +133
    Local Time:
    4:56 AM
    Xenforo just released the new ES addon that supports ES 2.0+
    I'm still running ES 1.7 on my centminmod server.

    Any idea on how to update the ES to 2.1?
     
  17. rdan

    rdan Well-Known Member

    5,446
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    6:56 PM
    Mainline
    10.2
    Just replace the content of the repo file from the latest here Repositories , then yum update.
     
  18. Andy

    Andy Active Member

    543
    89
    28
    Aug 6, 2014
    Ratings:
    +133
    Local Time:
    4:56 AM
    Updated OK but ES seems to not running
    Code:
    Updating   : elasticsearch-2.1.0-1.noarch                                                     1/2
    warning: /etc/elasticsearch/elasticsearch.yml created as /etc/elasticsearch/elasticsearch.yml.rpmnew
    [root@andy ~]#  service elasticsearch restart
    Restarting elasticsearch (via systemctl):  Warning: Unit file of elasticsearch.service changed on disk, 'systemctl daemon-reload' recommended.
                                                               [  OK  ]
    [root@andy ~]# nano /etc/elasticsearch/elasticsearch.yml
    [root@andy ~]# service elasticsearch start
    Starting elasticsearch (via systemctl):  Warning: Unit file of elasticsearch.service changed on disk, 'systemctl daemon-reload' recommended.
                                                               [  OK  ]
    [root@andy ~]# systemctl daemon-reload
    [root@andy ~]# systemctl enable elasticsearch.service
    [root@andy ~]# systemctl start elasticsearch.service
    [root@andy ~]# ervice elasticsearch restart
    -bash: ervice: command not found
    [root@andy ~]# service elasticsearch restart
    Restarting elasticsearch (via systemctl):                  [  OK  ]
    [root@andy ~]# sed -i 's|^#network.host.*|network.host: 127.0.0.1|' /etc/elasticsearch/elasticsearch.yml
    [root@andy ~]# sed -i 's|^#index.number_of_shards.*|index.number_of_shards: 1|' /etc/elasticsearch/elasticsearch.yml
    [root@andy ~]# sed -i 's|^#index.number_of_replicas.*|index.number_of_replicas: 0|' /etc/elasticsearch/elasticsearch.yml
    [root@andy ~]# sed -i 's|^#script.disable_dynamic.*|script.disable_dynamic: true|' /etc/elasticsearch/elasticsearch.yml
    [root@andy ~]# cd /etc/elasticsearch/scripts/
    [root@andy scripts]# ls
    xf-date-weighted.groovy
    [root@andy scripts]# nprestart
    Restarting nginx (via systemctl):                          [  OK  ]
    Gracefully shutting down php-fpm . done
    Starting php-fpm  done
    [root@andy scripts]#
     
  19. Andy

    Andy Active Member

    543
    89
    28
    Aug 6, 2014
    Ratings:
    +133
    Local Time:
    4:56 AM
    I have this error on XF
    Elasticsearch does not appear to be running but is enabled as the search system.
     
  20. rdan

    rdan Well-Known Member

    5,446
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    6:56 PM
    Mainline
    10.2
    Remove this in your config then restart ES:
    index.number_of_shards: 1
    index.number_of_replicas: 0
    script.disable_dynamic: true