Solr standalone server (Ubuntu 18.04, Solr 7.6) over KVM

* Ubuntu server 18.04 LTS (from ISO)
* 20GB virtualdisk mounted as / (root)
* 100GB virtualdisk mounted as /var
* Set IPv4 and IPv6
* Java 8
apt install openjdk-8-jdk
  • extend ulimit
nano -w /etc/systemd/system.conf
	DefaultLimitNOFILE=65535
	DefaultLimitNPROC=65535

nano -w /etc/systemd/user.conf
	DefaultLimitNOFILE=65535
	DefaultLimitNPROC=65535

nano -w /etc/security/limits.conf
	*       hard    nofile  65535
	*       soft    nofile  65535
	*       hard    nproc   65535
	*       soft    nproc   65535

reboot

ulimit -a
open files                      (-n) 65535
max user processes              (-u) 65535
  • Install Solr
wget https://www-us.apache.org/dist/lucene/solr/7.6.0/solr-7.6.0.tgz
tar xzf solr-7.6.0.tgz solr-7.6.0/bin/install_solr_service.sh --strip-components=2

bash ./install_solr_service.sh solr-7.6.0.tgz

	id: ‘solr’: no such user
	Creating new user: solr
	Adding system user `solr' (UID 111) ...
	Adding new group `solr' (GID 113) ...
	Adding new user `solr' (UID 111) with group `solr' ...
	Creating home directory `/var/solr' ...
	Extracting solr-7.6.0.tgz to /opt
	Installing symlink /opt/solr -> /opt/solr-7.6.0 ...
	Installing /etc/init.d/solr script ...
	Installing /etc/default/solr.in.sh ...
	Service solr installed.
	Customize Solr startup configuration in /etc/default/solr.in.sh
cat /etc/default/solr.in.sh
	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"
  • Create new core
download conf files to solrconfigford8/conf
cd /opt/solr
sudo -u solr bin/solr create_core -c archipelago -d solrconfigford8/conf -V

	INFO  - 2019-02-05 06:52:07.808; org.apache.solr.util.configuration.SSLCredentialProviderFactory; Processing SSL Credential Provider chain: env;sysprop
	Copying configuration to new core instance directory:
	/var/solr/data/archipelago
	Creating new core 'archipelago' using command:
	http://localhost:8983/solr/admin/cores?action=CREATE&name=archipelago&instanceDir=archipelago
	{
	  "responseHeader":{
	    "status":0,
	    "QTime":5344},
	  "core":"archipelago"}
ls -l /var/solr/data/

drwxr-xr-x 4 solr solr 4096 Feb  5 06:52 archipelago
-rw-r----- 1 solr solr 2117 Feb  4 15:59 solr.xml
-rw-r----- 1 solr solr  975 Feb  4 15:59 zoo.cfg

ls -l /var/solr/data/archipelago/

drwxr-xr-x 2 solr solr 4096 Dec 13 19:05 conf
-rw-rw-r-- 1 solr solr   81 Feb  5 06:52 core.properties
drwxrwxr-x 6 solr solr 4096 Feb  5 06:52 data

ls -l /var/solr/data/archipelago/data/

drwxrwxr-x 2 solr solr 4096 Feb  5 06:52 analyzingInfixSuggesterIndexDir
drwxrwxr-x 2 solr solr 4096 Feb  5 06:52 index
drwxrwxr-x 2 solr solr 4096 Feb  5 06:52 snapshot_metadata
drwxrwxr-x 2 solr solr 4096 Feb  5 06:52 tlog

ls -l /var/solr/data/archipelago/conf/

-rw-r--r-- 1 solr solr  1071 Dec 13 19:05 elevate.xml
-rw-r--r-- 1 solr solr   507 Dec 13 19:05 mapping-ISOLatin1Accent.txt
-rw-r--r-- 1 solr solr   186 Dec 13 19:05 protwords.txt
-rw-r--r-- 1 solr solr   194 Dec 13 19:05 schema_extra_fields.xml
-rw-r--r-- 1 solr solr  2413 Dec 13 19:05 schema_extra_types.xml
-rw-r--r-- 1 solr solr 44821 Dec 13 19:05 schema.xml
-rw-r--r-- 1 solr solr   498 Dec 13 19:05 solrconfig_extra.xml
-rw-r--r-- 1 solr solr  3300 Dec 13 19:05 solrconfig_spellcheck.xml
-rw-r--r-- 1 solr solr 55959 Dec 13 19:05 solrconfig.xml
-rw-r--r-- 1 solr solr   657 Dec 13 19:05 solrcore.properties
-rw-r--r-- 1 solr solr   280 Dec 13 19:05 stopwords.txt
-rw-r--r-- 1 solr solr   213 Dec 13 19:05 synonyms.txt
  • Update conf for search_api_solr:3.x-dev
cd ~
wget https://github.com/esmero/archipelago-aws-demo/archive/master.zip
unzip master.zip
service solr stop
rm /var/solr/data/archipelago/conf/*
cp ~/archipelago-aws-demo-master/solrconfigford8/conf/* /var/solr/data/archipelago/conf/
chown -R solr:solr /var/solr/data/archipelago/conf
service solr start
  • Update conf for search_api_solr:4.1.x
cd ~
wget https://github.com/esmero/archipelago-deployment/archive/f4593d2a6fd2376b60fa56233d1f5cfb142dda99.zip
unzip f4593d2a6fd2376b60fa56233d1f5cfb142dda99.zip
service solr stop
mv /var/solr/data/archipelago/conf ~/solr_conf_3.x
mv archipelago-deployment-f4593d2a6fd2376b60fa56233d1f5cfb142dda99/persistent/solrconfig/conf /var/solr/data/archipelago/
chown -R solr:solr /var/solr/data/archipelago/conf
service solr start
 
 
archipelago/solr_base.txt · Last modified: 2020/07/10 17:28 by giancarlo

Developers: CNR IRCrES IT Office and Library
Giancarlo Birello (giancarlo.birello _@_ ircres.cnr.it) and Anna Perin (anna.perin _@_ ircres.cnr.it)
DigiBess is licensed under: Creative Commons License
Recent changes RSS feed Creative Commons License Valid XHTML 1.0 Valid CSS Driven by DokuWiki
Drupal Garland Theme for Dokuwiki