I am trying to install apache solr and I am following this tutorial. The problem is when I am trying to run bin/install_solr_service.sh --strip-components=2
it tells that
Supported OPTIONS include:
-d Directory for live / writable Solr files, such as logs, pid files, and index data; defaults to /var/solr
-i Directory to extract the Solr installation archive; defaults to /opt/
The specified path must exist prior to using this script.
-p Port Solr should bind to; default is 8983
-s Service name; defaults to solr
-u User to own the Solr files and run the Solr process as; defaults to solr
This script will create the specified user account if it does not exist.
-f Upgrade Solr. Overwrite symlink and init script of previous installation.
NOTE: Must be run as the root user
Why is it showing this error when I am already running it as root? Please help me out. Thanks in advance.
This is the output for ls -lh /opt
:
total 38M
drwxrwxrwx 7 root root 4.0K Apr 29 09:48 android-studio
drwxr-xr-x 2 root root 4.0K Jun 2 20:35 bin
drwxr-xr-x 3 root root 4.0K Nov 18 2015 google
drwxr-xr-x 5 root root 4.0K Jun 3 12:21 solr-5.5.1
drwxr-xr-x 5 root root 4.0K Jun 2 20:43 solr-6.0.1
-rw-r--r-- 1 root root 38M Jun 2 20:28 solr-6.0.1-src.tgz
drwxr-xr-x 4 root root 4.0K May 16 14:54 sublime_text
drwxr-xr-x 4 root root 4.0K May 16 11:30 teamviewer