SlideShare una empresa de Scribd logo
1 de 18
Drupal, Memcached
and Solr on Windows
           Alessandro Pilotti
              @alexpilotti
          MVP ASP.NET / IIS




   MCSD, MCAD, MCSE, MCDBA, MCT
      Red Hat Certified Engineer
Why Memcached?
 It’s a very popular object caching system
 To speed up web sites by offloading work from the
  DBMS

 Simple key / value store with cache invalidation
 Low CPU usage
 Half client / half server
 Servers are unaware of each other (no sync)
Memcached on Windows
   Memcached supports *nix daemon mode

   Ports for Windows exist
     Most binaries available on the web are old (1.2.x)

   The official git repository contains a Windows compatible branch
     git clone --branch engine-pu https://github.com/memcached/memcached.git
     Currently version 1.6.0 beta

   Older version 1.3.3 available here:
     https://github.com/trondn/memcached.git

   Building Memcached on Windows is not difficult:
     http://trondn.blogspot.de/2010/03/building-memcached-windows.html

   Build x64 version if you need more than 4GB of memory per instance

   Prebuilt binaries:
     http://www.cloudbasesolutions.com/downloads/memcached_x86_1_3_3.zip
     http://www.cloudbasesolutions.com/downloads/memcached_x86_1_6_0_beta1.zip
Installing Memcached on
              Windows
 The best way is to run it as a service
 We can use e.g. Apache Procrun to wrap it
   http://www.apache.org/dist/commons/daemon/binaries/windows
     /

 For security reasons don’t use an account like Administrator
  or System to run it!
 Open the required firewall port(s)
   Default: 11211
 Limit the client IP range as a best practice
 If possible use SASL for authentication
Script 1/2
 Create user:
   net user memcached yourpassword /add
   wmic path Win32_UserAccount where
     Name='memcached' set PasswordExpires=false

 Set service rights
   note: using free Windows 2003 Resource Kit
   ntrights –u memcached +r SeServiceLogonRight
   ntrights –u memcached +r SeBatchLogonRight
Script 2/2
 Create Windows service using Apache Procrun
  prunsrv install memcached --Startup=auto --StartMode=exe
  --StartImage="c:memcachedmemcached.exe"
  ++StartParams=-p;11211;-m;256;-l;127.0.0.1
  --ServiceUser=.memcached --ServicePassword=yourpassword

 For remote host access
   Remove “–l 127.0.0.1”
   Open firewall port
      netsh advfirewall firewall add rule name="memcached" dir=in
       action=allow protocol=TCP localport=11211

 Start service
   net start memcached
Memcached and PHP
 It requires a PECL extension, two are available:
   Memcache
     Win32 binary: http://downloads.php.net/pierre/
   Memcached
     More advanced

 Drupal works with both
Memcached protocol
 Memcache can use an ascii (default) or binary protocol
  (faster)
 Binary protocol supported from version 1.3
 Memcache PECL extension:
   PHP.INI
     memcache.protocol = binary
 Memcached PECL extension:
   Drupal settings.php
     $conf['memcache_options'] = array(
      Memcached::OPT_BINARY_PROTOCOL => TRUE,
     );
Memcached and Drupal 7
 drush @Drupal7 dl memcache
 In “sitesallmodulesmemcachedmemcache.inc”:
    comment //drupal_set_message(t('You must enable the PECL memcached
      or memcache extension to use memcache.inc.'), 'error');

 drush @Drupal7 -y en memcache_admin
 In settings.php
    $conf['cache_backends'][] =
     'sites/all/modules/memcache/memcache.inc';
    $conf['cache_default_class'] = 'MemCacheDrupal';
    $conf['memcache_key_prefix'] = 'drupal7';

 You can now setup separate bins and servers
    Examples: http://drupal.org/node/1131468
Apache Solr
 Open source search platform
   Full text search
   Optimized for high volume web traffic
   Based on Apache Lucene
 Download version 3.5.0 from:
   http://www.apache.org/dyn/closer.cgi/lucene/solr
Solr, Windows and Drupal 7
 Drupal
   drush @Drupal7 dl apachesolr

 Expand the content of “example” in                     “apache-
  solr-3.5.0.zip“ to e.g. c:Solr

 Move c:SolrSolrConf folder to c:SolrConf
   Replace solrconfig.xml and schema.xml and
     protwords.txt with copies from:
      <drupal site>sitesallmodulesapachesolrsolr-conf
        Version 3.x: solrconfig-solr3x.xml schema-solr3x.xml
Create Windows Solr user
 net user solr yourpassword /add
 wmic path Win32_UserAccount where Name='solr'
  set PasswordExpires=false

 ntrights -u solr +r SeServiceLogonRight
 ntrights -u solr +r SeBatchLogonRight
 Set proper folder permissions
   icacls c:solr /inheritance:d /grant solr:(OI)(CI)(F)
    /remove Users
