On 5/27/24 13:43, Lee Daniel wrote:
I'm on Centos 7.5.
Can't find it in:
* /usr/lib/systemd/system
* /usr/sbin/
I found it in
* /etc/init.d/
I know for sure when I initially installed I was able to use:
* service solr start/stop/restart
* systemctl start/stop/restart solr.service
The install script does not create a systemd service. It creates an
init script, so /etc/init.d is where it will live. Then systemd can
control the service because it has a sysvinit compatibility layer. TWe
are planning to change that to native systemd at some point in the future.
If at any point you ran Solr as root, chances are that some of the data
files in the data directory (which defaults to /var/solr but can be
changed) are probably now owned by root which can cause Solr to fail to
start.
You can change the settings (like which port Solr runs on) by editing
the include file, defaulting to /etc/default/solr.in.sh, where 'solr' is
the name of the service.
This is the contents of my /etc/default/solr.in.sh file:
SOLR_PID_DIR="/var/solr"
SOLR_HOME="/var/solr/data"
LOG4J_PROPS="/var/solr/log4j2.xml"
SOLR_LOGS_DIR="/var/solr/logs"
SOLR_PORT="8983"
SOLR_HEAP="768m"
GC_TUNE=" \
-XX:+UnlockExperimentalVMOptions \
-XX:+UseZGC \
-XX:+ParallelRefProcEnabled \
-XX:+ExplicitGCInvokesConcurrent \
-XX:+AlwaysPreTouch \
-XX:+UseNUMA \
"
SOLR_SECURITY_MANAGER_ENABLED=false
SOLR_JAVA_HOME="/usr/lib/jvm/java-17-openjdk-amd64"
SOLR_JAVA_STACK_SIZE="-Xss1m"
SOLR_ULIMIT_CHECKS=false
SOLR_GZIP_ENABLED=true
SOLR_JETTY_HOST=0.0.0.0
SOLR_MODE="solrcloud"
SOLR_MODULES="analysis-extras"
SOLR_HOST=solr.elyograg.org
SOLR_PORT_ADVERTISE=443
ENABLE_REMOTE_JMX_OPTS=true
RMI_PORT=18983
The first few lines were created by the install script, and I modified
it from there.
Running Solr as root is only a requirement if you try to bind to a port
number below 1024. I would recommend not running Solr on such a port.
I run my Solr behind haproxy. Solr is on port 8983 without TLS, and
this port is not accessible via the Internet. The haproxy config only
lets a very small number of public IP addresses talk to solr on 443.
Solr is running on an AWS instance.
Thanks,
Shawn