lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <>
Subject Re: How to save index data to other place? [scottchu]
Date Fri, 27 May 2016 07:13:59 GMT
On 5/26/2016 8:51 PM, scott.chu wrote:
> I want to migrate my Solrcloud from Windows to CentOS. Because I am
> new to CentOS, not familiar with how to install Solr on it and I did a
> lot of config in my Solrcloud on Windows, so I use ftp to upload
> solr-5.4.1 and zookeeper-3.4.6 folders to 3 different servers running
> CentOS. (They are all under /local). Then I tweak something in 3rd
> machine (See my other post titled "Can "Using cp replica and modifying
>" rather than ADDREPLICA API work?") and make my
> Solrcloud run with 3 replicas ok. I do wish to follow the default
> folder/file convention of solr. So can you show me (or hint me) how
> to: * Install solr and zookeeper with install shell script under
> CentOS 6.4? * How to auto start solr and zookeeper under CentOS 6.4? 

Installing Solr:

Zookeeper is a completely separate project from Solr.  For best results,
you should consult their documentation:

I can give you some quick install steps based on what I have done in the
past.  I have no idea whether this is how the zookeeper project would
recommend doing it, but if it's done correctly, I know that it works.

Extract the download tarball into some location, like /opt.  If you
choose that location and extract the latest version, you will have
/opt/zookeeper-3.4.8 to work with.  The rest of this assumes that
directory location.  You may need to adjust these steps if you choose
another location:

Create a shell script named /usr/local/sbin/zkrun with these contents:


# chkconfig: - 75 50
# description: Starts and stops Zookeeper

cd /opt/zookeeper
bin/ $1

Change to the /opt directory and do these commands:

ln -s zookeeper-3.4.8 zookeeper
chmod +x /usr/local/sbin/zkrun
ln -s /usr/local/sbin/zkrun /etc/init.d/zookeeper
chkconfig --add zookeeper
chkconfig zookeeper on

Consult zookeeper documentation on how to configure the newly installed
server -- which consists of creating /opt/zookeeper/conf/zoo.cfg and
${dataDir}/myid  A common setting for the dataDir config parameter is
"zoodata".  This is a path that is relative to the current working
directory.  If you use my little startup script with that value, the
full path becomes opt/zookeeper/zoodata.  Once it's configured, you can
start the zookeeper service.  This is a slightly redacted copy of my
zookeeper config file:

# The number of milliseconds of each tick
# The number of ticks that the initial
# synchronization phase can take
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.
# the port at which the clients will connect
# Be sure to read the maintenance section of the
# administrator guide before turning on autopurge.
# The number of snapshots to retain in dataDir
# Purge task interval in hours
# Set to "0" to disable auto purge feature


View raw message