# Xpack installation through bash script

**URL:** <https://discuss.elastic.co/t/xpack-installation-through-bash-script/150486>\
**Category:** Elasticsearch\
**Created:** [September 30, 2018, 7:05pm UTC](https://discuss.elastic.co/t/xpack-installation-through-bash-script/150486 "2018-09-30T19:05:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sandipatmca](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@sandipatmca](https://discuss.elastic.co/u/sandipatmca)\
**Post date:** [September 30, 2018, 7:05pm UTC](https://discuss.elastic.co/t/xpack-installation-through-bash-script/150486/1 "2018-09-30T19:05:16Z")

</div>

As per our requirement we have to install xpack through bash script .  
[user@dev-elk-0 ~]$ sudo elasticsearch-plugin install \< xpack installer file name\>

The problem is that the install of x-pack prompts for an answer and we are not able to figure out how to answer the prompt through bash script.Please suggest how we can install xpack through bash script and force the script to install x-pack by skipping the prompt.

Below the install log to show where installer prompt user for Answer [yN]:

-\> Downloading file:///tmp/x-pack-5.1.2.zip  
[=================================================] 100%  
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@  
@ WARNING: plugin requires additional permissions @  
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

- java.lang.RuntimePermission accessClassInPackage.com.sun.activation.registries
- java.lang.RuntimePermission getClassLoader
- java.lang.RuntimePermission setContextClassLoader
- java.lang.RuntimePermission setFactory
- java.security.SecurityPermission createPolicy.JavaPolicy
- java.security.SecurityPermission getPolicy
- java.security.SecurityPermission putProviderProperty.BC
- java.security.SecurityPermission setPolicy
- java.util.PropertyPermission \* read,write
- java.util.PropertyPermission sun.nio.ch.bugLevel write
- javax.net.ssl.SSLPermission setHostnameVerifier  
See [http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html](http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html)  
for descriptions of what these permissions allow and the associated risks.  
Continue with installation? [y/N]y  
-\>\> Installed x-pack

---

<div class="post-metadata">

**Author:** ![sandipatmca](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@sandipatmca](https://discuss.elastic.co/u/sandipatmca)\
**Post date:** [September 30, 2018, 7:07pm UTC](https://discuss.elastic.co/t/xpack-installation-through-bash-script/150486/2 "2018-09-30T19:07:23Z")

</div>

I got the answer in one of the thread.We have to install with --batch flag.  
Let me try that 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 28, 2018, 7:15pm UTC](https://discuss.elastic.co/t/xpack-installation-through-bash-script/150486/3 "2018-10-28T19:15:51Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
