OBSOLETE
- Limits
- As root
- In /etc/security/limits.conf insert
Code Block solr hard memlock unlimited solr soft memlock unlimited solr -
- In /etc/security/limits.conf insert
- As root
...
als root: ------------------------------------------------------
mkdir /data/ddb
chmod 755 /data/ddb
chown -R admin:users /data/ddb
----------------------------------------------------------------
als admin: -----------------------------------------------------
...
nofile 65536 solr - nproc 65000
- In /etc/sysctl.conf insert
Code Block vm.max_map_count = 262144
- Install
- Create Directory /data/ddb/tools/solr as root:
Code Block mkdir /data/ddb/tools/solr chmod -R 755 /data/ddb/* chown -R admin:users /data/ddb
- Install required libraries + Java as root
Code Block yum -y install lsof python-lxml rsync java-1.8.0-openjdk java-1.8.0-openjdk-devel
- Download + Install SOLR-Tar as root
Code Block cd export https_proxy=http://proxy.fiz-karlsruhe.de:8888/ &&
...
curl -O "https://archive.apache.org/dist/lucene/solr/
...
8.
...
0.0/solr-
...
8.
...
0.0.tgz"
...
tar xfp solr-
...
8.
...
0.0.tgz
...
cd solr-6.5.0/bin/
----------------------------------------------------------------
als root: ------------------------------------------------------
yum -y install lsof python-lxml rsync java-1.8.0-openjdk java-1.8.0-openjdk-
devel
...
./solr-8.0.0/bin/install_solr_service.sh ~/
...
solr-
...
8.
...
0.0.tgz -i /data/ddb/tools/solr -d /data/ddb/tools/solr -p
...
8183 -f
...
chown -R solr:solr
...
/data/ddb/tools/solr/solr-
...
8.
...
0.0
...
----------------------------------------------------------------
als admin: -----------------------------------------------------
cd
rm -fr solr-6.5.0*
----------------------------------------------------------------
als solr: ------------------------------------------------------
cd /opt/solr
...
ln -s /data/ddb/tools/solr/solr-8.0.0 /data/ddb/tools/solr/current rm -fr ~/solr-8.0.0*
- Configure JAVA_OPTS
- in /etc/default/solr.in.sh (SOLR_HEAP p1-solr01: 200g)
Code Block SOLR_HEAP="24g" SOLR_PID_DIR="/data/ddb/tools/solr" SOLR_HOME="/data/ddb/tools/solr/data" LOG4J_PROPS="/data/ddb/tools/solr/log4j2.xml" SOLR_LOGS_DIR="/data/ddb/tools/solr/logs" SOLR_PORT="8183" SOLR_OPTS="$SOLR_OPTS -Dsolr.disable.shardsWhitelist=true -Dlog4j2.formatMsgNoLookups=true"
- Configure Access as solr-user + ability to restart service as root
- chmod 660 /etc/sudoers
- In /etc/sudoers add
Code Block ## Allow admin to su to solr and to start solr-server admin ALL=(root) NOPASSWD: /etc/init.d/solr admin ALL=(root) NOPASSWD: /bin/su - solr
- chmod 440 /etc/sudoers
Copy DDB-Libs + Configurations as solr
Code Block cd /data/ddb/tools/solr/current cp ./dist/*.jar ./server/solr-webapp/webapp/WEB-INF/lib/
...
cp contrib/extraction/lib/*.jar ./server/solr-webapp/webapp/WEB-INF/lib/
...
cp contrib/analysis-extras/lucene-libs/*.jar ./server/solr-webapp/webapp/WEB-INF/lib/ cd /data/ddb/tools/solr/current/server/solr-webapp/webapp/WEB-
...
INF/lib/
INF/lib ln -s /data/ddb/ddb-backend-solr/lib/ddb-backend-solr.jar ln -s /data/ddb/ddb-backend-solr/lib/solr-ocrhighlighting.jar cd /data/ddb/tools/solr/data ln -s /data/ddb/ddb-backend-solr/conf/solr.xml CORES=(fulltext nodes organization person search
...
newspaper newspaper-issues oaiitems) for core in ${CORES[@]};
...
do /data/ddb/tools/solr/current/bin/solr create -c $core -n $core
...
done
...
done NEUER FOLLOWER: cd /data/ddb/tools/solr/data/
...
rm -r conf
...
<indexname>/conf rm -rf * cp /data/ddb/
...
ddb-backend-solr/conf/
...
<indexname>/
...
cd ../nodes/
rm -r conf
...
conf/solrconfig_follower.xml solrconfig.xml cp /data/ddb/
...
ddb-backend-solr/conf/
...
<indexname>/
...
conf/
...
schema.
...
rm -r conf
...
xml . cp /data/ddb/
...
ddb-backend-solr/conf/
...
<indexname>/
...
conf/
...
*.
...
rm -r conf
...
txt . NEUER LEADER: cd /data/ddb/
...
tools/solr/
...
cd ../search/
rm -r conf
...
data/<indexname> rm -r conf ln -s /data/ddb/
...
ddb-backend-solr/conf/
...
<indexname>/
...
cd /opt/solr/server/solr-webapp/webapp/WEB-INF/lib
ln -s /data/ddb/Cortex/lib/SolrIndexServer.jar
...
conf
- Adapt log4j2.xml, set SizeBasedTriggeringPolicy size = 1 GB, set DefaultRolloverStrategy max = 5
- solr-service enablen (dass er bei reboot mitstartet)