החל מגרסה 5 חברת Elastic הודיעה שלא יהיה ניתן להשתמש ב-Site Plugins ולכן התוסף המעולה Kopf לא ניתן להתקנה כפי שהיה בגרסאות קודמות.
על מנת להתקינו יש לבצע את הפעולות הבאות:
1. התקנת nginx (במערכות Ubuntu על ידי הפעלת הפקודה: sudo apt-get install nginx)
2. הורדת התוסף (על ידי הפקודה: wget https://github.com/lmenezes/elasticsearch-kopf/archive/v2.1.2.tar.gz) [אני הורדתי אל התיקיה /var/www/kopf/]
3. עריכת הקובץ kopf.js: יש למצוא את השורה המתייחסת לגרסת Elasticsearch ולעדכן אותה כך שתתייחס לגרסה 5.0.1 (אצלי הוא במסלול /var/www/kopf/_site/dist/kopf.js)
4. יצירת קובץ קונפיגורציה ל-nginx (למשל קובץ בשם kopf תחת התיקיה /etc/nginx/sites-available) שייראה בערך כך (אני מתכוון להריץ את kopf על פורט 8080):
server {
listen 8080 default_server;
listen [::]:8080 default_server;
# SSL configuration
#
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server;
#
# Note: You should disable gzip for SSL traffic.
# See: https://bugs.debian.org/773332
#
# Read up on ssl_ciphers to ensure a secure configuration.
# See: https://bugs.debian.org/765782
#
# Self signed certs generated by the ssl-cert package
# Don't use them in a production server!
#
# include snippets/snakeoil.conf;
#root /var/www/kopf/_site;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
server_name localhost;
location /kopf {
alias /var/www/kopf/_site;
}
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://localhost:9200;
proxy_read_timeout 90;
proxy_redirect http://localhost:9200 http://localhost:8080;
}
}
5. יצירת soft link לצורך הפעלת הדף: (על ידי הפקודה: sudo ln -s /etc/nginx/sites-available/kopf /etc/nginx/sites-enabled/kopf)
זהו. זה אמור להיות מוכן.