Welcome to Centmin Mod Community
Become a Member

Xenforo Elasticsearch Install for Xenforo

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

  1. Sunka

    Sunka Active Member

    917
    240
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +388
    Local Time:
    8:15 PM
    Nginx 1.13.3
    MariaDB 10.1.24
    @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

    130
    57
    28
    Nov 16, 2015
    Ratings:
    +171
    Local Time:
    2:15 AM
    1.11.x
    MariaDB 10.1.x
    XenForo doesn't support Elastic Search 2.x properly yet.
     
    • Agree Agree x 2
  3. Sunka

    Sunka Active Member

    917
    240
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +388
    Local Time:
    8:15 PM
    Nginx 1.13.3
    MariaDB 10.1.24
    @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. RoldanLT

    RoldanLT Well-Known Member

    3,901
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    2:15 AM
    1.11
    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

    30,161
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    4:15 AM
    Nginx 1.13.x
    MariaDB 5.5
    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 Active Member

    917
    240
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +388
    Local Time:
    8:15 PM
    Nginx 1.13.3
    MariaDB 10.1.24
    @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 Active Member

    917
    240
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +388
    Local Time:
    8:15 PM
    Nginx 1.13.3
    MariaDB 10.1.24
    Which steps to do vs your install tutorial?
     
  8. eva2000

    eva2000 Administrator Staff Member

    30,161
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    4:15 AM
    Nginx 1.13.x
    MariaDB 5.5
    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 Active Member

    917
    240
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +388
    Local Time:
    8:15 PM
    Nginx 1.13.3
    MariaDB 10.1.24
    You are both online (@eva2000 and @RoldanLT). I have to use that fact. I am going to install ES.
     
  10. RoldanLT

    RoldanLT Well-Known Member

    3,901
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    2:15 AM
    1.11
    10.2
    You can't compare Eva to me, LOL.
    We are on the same boat Sunka:).
    Still learning things :).
     
  11. Sunka

    Sunka Active Member

    917
    240
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +388
    Local Time:
    8:15 PM
    Nginx 1.13.3
    MariaDB 10.1.24
    I am installing ES now, in meanwhile, could you post your xenforo settings for Enchaned search? :)
     
  12. Sunka

    Sunka Active Member

    917
    240
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +388
    Local Time:
    8:15 PM
    Nginx 1.13.3
    MariaDB 10.1.24
    Installed, and now my search is rebuilding on forum.
    (y)
     
    • Like Like x 1
  13. Sunka

    Sunka Active Member

    917
    240
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +388
    Local Time:
    8:15 PM
    Nginx 1.13.3
    MariaDB 10.1.24
    uhhh... errors
     
  14. Sunka

    Sunka Active Member

    917
    240
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +388
    Local Time:
    8:15 PM
    Nginx 1.13.3
    MariaDB 10.1.24
    uhhh, I fixed all by my self :cigar::ROFLMAO:
     
    • Like Like x 1
  15. RoldanLT

    RoldanLT Well-Known Member

    3,901
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    2:15 AM
    1.11
    10.2
    Just updated :).
    [​IMG]
     
    • Informative Informative x 1
  16. Andy

    Andy Active Member

    313
    45
    28
    Aug 6, 2014
    Ratings:
    +54
    Local Time:
    2:15 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. RoldanLT

    RoldanLT Well-Known Member

    3,901
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    2:15 AM
    1.11
    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 Active Member

    313
    45
    28
    Aug 6, 2014
    Ratings:
    +54
    Local Time:
    2:15 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
    [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

    313
    45
    28
    Aug 6, 2014
    Ratings:
    +54
    Local Time:
    2:15 PM
    I have this error on XF
    Elasticsearch does not appear to be running but is enabled as the search system.
     
  20. RoldanLT

    RoldanLT Well-Known Member

    3,901
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    2:15 AM
    1.11
    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