[ 
https://issues.apache.org/jira/browse/SOLR-12777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16619215#comment-16619215
 ] 

Shawn Heisey commented on SOLR-12777:
-------------------------------------

This is the contents of the file I have on my personal server for a Solr 7.4.0 
install I did.  This file is named /etc/default/solr7.in.sh

{noformat}
SOLR_PID_DIR="/storage0/solr740"
SOLR_HOME="/storage0/solr740/data"
LOG4J_PROPS="/storage0/solr740/log4j2.xml"
SOLR_LOGS_DIR="/storage0/solr740/logs"
SOLR_PORT="8900"
SOLR_HEAP=3g
{noformat}

For this install, I set the install directory to /storage0, the var dir to 
/storage0/solr740, the port to 8900, and the service name to solr7.  I ended up 
with the include file mentioned above, in which the only thing I actually 
changed was the heap size.  I didn't use the default port of 8983 because I 
want to be able to use this server for testing code changes on Solr, and want 
the default port to be available for that.

The program is installed in /storage0/solr-7.4.0 and /storage0/solr7 is a 
symlink pointing to that location.  The "/storage0" location is the mount point 
of a large volume handled by a dedicated RAID controller.


> Add bin/solr args for specifying PID and LOGS dirs
> --------------------------------------------------
>
>                 Key: SOLR-12777
>                 URL: https://issues.apache.org/jira/browse/SOLR-12777
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: scripts and tools
>    Affects Versions: 7.3.1
>            Reporter: Pete Ryland
>            Priority: Major
>
> When starting solr, an optional {{-d}} parameter can be provided.  This 
> specifies the "Solr server directory" which needs to be the {{server}} 
> directory from the raw distribution.  This clearly contains the program 
> files, so as per common practice should not be writable by the user running 
> the program.  However, when specified, an error results because it tries to 
> create a log directory within the program directory!  This is really really 
> bad practice.  One should be able to specify a directory for the runtime 
> files and log files on the command line.  It would be even better if the 
> defaults conformed to the filesystem hierarchy standard when run on a Linux 
> system.  I understand that you want to make it easy for developers to use 
> your software, but when deploying on actual production systems, these things 
> are really important.  It's also important to understand that the people 
> deploying your software to production are different to the ones who develop 
> with your software, and a deep understanding of your software shouldn't be 
> necessary for the former to be able to deploy it.
> A wholly-unsatisfactory workaround is to set the pid and log directories by 
> environment variable before starting the server:
> {{$ export SOLR_PID_DIR=/var/lib/celum-search}}
> {{$ export SOLR_LOGS_DIR=/var/log/celum-search}}
> This can also be done in {{/etc/default/solr.in.sh}}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to