Last active
August 8, 2018 05:45
-
-
Save radheymkumar/637fdb74b7551970dd5403e0be22196c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Solr Server setup | |
----------------------------------------------------------------------------- | |
Use below link as a reference | |
https://www.webfoobar.com/node/16 | |
https://valuebound.com/resources/blog/installing-configuring-apache-solr-520-with-drupal-7-using-search-api-ubuntu-1404 | |
1. If Java is not installed, check the available versions of Java and install it: | |
yum list available java* | |
yum install java-1.8.0-openjdk.x86_64 | |
----------------------------------------------- | |
2. Then verify if it is already installed: | |
which java | |
java -version | |
------------------------------------------------ | |
3. Set the default Java version to the latest using below command. | |
sudo alternatives --config java | |
------------------------------------------------ | |
4. Solr require system user named "solr" and we will create one: | |
adduser solr | |
--------------------------------------------------- | |
5. Download and setup Solr server: | |
a) Goto directory | |
b) download | |
c) unzip the folder. | |
d) Copy install_solr_service.sh into opt directory | |
e) Remove folder | |
f) unzip the folder using sh file. | |
cd /opt | |
sudo curl -O http://www-us.apache.org/dist/lucene/solr/5.5.0/solr-5.5.0.tgz | |
tar zxvf solr-5.5.0.tgz | |
sudo cp /opt/solr-5.5.0/bin/install_solr_service.sh . | |
sudo rm -rf solr-5.5.0 | |
sudo ./install_solr_service.sh solr-5.5.0.tgz | |
a) add user to auto start solr server. | |
sudo chkconfig --add solr | |
chkconfig | grep solr | |
------------------------------------------------------ | |
Solr succesfully installed | |
####################################### | |
configure solr for drupal | |
####################################### | |
1. Goto below directory | |
cd /opt/solr/server/solr | |
---------------------------------- | |
2. Create new directory | |
sudo mkdir -p rwjf/conf | |
------------------------------------- | |
NOTE: Fix the apache solr issue default config files for solr 5.x | |
3. Copy these files into below directory and replace the files. | |
sudo cp solr-conf/5.x/* to /opt/solr/server/solr/rwjf/conf | |
Replace ISOLatin1Accent.txt from configset example folder. | |
Node:- We have created a folder on the root with name "solr-drupal" to copy this files into directory with resolve above issue. | |
sudo cp drupal-direcoty to /opt/solr/server/solr/rwjf/conf | |
Use below command | |
sudo cp -r /var/www/html/solr-drupal/conf/* /opt/solr/server/solr/rwjf/conf | |
----------------------------------------------- | |
4. Restart Solr server | |
sudo /opt/solr/bin/solr restart | |
Note:-If unable to start server then use this command:- kill -9 PID | |
---------------------------------------------- | |
5.Create Coreadmin for drupal | |
sudo bin/solr create -c rwjf -d server/solr/rwjf | |
# Setup server/etc/jetty.xml for security | |
-------------------------------------------------- | |
<!-- here begins ip securing --> | |
<New class="org.eclipse.jetty.server.handler.IPAccessHandler"> | |
<Call name="addWhite"> | |
<!-- list of args with ip-addresses --> | |
<Arg>127.0.0.1</Arg> | |
</Call> | |
<Set name="handler"> | |
<New id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/> | |
</Set> | |
</New> | |
<!-- end of securing --> | |
Solr configuration in settings file | |
1. Staging Server | |
$conf['search_api_solr_overrides'] = array( | |
'default_solr' => array( | |
'name' => t('Default Solr (Overridden)'), | |
'options' => array( | |
'host' => '127.0.0.1', | |
'port' => 8983, | |
'path' => '/solr/rwjf', | |
), | |
), | |
); | |
2. Development server | |
$conf['search_api_solr_overrides'] = array( | |
'default_solr' => array( | |
'name' => t('Default Solr (Overridden)'), | |
'options' => array( | |
'host' => '127.0.0.1', | |
'port' => 8983, | |
'path' => '/solr/drupal', | |
), | |
), | |
); | |
How to setup Varnish, Memcache and APC on server | |
https://gist.github.com/danpette/a4f9cd207f669f99b882 | |
Solr start command | |
sudo /opt/solr/bin/solr restart | |
-------------------------------------------------------------------------------- | |
2. Memcache Server setup | |
1. First install the memcache in the system | |
yum install memcached | |
2. Added following line in my php.ini | |
extension=memcache.so (if memcache extenstion installed) | |
3. started memcached: | |
service memcached start | |
4. restarted apache | |
service httpd restart | |
5. Install the php extension. There are two extestion available to enable | |
sudo yum install php56-pecl-memcache(Recommended) | |
-------------------------------------------------------------------------------- | |
3. APC setup on server. | |
For php version 5.6 | |
1. install the pecl-apcu on the server using below command. | |
sudo yum install -y php56-pecl-apc | |
2. Add the below line into the php.ini file to enable the extenstion. | |
extension=apc.so | |
3. Restart apache2 | |
sudo service httpd restart | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment