I tried installing elasticsearch on Ubuntu Desktop 16.04.2 lts. At first, all went fine, installation including creation of configuration and log folders (and symlinks). Except for the part I forgot about installing Java, so my elasticsearch was unable to start. After installing Java it still wasn't able to start, so I removed elasticsearch:
sudo apt-get remove elasticsearch
After installing it again:
sudo apt-get install elasticsearch
It doesn't create any configuration and log folders, or files, anymore. I cannot reach /etc/elasticsearch, because it now contains "elasticsearch" as user, while it contained "root" after first installation. Also, the folder is empty.
So my issue is, after first installation (before Java was installed) it created the configuration files and folders under /etc, including the symlinks in /usr/share/elasticsearch. But after the second installation it doesn't.
I'm not really sure what the configuration file should contain, of elasticsearch 6, so I don't want to create it manually.
EDIT:
After executing below commands, I was able to run elasticsearch successfully, but it still doesn't contain the configuration files.....
I removed elasticsearch completely with below commands.
apt remove --purge elasticsearch
apt autoremove
apt-get install elasticsearch
Then while installing elasticsearch again, I faced a 'stateoverride' problem, to solve it, open stateoverride file and remove all lines which include "elasticsearch":
vi /var/lib/dpkg/stateoverride
Now I was able to successfully run elasticsearch:
systemctl start elasticsearch
But it still doesn't create any configuration files or folders. Hopefully anyone over here can help me out.