There are multiple ways to install Elasticsearch based on the operating system. Here is a general RPM installation for CentOS and Red Hat; for other Linux flavors you can refer to the preceding docs. Make sure your server has access to the internet for downloading and installing this RPM:
rpm -ivh https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.4.1.rpm