* apt update
* apt install default-jre
* apt-get install wget
* apt install nano
* apt install sudo
* apt install vim
* wget https://archive.apache.org/dist/lucene/solr/8.11.2/solr-8.11.2.tgz
* tar -xzf solr-8.11.2.tgz
* wget https://archive.apache.org/dist/zookeeper/zookeeper-3.4.6/zookeeper-3.4.6.tar.gz
* tar -xzf zookeeper-3.4.6.tar.gz
* cd solr-8.11.2
* bin/solr -e cloud -force
* bin/solr auth enable -type basicAuth -prompt true -z localhost:9983 -blockUnknown true
Here it will ask for admin name and password
Here all, collection-admin-read, config-read, core-admin-read needs to be enabled to give the users only the read access
* Once the role is created, verify the permissions tab to confirm whether new role have necessary permissions
* cd zookeeper-3.4.6/bin
* ./zkServer.sh start /zookeeper-3.4.6/conf/zoo_sample.cfg - to start zookeeper
* ./zkServer.sh status /zookeeper-3.4.6/conf/zoo.cfg - to check status of zookeeper
* ./zkCli.sh -server localhost:2181 - execute this command to get into zookeeper
inside Zookeeper terminal
* ls / - to list
* getAcl / - for listing acl for that directory
* setAcl / world:anyone:r,ip:172.17.0.2:cdwra - for setting the ips
-
Add folder named with myid file and id of zk should be mentioned like 1 or 2 or 3 (this directory location should be given in dataDir= in the file )
# The number of milliseconds of each tick tickTime=2000 # The number of ticks that the initial # synchronization phase can take initLimit=10 # The number of ticks that can pass between # sending a request and getting an acknowledgement syncLimit=5 # the directory where the snapshot is stored. # do not use /tmp for storage, /tmp here is just # example sakes. dataDir=/data # the port at which the clients will connect clientPort=2181 4lw.commands.whitelist=mntr,conf,ruok # the maximum number of client connections. # increase this if you need to handle more clients #maxClientCnxns=60 server.1=172.17.0.6:2888:3888 server.2=172.17.0.4:2889:3889 server.3=172.17.0.5:2899:3899 # Be sure to read the maintenance section of the # administrator guide before turning on autopurge. # # https://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance # # The number of snapshots to retain in dataDir #autopurge.snapRetainCount=3 # Purge task interval in hours # Set to "0" to disable auto purge feature #autopurge.purgeInterval=1 ## Metrics Providers # # https://prometheus.io Metrics Exporter #metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider #metricsProvider.httpHost=0.0.0.0 #metricsProvider.httpPort=7000 #metricsProvider.exportJvmInfo=true
bin/zkServer.sh start
bin/zkServer.sh status
bin/zkServer.sh stop
/solr-8.7.0/bin/solr.in.sh - ZK_HOST="172.17.0.6:2181,172.17.0.4:2181,172.17.0.5:2181" (As per the ip address of the zookeeper machines)
- if not working try killing 2181 with lsof -i:2181 command in zookeeper