No config or log files and folders after reinstallation

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.

What symlinks are you referring to? We do not create any symlinks as part of our package installation. Maybe you're referring to the systemd symlinks for the service?

With symlinks (on new ubuntu server, but it complains about a "java runtime not found" issue again on startup)
Screenshot from 2017-12-05 16-24-55!

Screenshot from 2017-12-05 16-25-14!

Without symlinks (on my current ubuntu server, which actually works but symlinks seem to be missing)
Screenshot from 2017-12-05 16-28-56!

Screenshot from 2017-12-05 16-29-57!

As you might see in my last screenshot, I'm not able to access /etc/elasticsearch either, without being root user.

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