Want more timely Centmin Mod News Updates?
Become a Member

Xenforo Elasticsearch Install for Xenforo

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

  1. Sunka

    Sunka Well-Known Member

    1,003
    276
    83
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +453
    Local Time:
    10:21 PM
    Nginx 1.15.0
    MariaDB 10.2.15
    @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

    147
    59
    28
    Nov 16, 2015
    Ratings:
    +189
    Local Time:
    4:21 AM
    1.15.x
    MariaDB 10.3.x
    XenForo doesn't support Elastic Search 2.x properly yet.
     
    • Agree Agree x 2
  3. Sunka

    Sunka Well-Known Member

    1,003
    276
    83
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +453
    Local Time:
    10:21 PM
    Nginx 1.15.0
    MariaDB 10.2.15
    @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 Premium Member Premium Member

    4,255
    1,034
    113
    May 25, 2014
    Ratings:
    +1,486
    Local Time:
    4:21 AM
    Mainline
    10.2
    Just install ES 1.7, very stable and fully supported by XenForo.
     
    • Agree Agree x 2
    • Like Like x 1
  5. eva2000

    eva2000 Administrator Staff Member

    36,047
    7,909
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,191
    Local Time:
    6:21 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    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,003
    276
    83
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +453
    Local Time:
    10:21 PM
    Nginx 1.15.0
    MariaDB 10.2.15
    @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,003
    276
    83
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +453
    Local Time:
    10:21 PM
    Nginx 1.15.0
    MariaDB 10.2.15
    Which steps to do vs your install tutorial?
     
  8. eva2000

    eva2000 Administrator Staff Member

    36,047
    7,909
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,191
    Local Time:
    6:21 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    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
     
    • Informative Informative x 1
  9. Sunka

    Sunka Well-Known Member

    1,003
    276
    83
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +453
    Local Time:
    10:21 PM
    Nginx 1.15.0
    MariaDB 10.2.15
    You are both online (@eva2000 and @RoldanLT). I have to use that fact. I am going to install ES.
     
  10. rdan

    rdan Premium Member Premium Member

    4,255
    1,034
    113
    May 25, 2014
    Ratings:
    +1,486
    Local Time:
    4:21 AM
    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,003
    276
    83
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +453
    Local Time:
    10:21 PM
    Nginx 1.15.0
    MariaDB 10.2.15
    I am installing ES now, in meanwhile, could you post your xenforo settings for Enchaned search? :)
     
  12. Sunka

    Sunka Well-Known Member

    1,003
    276
    83
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +453
    Local Time:
    10:21 PM
    Nginx 1.15.0
    MariaDB 10.2.15
    Installed, and now my search is rebuilding on forum.
    (y)
     
    • Like Like x 1
  13. Sunka

    Sunka Well-Known Member

    1,003
    276
    83
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +453
    Local Time:
    10:21 PM
    Nginx 1.15.0
    MariaDB 10.2.15
    uhhh... errors
     
  14. Sunka

    Sunka Well-Known Member

    1,003
    276
    83
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +453
    Local Time:
    10:21 PM
    Nginx 1.15.0
    MariaDB 10.2.15
    uhhh, I fixed all by my self :cigar::ROFLMAO:
     
    • Like Like x 1
  15. rdan

    rdan Premium Member Premium Member

    4,255
    1,034
    113
    May 25, 2014
    Ratings:
    +1,486
    Local Time:
    4:21 AM
    Mainline
    10.2
    Just updated :).
    [​IMG]
     
    • Informative Informative x 1
  16. Andy

    Andy Premium Member Premium Member

    419
    60
    28
    Aug 6, 2014
    Ratings:
    +83
    Local Time:
    4:21 PM
    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 Premium Member Premium Member

    4,255
    1,034
    113
    May 25, 2014
    Ratings:
    +1,486
    Local Time:
    4:21 AM
    Mainline
    10.2
    Just replace the content of the repo file from the latest here Repositories , then yum update.
     
    • Like Like x 1
    • Informative Informative x 1
  18. Andy

    Andy Premium Member Premium Member

    419
    60
    28
    Aug 6, 2014
    Ratings:
    +83
    Local Time:
    4:21 PM
    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
    [[email protected] ~]#  service elasticsearch restart
    Restarting elasticsearch (via systemctl):  Warning: Unit file of elasticsearch.service changed on disk, 'systemctl daemon-reload' recommended.
                                                               [  OK  ]
    [[email protected] ~]# nano /etc/elasticsearch/elasticsearch.yml
    [[email protected] ~]# service elasticsearch start
    Starting elasticsearch (via systemctl):  Warning: Unit file of elasticsearch.service changed on disk, 'systemctl daemon-reload' recommended.
                                                               [  OK  ]
    [[email protected] ~]# systemctl daemon-reload
    [[email protected] ~]# systemctl enable elasticsearch.service
    [[email protected] ~]# systemctl start elasticsearch.service
    [[email protected] ~]# ervice elasticsearch restart
    -bash: ervice: command not found
    [[email protected] ~]# service elasticsearch restart
    Restarting elasticsearch (via systemctl):                  [  OK  ]
    [[email protected] ~]# sed -i 's|^#network.host.*|network.host: 127.0.0.1|' /etc/elasticsearch/elasticsearch.yml
    [[email protected] ~]# sed -i 's|^#index.number_of_shards.*|index.number_of_shards: 1|' /etc/elasticsearch/elasticsearch.yml
    [[email protected] ~]# sed -i 's|^#index.number_of_replicas.*|index.number_of_replicas: 0|' /etc/elasticsearch/elasticsearch.yml
    [[email protected] ~]# sed -i 's|^#script.disable_dynamic.*|script.disable_dynamic: true|' /etc/elasticsearch/elasticsearch.yml
    [[email protected] ~]# cd /etc/elasticsearch/scripts/
    [[email protected] scripts]# ls
    xf-date-weighted.groovy
    [[email protected] scripts]# nprestart
    Restarting nginx (via systemctl):                          [  OK  ]
    Gracefully shutting down php-fpm . done
    Starting php-fpm  done
    [[email protected] scripts]#
     
  19. Andy

    Andy Premium Member Premium Member

    419
    60
    28
    Aug 6, 2014
    Ratings:
    +83
    Local Time:
    4:21 PM
    I have this error on XF
    Elasticsearch does not appear to be running but is enabled as the search system.
     
  20. rdan

    rdan Premium Member Premium Member

    4,255
    1,034
    113
    May 25, 2014
    Ratings:
    +1,486
    Local Time:
    4:21 AM
    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
     
    • Like Like x 1
..