Create Windows service
 Download and install Java JRE 7
      http://www.oracle.com/technetwork/java/javase/downloads/index.html

 Using Apache Procrun x64:
 prunsrv install solr --Startup=auto --StartMode=jvm ++JvmOptions=-
   Dsolr.solr.home=C:/solr/;-Djetty.home=C:/solr/;-Djetty.logs=C:/solr/logs/ -
   -ServiceUser=.solr –ServicePassword=yourpassword --
   Classpath=C:/solr/lib/*.jar;C:/solr/start.jar --
   StartClass=org.mortbay.start.Main

 Start service
      Net start solr

 Open firewall port if remote access is required
      netsh advfirewall firewall add rule name="solr" dir=in action=allow protocol=TCP
       localport=8983
Setup Drupal 7 Solr search
 Enable solr search module:
   drush @drupal7 en –y apachesolr_search
 http://yourdrupalsite/admin/config/search/settings
   Set Apache Solr Search as the only active search module
   Set Apache Solr Search as the default search module
 http://drupal7/admin/config/search/apachesolr/settings
   Set your Solr url, e.g.: http://solrserver:8983/solr
Autocommit maxTime
 Default settings is 120s
 In Drupal, this means that after your data changes are
    received by Solr, your search results will not be
    updated for 2 minutes

 To have a shorter delay (e.g. 20s) change maxTime in
    solrconfig.xml (in ms):

       <maxTime>20000</maxTime>
Drupal cron
 Drupal sends data to Solr for indexing using cron
   This might provide big delays between data changes
 Download elysia_cron module
   drush @drupal7 dl elysia_cron
   drush @drupal7 en elysia_cron –y
 Set cron scheduling as:
   Never / Use external crontab
 Set apachesolr_cron settings to (e.g. every 2’)
   */2 * * * *
“crontab” on Windows
 Windows uses scheduled tasks instead of crontab
 To create a scheduled task for Drupal elysia_cron to run e.g. every
   2’:

 schtasks.exe /create /tn drupal7_cron /tr "wget -O - -q -t 1
   http://drupal7/sites/all/modules/elysia_cron/cron.php?cron_ke
   y=yourcronkey" /sc MINUTE /mo 2 /ru solr /rp
    put wget.exe in the path
    Get your cron key from:
          http://yourdrupalsite/admin/config/system/cron/settings

 To run the task once (troubleshooting, etc):
   schtasks.exe /run /tn drupal7_cron
 To delete the task:
   schtasks.exe /delete /tn drupal7_cron
Drush integration

 drush @drupal7 solr-search something
 drush @drupal7 solr-index
 drush @drupal7 solr-reindex
 drush @drupal7 solr-delete-index

Más contenido relacionado

La actualidad más candente

linux-commandline-magic-Joomla-World-Conference-2014
linux-commandline-magic-Joomla-World-Conference-2014linux-commandline-magic-Joomla-World-Conference-2014
linux-commandline-magic-Joomla-World-Conference-2014Peter Martin
 
Bpug mcollective 20140624
Bpug mcollective 20140624Bpug mcollective 20140624
Bpug mcollective 20140624Johan De Wit
 
PuppetConf 2016: Puppet 4.x: The Low WAT-tage Edition – Nick Fagerlund, Puppet
PuppetConf 2016: Puppet 4.x: The Low WAT-tage Edition – Nick Fagerlund, PuppetPuppetConf 2016: Puppet 4.x: The Low WAT-tage Edition – Nick Fagerlund, Puppet
PuppetConf 2016: Puppet 4.x: The Low WAT-tage Edition – Nick Fagerlund, PuppetPuppet
 
Privileges Escalation by Exploiting Client-Side Vulnerabilities Using Metasploit
Privileges Escalation by Exploiting Client-Side Vulnerabilities Using MetasploitPrivileges Escalation by Exploiting Client-Side Vulnerabilities Using Metasploit
Privileges Escalation by Exploiting Client-Side Vulnerabilities Using MetasploitVishal Kumar
 
Step by step_linux_guide
Step by step_linux_guideStep by step_linux_guide
Step by step_linux_guidevinod31dec
 
Making the secure communication between Server and Client with https protocol
Making the secure communication between Server and Client with https protocolMaking the secure communication between Server and Client with https protocol
Making the secure communication between Server and Client with https protocolArmenuhi Abramyan
 
Auditing System Password Using L0phtcrack
Auditing System Password Using L0phtcrackAuditing System Password Using L0phtcrack
Auditing System Password Using L0phtcrackVishal Kumar
 
Contoh Soal LKS IT Network 2014 Di Palembang Modul 3
Contoh Soal LKS IT Network 2014 Di Palembang Modul 3Contoh Soal LKS IT Network 2014 Di Palembang Modul 3
Contoh Soal LKS IT Network 2014 Di Palembang Modul 3Vanidlesky Onibala
 
Dumping and Cracking SAM Hashes to Extract Plaintext Passwords
Dumping and Cracking SAM Hashes to Extract Plaintext PasswordsDumping and Cracking SAM Hashes to Extract Plaintext Passwords
Dumping and Cracking SAM Hashes to Extract Plaintext PasswordsVishal Kumar
 
55 best linux tips, tricks and command lines
55 best linux tips, tricks and command lines55 best linux tips, tricks and command lines
55 best linux tips, tricks and command linesArif Wahyudi
 

La actualidad más candente (16)

Instalar PENTAHO 5 en CentOS 6
Instalar PENTAHO 5 en CentOS 6Instalar PENTAHO 5 en CentOS 6
Instalar PENTAHO 5 en CentOS 6
 
linux-commandline-magic-Joomla-World-Conference-2014
linux-commandline-magic-Joomla-World-Conference-2014linux-commandline-magic-Joomla-World-Conference-2014
linux-commandline-magic-Joomla-World-Conference-2014
 
Samba tutorial
Samba tutorialSamba tutorial
Samba tutorial
 
Oracle on Solaris
Oracle on SolarisOracle on Solaris
Oracle on Solaris
 
Bpug mcollective 20140624
Bpug mcollective 20140624Bpug mcollective 20140624
Bpug mcollective 20140624
 
PuppetConf 2016: Puppet 4.x: The Low WAT-tage Edition – Nick Fagerlund, Puppet
PuppetConf 2016: Puppet 4.x: The Low WAT-tage Edition – Nick Fagerlund, PuppetPuppetConf 2016: Puppet 4.x: The Low WAT-tage Edition – Nick Fagerlund, Puppet
PuppetConf 2016: Puppet 4.x: The Low WAT-tage Edition – Nick Fagerlund, Puppet
 
Privileges Escalation by Exploiting Client-Side Vulnerabilities Using Metasploit
Privileges Escalation by Exploiting Client-Side Vulnerabilities Using MetasploitPrivileges Escalation by Exploiting Client-Side Vulnerabilities Using Metasploit
Privileges Escalation by Exploiting Client-Side Vulnerabilities Using Metasploit
 
Changes
ChangesChanges
Changes
 
Step by step_linux_guide
Step by step_linux_guideStep by step_linux_guide
Step by step_linux_guide
 
Making the secure communication between Server and Client with https protocol
Making the secure communication between Server and Client with https protocolMaking the secure communication between Server and Client with https protocol
Making the secure communication between Server and Client with https protocol
 
Auditing System Password Using L0phtcrack
Auditing System Password Using L0phtcrackAuditing System Password Using L0phtcrack
Auditing System Password Using L0phtcrack
 
Contoh Soal LKS IT Network 2014 Di Palembang Modul 3
Contoh Soal LKS IT Network 2014 Di Palembang Modul 3Contoh Soal LKS IT Network 2014 Di Palembang Modul 3
Contoh Soal LKS IT Network 2014 Di Palembang Modul 3
 
Dumping and Cracking SAM Hashes to Extract Plaintext Passwords
Dumping and Cracking SAM Hashes to Extract Plaintext PasswordsDumping and Cracking SAM Hashes to Extract Plaintext Passwords
Dumping and Cracking SAM Hashes to Extract Plaintext Passwords
 
Refcard en-a4
Refcard en-a4Refcard en-a4
Refcard en-a4
 
55 best linux tips, tricks and command lines
55 best linux tips, tricks and command lines55 best linux tips, tricks and command lines
55 best linux tips, tricks and command lines
 
Wissbi osdc pdf
Wissbi osdc pdfWissbi osdc pdf
Wissbi osdc pdf
 

Destacado

[Srijan Wednesday Webinar] Mastering Drupal 8 Development with Drupal Console
[Srijan Wednesday Webinar] Mastering Drupal 8 Development with Drupal Console[Srijan Wednesday Webinar] Mastering Drupal 8 Development with Drupal Console
[Srijan Wednesday Webinar] Mastering Drupal 8 Development with Drupal ConsoleSrijan Technologies
 
Drupal 6 to Drupal 8 Migration
Drupal 6 to Drupal 8 MigrationDrupal 6 to Drupal 8 Migration
Drupal 6 to Drupal 8 MigrationAmeex Technologies
 
Drush for humans - SANDcamp 2013
Drush for humans - SANDcamp 2013Drush for humans - SANDcamp 2013
Drush for humans - SANDcamp 2013Jon Peck
 
Getting started with Drupal 8
Getting started with Drupal 8Getting started with Drupal 8
Getting started with Drupal 8Hector Iribarne
 
Drush and drupal. администрирование. Волчек Михаил
Drush and drupal. администрирование. Волчек МихаилDrush and drupal. администрирование. Волчек Михаил
Drush and drupal. администрирование. Волчек МихаилPVasili
 
Managing Drupal on Windows with Drush
Managing Drupal on Windows with DrushManaging Drupal on Windows with Drush
Managing Drupal on Windows with DrushAlessandro Pilotti
 
Composer tools and frameworks for drupal.ppt
Composer tools and frameworks for drupal.pptComposer tools and frameworks for drupal.ppt
Composer tools and frameworks for drupal.pptPromet Source
 
Drush Presentation
Drush PresentationDrush Presentation
Drush Presentationperceptum
 
Drush workshop
Drush workshopDrush workshop
Drush workshopJuampy NR
 
Drush installation guide
Drush installation guideDrush installation guide
Drush installation guideThierno Fall
 
Composer Tools & Frameworks for Drupal
Composer Tools & Frameworks for DrupalComposer Tools & Frameworks for Drupal
Composer Tools & Frameworks for DrupalPantheon
 
Xdebug and Drupal8 tests (PhpUnit and Simpletest)
Xdebug and Drupal8 tests (PhpUnit and Simpletest)Xdebug and Drupal8 tests (PhpUnit and Simpletest)
Xdebug and Drupal8 tests (PhpUnit and Simpletest)Francisco José Seva Mora
 
Depolying Drupal with Git, Drush Make and Capistrano
Depolying Drupal with Git, Drush Make and CapistranoDepolying Drupal with Git, Drush Make and Capistrano
Depolying Drupal with Git, Drush Make and Capistranolibsys
 
Automation testing with Drupal 8
Automation testing with Drupal 8Automation testing with Drupal 8
Automation testing with Drupal 8nagpalprachi
 
Drush - use full power - DrupalCamp Donetsk 2014
Drush - use full power - DrupalCamp Donetsk 2014Drush - use full power - DrupalCamp Donetsk 2014
Drush - use full power - DrupalCamp Donetsk 2014Alex S
 
[drupalday2017] - DevOps: strumenti di automazione per Drupal8
[drupalday2017] - DevOps: strumenti di automazione per Drupal8[drupalday2017] - DevOps: strumenti di automazione per Drupal8
[drupalday2017] - DevOps: strumenti di automazione per Drupal8DrupalDay
 
5 Important Tools for Drupal Development
5 Important Tools for Drupal Development5 Important Tools for Drupal Development
5 Important Tools for Drupal Developmentjcarrig
 

Destacado (17)

[Srijan Wednesday Webinar] Mastering Drupal 8 Development with Drupal Console
[Srijan Wednesday Webinar] Mastering Drupal 8 Development with Drupal Console[Srijan Wednesday Webinar] Mastering Drupal 8 Development with Drupal Console
[Srijan Wednesday Webinar] Mastering Drupal 8 Development with Drupal Console
 
Drupal 6 to Drupal 8 Migration
Drupal 6 to Drupal 8 MigrationDrupal 6 to Drupal 8 Migration
Drupal 6 to Drupal 8 Migration
 
Drush for humans - SANDcamp 2013
Drush for humans - SANDcamp 2013Drush for humans - SANDcamp 2013
Drush for humans - SANDcamp 2013
 
Getting started with Drupal 8
Getting started with Drupal 8Getting started with Drupal 8
Getting started with Drupal 8
 
Drush and drupal. администрирование. Волчек Михаил
Drush and drupal. администрирование. Волчек МихаилDrush and drupal. администрирование. Волчек Михаил
Drush and drupal. администрирование. Волчек Михаил
 
Managing Drupal on Windows with Drush
Managing Drupal on Windows with DrushManaging Drupal on Windows with Drush
Managing Drupal on Windows with Drush
 
Composer tools and frameworks for drupal.ppt
Composer tools and frameworks for drupal.pptComposer tools and frameworks for drupal.ppt
Composer tools and frameworks for drupal.ppt
 
Drush Presentation
Drush PresentationDrush Presentation
Drush Presentation
 
Drush workshop
Drush workshopDrush workshop
Drush workshop
 
Drush installation guide
Drush installation guideDrush installation guide
Drush installation guide
 
Composer Tools & Frameworks for Drupal
Composer Tools & Frameworks for DrupalComposer Tools & Frameworks for Drupal
Composer Tools & Frameworks for Drupal
 
Xdebug and Drupal8 tests (PhpUnit and Simpletest)
Xdebug and Drupal8 tests (PhpUnit and Simpletest)Xdebug and Drupal8 tests (PhpUnit and Simpletest)
Xdebug and Drupal8 tests (PhpUnit and Simpletest)
 
Depolying Drupal with Git, Drush Make and Capistrano
Depolying Drupal with Git, Drush Make and CapistranoDepolying Drupal with Git, Drush Make and Capistrano
Depolying Drupal with Git, Drush Make and Capistrano
 
Automation testing with Drupal 8
Automation testing with Drupal 8Automation testing with Drupal 8
Automation testing with Drupal 8
 
Drush - use full power - DrupalCamp Donetsk 2014
Drush - use full power - DrupalCamp Donetsk 2014Drush - use full power - DrupalCamp Donetsk 2014
Drush - use full power - DrupalCamp Donetsk 2014
 
[drupalday2017] - DevOps: strumenti di automazione per Drupal8
[drupalday2017] - DevOps: strumenti di automazione per Drupal8[drupalday2017] - DevOps: strumenti di automazione per Drupal8
[drupalday2017] - DevOps: strumenti di automazione per Drupal8
 
5 Important Tools for Drupal Development
5 Important Tools for Drupal Development5 Important Tools for Drupal Development
5 Important Tools for Drupal Development
 

Similar a Drupal, Memcached and Solr on Windows

Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016Ben Hall
 
TrinityCore server install guide
TrinityCore server install guideTrinityCore server install guide
TrinityCore server install guideSeungmin Shin
 
Install websphere message broker 8 RHEL 6 64 bits
Install websphere message broker 8 RHEL 6 64 bitsInstall websphere message broker 8 RHEL 6 64 bits
Install websphere message broker 8 RHEL 6 64 bitsManuel Vega
 
How to create a secured cloudera cluster
How to create a secured cloudera clusterHow to create a secured cloudera cluster
How to create a secured cloudera clusterTiago Simões
 
Mitre Attack - Credential Dumping - updated.pptx
Mitre Attack - Credential Dumping - updated.pptxMitre Attack - Credential Dumping - updated.pptx
Mitre Attack - Credential Dumping - updated.pptxwaizuq
 
SQL Server Exploitation, Escalation, Pilfering - AppSec USA 2012
SQL Server Exploitation, Escalation, Pilfering - AppSec USA 2012SQL Server Exploitation, Escalation, Pilfering - AppSec USA 2012
SQL Server Exploitation, Escalation, Pilfering - AppSec USA 2012Scott Sutherland
 
Lab Manual Managed Database Basics
Lab Manual Managed Database BasicsLab Manual Managed Database Basics
Lab Manual Managed Database BasicsAmazon Web Services
 
Artem Zhurbila - docker clusters (solit 2015)
Artem Zhurbila - docker clusters (solit 2015)Artem Zhurbila - docker clusters (solit 2015)
Artem Zhurbila - docker clusters (solit 2015)Artem Zhurbila
 
Building a Gateway Server
Building a Gateway ServerBuilding a Gateway Server
Building a Gateway ServerDashamir Hoxha
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker皓鈞 張
 
Docker security
Docker securityDocker security
Docker securityJanos Suto
 
Install and configure linux
Install and configure linuxInstall and configure linux
Install and configure linuxVicent Selfa
 
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
[Devconf.cz][2017] Understanding OpenShift Security Context ConstraintsAlessandro Arrichiello
 
Prosit google-cloud
Prosit google-cloudProsit google-cloud
Prosit google-cloudUC Davis
 
CCCEU15 run cloudstack in docker
CCCEU15 run cloudstack in dockerCCCEU15 run cloudstack in docker
CCCEU15 run cloudstack in dockerPierre-Luc Dion
 
CloudStack Collab Conference 2015 Run CloudStack in Docker
CloudStack Collab Conference 2015 Run CloudStack in DockerCloudStack Collab Conference 2015 Run CloudStack in Docker
CloudStack Collab Conference 2015 Run CloudStack in DockerCloudOps2005
 
Docker Security Paradigm
Docker Security ParadigmDocker Security Paradigm
Docker Security ParadigmAnis LARGUEM
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionBen Hall
 

Similar a Drupal, Memcached and Solr on Windows (20)

Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016
 
TrinityCore server install guide
TrinityCore server install guideTrinityCore server install guide
TrinityCore server install guide
 
Install websphere message broker 8 RHEL 6 64 bits
Install websphere message broker 8 RHEL 6 64 bitsInstall websphere message broker 8 RHEL 6 64 bits
Install websphere message broker 8 RHEL 6 64 bits
 
How to create a secured cloudera cluster
How to create a secured cloudera clusterHow to create a secured cloudera cluster
How to create a secured cloudera cluster
 
Mitre Attack - Credential Dumping - updated.pptx
Mitre Attack - Credential Dumping - updated.pptxMitre Attack - Credential Dumping - updated.pptx
Mitre Attack - Credential Dumping - updated.pptx
 
SQL Server Exploitation, Escalation, Pilfering - AppSec USA 2012
SQL Server Exploitation, Escalation, Pilfering - AppSec USA 2012SQL Server Exploitation, Escalation, Pilfering - AppSec USA 2012
SQL Server Exploitation, Escalation, Pilfering - AppSec USA 2012
 
Lab Manual Managed Database Basics
Lab Manual Managed Database BasicsLab Manual Managed Database Basics
Lab Manual Managed Database Basics
 
Artem Zhurbila - docker clusters (solit 2015)
Artem Zhurbila - docker clusters (solit 2015)Artem Zhurbila - docker clusters (solit 2015)
Artem Zhurbila - docker clusters (solit 2015)
 
Building a Gateway Server
Building a Gateway ServerBuilding a Gateway Server
Building a Gateway Server
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Docker security
Docker securityDocker security
Docker security
 
Install and configure linux
Install and configure linuxInstall and configure linux
Install and configure linux
 
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
 
Prosit google-cloud
Prosit google-cloudProsit google-cloud
Prosit google-cloud
 
CCCEU15 run cloudstack in docker
CCCEU15 run cloudstack in dockerCCCEU15 run cloudstack in docker
CCCEU15 run cloudstack in docker
 
CloudStack Collab Conference 2015 Run CloudStack in Docker
CloudStack Collab Conference 2015 Run CloudStack in DockerCloudStack Collab Conference 2015 Run CloudStack in Docker
CloudStack Collab Conference 2015 Run CloudStack in Docker
 
Docker Security Paradigm
Docker Security ParadigmDocker Security Paradigm
Docker Security Paradigm
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and Production
 
TO Hack an ASP .NET website?
TO Hack an ASP .NET website?  TO Hack an ASP .NET website?
TO Hack an ASP .NET website?
 
One-Man Ops
One-Man OpsOne-Man Ops
One-Man Ops
 

Más de Alessandro Pilotti

OpenStack and Windows - What's new in Ocata
OpenStack and Windows - What's new in OcataOpenStack and Windows - What's new in Ocata
OpenStack and Windows - What's new in OcataAlessandro Pilotti
 
Strategies for migrating workloads from VMware to OpenStack
Strategies for migrating workloads from VMware to OpenStackStrategies for migrating workloads from VMware to OpenStack
Strategies for migrating workloads from VMware to OpenStackAlessandro Pilotti
 
OpenStack + Nano Server + Hyper-V + S2D
OpenStack + Nano Server + Hyper-V + S2DOpenStack + Nano Server + Hyper-V + S2D
OpenStack + Nano Server + Hyper-V + S2DAlessandro Pilotti
 
Building a Microsoft cloud with open technologies
Building a Microsoft cloud with open technologiesBuilding a Microsoft cloud with open technologies
Building a Microsoft cloud with open technologiesAlessandro Pilotti
 
OpenStack Summit 2013 Hong Kong - OpenStack and Windows
OpenStack Summit 2013 Hong Kong - OpenStack and WindowsOpenStack Summit 2013 Hong Kong - OpenStack and Windows
OpenStack Summit 2013 Hong Kong - OpenStack and WindowsAlessandro Pilotti
 
Interoperable OpenStack guest provisioning with Cloudbase-Init
Interoperable OpenStack guest provisioning with Cloudbase-InitInteroperable OpenStack guest provisioning with Cloudbase-Init
Interoperable OpenStack guest provisioning with Cloudbase-InitAlessandro Pilotti
 
An HTML5 client to connect to the Hyper-V console
An HTML5 client to connect to the Hyper-V consoleAn HTML5 client to connect to the Hyper-V console
An HTML5 client to connect to the Hyper-V consoleAlessandro Pilotti
 
Hyper-V OpenStack Nova Compute
Hyper-V OpenStack Nova ComputeHyper-V OpenStack Nova Compute
Hyper-V OpenStack Nova ComputeAlessandro Pilotti
 
PHP and FastCGI Performance Optimizations
PHP and FastCGI Performance OptimizationsPHP and FastCGI Performance Optimizations
PHP and FastCGI Performance OptimizationsAlessandro Pilotti
 
Building drupal web farms with IIS - part 1
Building drupal web farms with IIS - part 1Building drupal web farms with IIS - part 1
Building drupal web farms with IIS - part 1Alessandro Pilotti
 
Building modern web sites with ASP .Net Web API, WebSockets and RSignal
Building modern web sites with ASP .Net Web API, WebSockets and RSignalBuilding modern web sites with ASP .Net Web API, WebSockets and RSignal
Building modern web sites with ASP .Net Web API, WebSockets and RSignalAlessandro Pilotti
 

Más de Alessandro Pilotti (14)

OpenStack and Windows - What's new in Ocata
OpenStack and Windows - What's new in OcataOpenStack and Windows - What's new in Ocata
OpenStack and Windows - What's new in Ocata
 
Strategies for migrating workloads from VMware to OpenStack
Strategies for migrating workloads from VMware to OpenStackStrategies for migrating workloads from VMware to OpenStack
Strategies for migrating workloads from VMware to OpenStack
 
Puppet + Windows Nano Server
Puppet + Windows Nano ServerPuppet + Windows Nano Server
Puppet + Windows Nano Server
 
OpenStack + Nano Server + Hyper-V + S2D
OpenStack + Nano Server + Hyper-V + S2DOpenStack + Nano Server + Hyper-V + S2D
OpenStack + Nano Server + Hyper-V + S2D
 
Building a Microsoft cloud with open technologies
Building a Microsoft cloud with open technologiesBuilding a Microsoft cloud with open technologies
Building a Microsoft cloud with open technologies
 
OpenStack Summit 2013 Hong Kong - OpenStack and Windows
OpenStack Summit 2013 Hong Kong - OpenStack and WindowsOpenStack Summit 2013 Hong Kong - OpenStack and Windows
OpenStack Summit 2013 Hong Kong - OpenStack and Windows
 
Interoperable OpenStack guest provisioning with Cloudbase-Init
Interoperable OpenStack guest provisioning with Cloudbase-InitInteroperable OpenStack guest provisioning with Cloudbase-Init
Interoperable OpenStack guest provisioning with Cloudbase-Init
 
OpenStack and Windows
OpenStack and WindowsOpenStack and Windows
OpenStack and Windows
 
An HTML5 client to connect to the Hyper-V console
An HTML5 client to connect to the Hyper-V consoleAn HTML5 client to connect to the Hyper-V console
An HTML5 client to connect to the Hyper-V console
 
Hyper-V OpenStack Nova Compute
Hyper-V OpenStack Nova ComputeHyper-V OpenStack Nova Compute
Hyper-V OpenStack Nova Compute
 
PHP and FastCGI Performance Optimizations
PHP and FastCGI Performance OptimizationsPHP and FastCGI Performance Optimizations
PHP and FastCGI Performance Optimizations
 
Building drupal web farms with IIS - part 1
Building drupal web farms with IIS - part 1Building drupal web farms with IIS - part 1
Building drupal web farms with IIS - part 1
 
Windows Loves drupal
Windows Loves drupalWindows Loves drupal
Windows Loves drupal
 
Building modern web sites with ASP .Net Web API, WebSockets and RSignal
Building modern web sites with ASP .Net Web API, WebSockets and RSignalBuilding modern web sites with ASP .Net Web API, WebSockets and RSignal
Building modern web sites with ASP .Net Web API, WebSockets and RSignal
 

Último

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 

Último (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

Drupal, Memcached and Solr on Windows

  • 1. Drupal, Memcached and Solr on Windows Alessandro Pilotti @alexpilotti MVP ASP.NET / IIS MCSD, MCAD, MCSE, MCDBA, MCT Red Hat Certified Engineer
  • 2. Why Memcached?  It’s a very popular object caching system  To speed up web sites by offloading work from the DBMS  Simple key / value store with cache invalidation  Low CPU usage  Half client / half server  Servers are unaware of each other (no sync)
  • 3. Memcached on Windows  Memcached supports *nix daemon mode  Ports for Windows exist  Most binaries available on the web are old (1.2.x)  The official git repository contains a Windows compatible branch  git clone --branch engine-pu https://github.com/memcached/memcached.git  Currently version 1.6.0 beta  Older version 1.3.3 available here:  https://github.com/trondn/memcached.git  Building Memcached on Windows is not difficult:  http://trondn.blogspot.de/2010/03/building-memcached-windows.html  Build x64 version if you need more than 4GB of memory per instance  Prebuilt binaries:  http://www.cloudbasesolutions.com/downloads/memcached_x86_1_3_3.zip  http://www.cloudbasesolutions.com/downloads/memcached_x86_1_6_0_beta1.zip
  • 4. Installing Memcached on Windows  The best way is to run it as a service  We can use e.g. Apache Procrun to wrap it  http://www.apache.org/dist/commons/daemon/binaries/windows /  For security reasons don’t use an account like Administrator or System to run it!  Open the required firewall port(s)  Default: 11211  Limit the client IP range as a best practice  If possible use SASL for authentication
  • 5. Script 1/2  Create user:  net user memcached yourpassword /add  wmic path Win32_UserAccount where Name='memcached' set PasswordExpires=false  Set service rights  note: using free Windows 2003 Resource Kit  ntrights –u memcached +r SeServiceLogonRight  ntrights –u memcached +r SeBatchLogonRight
  • 6. Script 2/2  Create Windows service using Apache Procrun prunsrv install memcached --Startup=auto --StartMode=exe --StartImage="c:memcachedmemcached.exe" ++StartParams=-p;11211;-m;256;-l;127.0.0.1 --ServiceUser=.memcached --ServicePassword=yourpassword  For remote host access  Remove “–l 127.0.0.1”  Open firewall port  netsh advfirewall firewall add rule name="memcached" dir=in action=allow protocol=TCP localport=11211  Start service  net start memcached
  • 7. Memcached and PHP  It requires a PECL extension, two are available:  Memcache  Win32 binary: http://downloads.php.net/pierre/  Memcached  More advanced  Drupal works with both
  • 8. Memcached protocol  Memcache can use an ascii (default) or binary protocol (faster)  Binary protocol supported from version 1.3  Memcache PECL extension:  PHP.INI  memcache.protocol = binary  Memcached PECL extension:  Drupal settings.php $conf['memcache_options'] = array( Memcached::OPT_BINARY_PROTOCOL => TRUE, );
  • 9. Memcached and Drupal 7  drush @Drupal7 dl memcache  In “sitesallmodulesmemcachedmemcache.inc”:  comment //drupal_set_message(t('You must enable the PECL memcached or memcache extension to use memcache.inc.'), 'error');  drush @Drupal7 -y en memcache_admin  In settings.php  $conf['cache_backends'][] = 'sites/all/modules/memcache/memcache.inc';  $conf['cache_default_class'] = 'MemCacheDrupal';  $conf['memcache_key_prefix'] = 'drupal7';  You can now setup separate bins and servers  Examples: http://drupal.org/node/1131468
  • 10. Apache Solr  Open source search platform  Full text search  Optimized for high volume web traffic  Based on Apache Lucene  Download version 3.5.0 from:  http://www.apache.org/dyn/closer.cgi/lucene/solr
  • 11. Solr, Windows and Drupal 7  Drupal  drush @Drupal7 dl apachesolr  Expand the content of “example” in “apache- solr-3.5.0.zip“ to e.g. c:Solr  Move c:SolrSolrConf folder to c:SolrConf  Replace solrconfig.xml and schema.xml and protwords.txt with copies from:  <drupal site>sitesallmodulesapachesolrsolr-conf  Version 3.x: solrconfig-solr3x.xml schema-solr3x.xml
  • 12. Create Windows Solr user  net user solr yourpassword /add  wmic path Win32_UserAccount where Name='solr' set PasswordExpires=false  ntrights -u solr +r SeServiceLogonRight  ntrights -u solr +r SeBatchLogonRight  Set proper folder permissions  icacls c:solr /inheritance:d /grant solr:(OI)(CI)(F) /remove Users
  • 13. Create Windows service  Download and install Java JRE 7  http://www.oracle.com/technetwork/java/javase/downloads/index.html  Using Apache Procrun x64:  prunsrv install solr --Startup=auto --StartMode=jvm ++JvmOptions=- Dsolr.solr.home=C:/solr/;-Djetty.home=C:/solr/;-Djetty.logs=C:/solr/logs/ - -ServiceUser=.solr –ServicePassword=yourpassword -- Classpath=C:/solr/lib/*.jar;C:/solr/start.jar -- StartClass=org.mortbay.start.Main  Start service  Net start solr  Open firewall port if remote access is required  netsh advfirewall firewall add rule name="solr" dir=in action=allow protocol=TCP localport=8983
  • 14. Setup Drupal 7 Solr search  Enable solr search module:  drush @drupal7 en –y apachesolr_search  http://yourdrupalsite/admin/config/search/settings  Set Apache Solr Search as the only active search module  Set Apache Solr Search as the default search module  http://drupal7/admin/config/search/apachesolr/settings  Set your Solr url, e.g.: http://solrserver:8983/solr
  • 15. Autocommit maxTime  Default settings is 120s  In Drupal, this means that after your data changes are received by Solr, your search results will not be updated for 2 minutes  To have a shorter delay (e.g. 20s) change maxTime in solrconfig.xml (in ms):  <maxTime>20000</maxTime>
  • 16. Drupal cron  Drupal sends data to Solr for indexing using cron  This might provide big delays between data changes  Download elysia_cron module  drush @drupal7 dl elysia_cron  drush @drupal7 en elysia_cron –y  Set cron scheduling as:  Never / Use external crontab  Set apachesolr_cron settings to (e.g. every 2’)  */2 * * * *
  • 17. “crontab” on Windows  Windows uses scheduled tasks instead of crontab  To create a scheduled task for Drupal elysia_cron to run e.g. every 2’:  schtasks.exe /create /tn drupal7_cron /tr "wget -O - -q -t 1 http://drupal7/sites/all/modules/elysia_cron/cron.php?cron_ke y=yourcronkey" /sc MINUTE /mo 2 /ru solr /rp  put wget.exe in the path  Get your cron key from:  http://yourdrupalsite/admin/config/system/cron/settings  To run the task once (troubleshooting, etc):  schtasks.exe /run /tn drupal7_cron  To delete the task:  schtasks.exe /delete /tn drupal7_cron
  • 18. Drush integration  drush @drupal7 solr-search something  drush @drupal7 solr-index  drush @drupal7 solr-reindex  drush @drupal7 solr-delete-index