lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <apa...@elyograg.org>
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
> core.properties" 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:

https://cwiki.apache.org/confluence/display/solr/Taking+Solr+to+Production#TakingSolrtoProduction-RuntheSolrInstallationScript

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

http://zookeeper.apache.org/doc/r3.4.8/zookeeperAdmin.html

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:

--------------------------
#!/bin/sh

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

cd /opt/zookeeper
bin/zkServer.sh $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
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=zoodata
# the port at which the clients will connect
clientPort=2181
#
# Be sure to read the maintenance section of the
# administrator guide before turning on autopurge.
#
# http://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
server.1=zoo1.REDACTED.com:2888:3888
server.2=zoo2.REDACTED.com:2888:3888
server.3=zoo3.REDACTED.com:2888:3888
-------------------------------------

Thanks,
Shawn


Mime
View raw message