Elasticsearch is search engine software you can install into your website.
When installing onto a Dedicated server, you will run into errors related to Grsecurity. This is because Elasticsearch comes bundled with its own Java binary that gets updated and used after each update or fresh installation of Elasticsearch.
Since these settings are replaced on install, the Grsec settings get overwritten. To resolve this issue, you'll need to install a different non-grsec kernel on your Dedicated server.
This article only explains how to update your kernel in order to install Elasticsearch on a Dedicated server. It does not explain how to install Elasticsearch.
Make sure you have created an admin user on your Dedicated server. You will need this type of user to install a new kernel.
What servers does this apply to?
This only applies to Dedicated servers running Ubuntu Bionic 18 with a grsec kernel. You can verify this by running the following commands via SSH:
Check if the server is running Ubuntu 18.
[server]$ lsb_release -c Codename: bionic
Check if the server is running a grsec kernel.
[server]$ uname -r 5.4.32-grsec-grsec.virt+
Installing a new kernel
As mentioned above, to resolve installation issues, you must install a new kernel over the 5.4.32-grsec-grsec.virt+ kernel.
- Log into your server via SSH as your admin user. Your prompt should show root as the user.
- Run the following command.
root@[server]# apt-get update; apt-get install linux-headers-5.4.32-generic.virt linux-image-5.4.32-generic.virt; sed -i 's/5.4.32-grsec-grsec.virt+/5.4.32-generic.virt/' /etc/default/grub; update-grub
- Reboot your server. You can do this by navigating to the Dedicated dashboard page in your panel and clicking the Powercycle button.
You can now install Elasticsearch without errors.