install and start elasticsearch on openSUSE
this will allow install and start of elasticsearch on openSUSE based distributions Change-Id: I4d778c260247e73b500ca7d17835655c21941541
This commit is contained in:
parent
aed9300b71
commit
53e9aca6ce
@ -37,7 +37,7 @@ function wget_elasticsearch {
|
|||||||
function download_elasticsearch {
|
function download_elasticsearch {
|
||||||
if is_ubuntu; then
|
if is_ubuntu; then
|
||||||
wget_elasticsearch elasticsearch-${ELASTICSEARCH_VERSION}.deb
|
wget_elasticsearch elasticsearch-${ELASTICSEARCH_VERSION}.deb
|
||||||
elif is_fedora; then
|
elif is_fedora || is_suse; then
|
||||||
wget_elasticsearch elasticsearch-${ELASTICSEARCH_VERSION}.noarch.rpm
|
wget_elasticsearch elasticsearch-${ELASTICSEARCH_VERSION}.noarch.rpm
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -61,6 +61,9 @@ function start_elasticsearch {
|
|||||||
elif is_fedora; then
|
elif is_fedora; then
|
||||||
sudo /bin/systemctl start elasticsearch.service
|
sudo /bin/systemctl start elasticsearch.service
|
||||||
_check_elasticsearch_ready
|
_check_elasticsearch_ready
|
||||||
|
elif is_suse; then
|
||||||
|
sudo /usr/bin/systemctl start elasticsearch.service
|
||||||
|
_check_elasticsearch_ready
|
||||||
else
|
else
|
||||||
echo "Unsupported architecture...can not start elasticsearch."
|
echo "Unsupported architecture...can not start elasticsearch."
|
||||||
fi
|
fi
|
||||||
@ -71,6 +74,8 @@ function stop_elasticsearch {
|
|||||||
sudo /etc/init.d/elasticsearch stop
|
sudo /etc/init.d/elasticsearch stop
|
||||||
elif is_fedora; then
|
elif is_fedora; then
|
||||||
sudo /bin/systemctl stop elasticsearch.service
|
sudo /bin/systemctl stop elasticsearch.service
|
||||||
|
elif is_suse ; then
|
||||||
|
sudo /usr/bin/systemctl stop elasticsearch.service
|
||||||
else
|
else
|
||||||
echo "Unsupported architecture...can not stop elasticsearch."
|
echo "Unsupported architecture...can not stop elasticsearch."
|
||||||
fi
|
fi
|
||||||
@ -92,6 +97,11 @@ function install_elasticsearch {
|
|||||||
yum_install ${FILES}/elasticsearch-${ELASTICSEARCH_VERSION}.noarch.rpm
|
yum_install ${FILES}/elasticsearch-${ELASTICSEARCH_VERSION}.noarch.rpm
|
||||||
sudo /bin/systemctl daemon-reload
|
sudo /bin/systemctl daemon-reload
|
||||||
sudo /bin/systemctl enable elasticsearch.service
|
sudo /bin/systemctl enable elasticsearch.service
|
||||||
|
elif is_suse; then
|
||||||
|
is_package_installed java-1_8_0-openjdk-headless || install_package java-1_8_0-openjdk-headless
|
||||||
|
zypper_install --no-gpg-checks ${FILES}/elasticsearch-${ELASTICSEARCH_VERSION}.noarch.rpm
|
||||||
|
sudo /usr/bin/systemctl daemon-reload
|
||||||
|
sudo /usr/bin/systemctl enable elasticsearch.service
|
||||||
else
|
else
|
||||||
echo "Unsupported install of elasticsearch on this architecture."
|
echo "Unsupported install of elasticsearch on this architecture."
|
||||||
fi
|
fi
|
||||||
@ -103,6 +113,8 @@ function uninstall_elasticsearch {
|
|||||||
sudo apt-get purge elasticsearch
|
sudo apt-get purge elasticsearch
|
||||||
elif is_fedora; then
|
elif is_fedora; then
|
||||||
sudo yum remove elasticsearch
|
sudo yum remove elasticsearch
|
||||||
|
elif is_suse; then
|
||||||
|
sudo zypper rm elasticsearch
|
||||||
else
|
else
|
||||||
echo "Unsupported install of elasticsearch on this architecture."
|
echo "Unsupported install of elasticsearch on this architecture."
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user