I prepared Elastic stack setup on Centos 7 for Vagrant [https://www.vagrantup.com/] few months ago, but it could be used without it too. It was set to 6.2.4 but it is easy to change it. I decided to mention it here, as it could be useful for someone. I believe that it should be easier to find it by the website.
v6:
If you would like to set different version 6.x you need to edit file " bootstrap.sh" line 2 and set correct version e.g:
VERSION="6.2.4"
v7:
If you would like to set different version 7.x you need to edit file " bootstrap.sh" line 2 and set correct version e.g:
VERSION="7.6.2"
and replace lines from 10 to 17 with correct repository:
[elastic-7.x]
name=Elastic repository for 7.x packages
baseurl=https://artifacts.elastic.co/packages/7.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md