Last active
March 3, 2020 17:24
-
-
Save sjb9774/9f69c77418d0b8e29fa6db216d83fe6d to your computer and use it in GitHub Desktop.
Update ElasticSearch 2.4.3 to 6.x
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# on VM | |
sudo su | |
rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch | |
touch /etc/yum.repos.d/elasticsearch.repo | |
echo "[elasticsearch-6.x] | |
name=Elasticsearch repository for 6.x packages | |
baseurl=https://artifacts.elastic.co/packages/6.x/yum | |
gpgcheck=1 | |
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch | |
enabled=1 | |
autorefresh=1 | |
type=rpm-md" >> /etc/yum.repos.d/elasticsearch.repo | |
yum install elasticsearch | |
# remove old elasticsearch data and directory structure | |
rm -rf /var/lib/elasticsearch/* | |
chown -R elasticsearch:elasticsearch /var/lib/elasticsearch | |
# kill old elastic search process (systemctl won't work since the service should now be pointed at the es6 install) | |
kill $(cat /var/run/elasticsearch/elasticsearch.pid) && rm /var/run/elasticsearch/elasticsearch.pid | |
systemctl start elasticsearch.service | |
# leave sudo | |
exit | |
cd /var/www/sites/<project-directory> | |
bin/magento indexer:reindex catalogsearch_fulltext |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment