SlideShare uma empresa Scribd logo
1 de 20
Setting up Elastic Search on
Ubuntu Server from scratch
By: Rahul Agarwal
Sr. web developer at
Gaadi.com
Overview
● Requirement
● Solution
● Set up server
● Install Apache
● Install PHP,JAVA
● Install Elastic Search server,Composer
● Install Elastic Search PHP API
● Test php scripts with elastic search api
Requirement
● Setting Up Elastic Search on the server.
With PHP and Apache server for front end
connection.
● Setting up on Ubuntu server.
Solution
● Elastic Search configured on any new
ubuntu server.
Set up server
● Configured new server.
● Run “sudo apt-get update" on server.
Install Apache
● Run “sudo apt-get install apache2"
Install PHP
● Run “sudo apt-get install php5 libapache2-
mod-php5"
Restart Server
● Run “sudo service apache2 restart"
Test PHP
● Run “php -r 'echo "nnYour PHP installation
is working fine.nnn";' "
Install Java
● Run “add-apt-repository -y
ppa:webupd8team/java"
● Run "apt-get update"
● Run "apt-get install oracle-java8-installer"
Install ElasticSearch server
● Run “sudo wget -qO -
https://packages.elastic.co/GPG-KEY-
elasticsearch | sudo apt-key add -"
● Run "echo "deb
http://packages.elastic.co/elasticsearch/2.x/
debian stable main" | sudo tee -a
/etc/apt/sources.list.d/elasticsearch-2.x.list"
● Run "sudo apt-get update"
● Run "sudo apt-get -y install elasticsearch"
Install ElasticSearch server
● Run "sudo nano
/etc/elasticsearch/elasticsearch.yml"
● You will want to restrict outside access to
your Elasticsearch instance (port 9200), so
outsiders can't read your data or shutdown
your Elasticsearch cluster through the HTTP
API. Find the line that specifies
network.host, uncomment it, and replace its
value with "localhost" so it looks like this:
● network.host: localhost
Install ElasticSearch server
● Save and exit elasticsearch.yml.
● Run "sudo service elasticsearch restart"
● Then run the following command to start
Elasticsearch on boot up:
● Run “ sudo update-rc.d elasticsearch
defaults 95 10"
Set up Elastic Search PHP files
● Run "cd /var/www/html"
● Upload composer file “composer.json” on the
folder /var/www/html
● Run
● curl -s http://getcomposer.org/installer | php
● php /root/composer.phar install –no-dev
● sudo apt-get install php5-curl
● sudo service apache2 restart
Test Elastic Search
● Run “curl -X GET 'http://localhost:9200' "
Test basic connection files
● Upload insert.php,out.txt,search.php on
/var/www/html folder
● Go to browser and hit insert.php
● Go to browser and hit search.php and search
google
Composer.json
{
"require": {
"elasticsearch/elasticsearch": "~2.0"
}
}
Insert .php
Search . php
Out.txt

Mais conteúdo relacionado

Mais procurados

Mais procurados (18)

Intalacion de owncloud
Intalacion de owncloudIntalacion de owncloud
Intalacion de owncloud
 
Continuous delivery of Windows micro services in the cloud
Continuous delivery of Windows micro services in the cloud Continuous delivery of Windows micro services in the cloud
Continuous delivery of Windows micro services in the cloud
 
How to contribute Apache CloudStack
How to contribute Apache CloudStackHow to contribute Apache CloudStack
How to contribute Apache CloudStack
 
Test Kitchen and Infrastructure as Code
Test Kitchen and Infrastructure as CodeTest Kitchen and Infrastructure as Code
Test Kitchen and Infrastructure as Code
 
uWSGI - Swiss army knife for your Python web apps
uWSGI - Swiss army knife for your Python web appsuWSGI - Swiss army knife for your Python web apps
uWSGI - Swiss army knife for your Python web apps
 
Nginx维护手册
Nginx维护手册Nginx维护手册
Nginx维护手册
 
Oracle WebLogic
Oracle WebLogicOracle WebLogic
Oracle WebLogic
 
Depende, ¿de qué depende? - Plain Concepts Dev Day
Depende, ¿de qué depende? - Plain Concepts Dev Day Depende, ¿de qué depende? - Plain Concepts Dev Day
Depende, ¿de qué depende? - Plain Concepts Dev Day
 
Node.js in a heterogeneous system
Node.js in a heterogeneous systemNode.js in a heterogeneous system
Node.js in a heterogeneous system
 
How install nagios in ubuntu 15.04, 16.04
How install nagios in ubuntu 15.04, 16.04How install nagios in ubuntu 15.04, 16.04
How install nagios in ubuntu 15.04, 16.04
 
How To Deploy A Cloud Based Webserver in 5 minutes - LAMP
How To Deploy A Cloud Based Webserver in 5 minutes - LAMPHow To Deploy A Cloud Based Webserver in 5 minutes - LAMP
How To Deploy A Cloud Based Webserver in 5 minutes - LAMP
 
Infrastructure development on windows ldn cd meetup
Infrastructure development on windows   ldn cd meetup Infrastructure development on windows   ldn cd meetup
Infrastructure development on windows ldn cd meetup
 
Nginx
NginxNginx
Nginx
 
How To Disable IE Enhanced Security Windows PowerShell
How To Disable IE Enhanced Security Windows PowerShellHow To Disable IE Enhanced Security Windows PowerShell
How To Disable IE Enhanced Security Windows PowerShell
 
Ansible Crash Course
Ansible Crash CourseAnsible Crash Course
Ansible Crash Course
 
Installation elasticsearch + kibana
Installation elasticsearch + kibana Installation elasticsearch + kibana
Installation elasticsearch + kibana
 
Commands
CommandsCommands
Commands
 
Nginx3
Nginx3Nginx3
Nginx3
 

Destaque

Logstash: Progetto open per l'analisi dei log in tempo reale di architetture ...
Logstash: Progetto open per l'analisi dei log in tempo reale di architetture ...Logstash: Progetto open per l'analisi dei log in tempo reale di architetture ...
Logstash: Progetto open per l'analisi dei log in tempo reale di architetture ...
Stefano Dindo
 
Amministratori Di Sistema: Adeguamento al Garante Privacy - Log Management e ...
Amministratori Di Sistema: Adeguamento al Garante Privacy - Log Management e ...Amministratori Di Sistema: Adeguamento al Garante Privacy - Log Management e ...
Amministratori Di Sistema: Adeguamento al Garante Privacy - Log Management e ...
Simone Onofri
 
How ElasticSearch lives in my DevOps life
How ElasticSearch lives in my DevOps lifeHow ElasticSearch lives in my DevOps life
How ElasticSearch lives in my DevOps life
琛琳 饶
 

Destaque (20)

(Elastic)search in big data
(Elastic)search in big data(Elastic)search in big data
(Elastic)search in big data
 
quick intro to elastic search
quick intro to elastic search quick intro to elastic search
quick intro to elastic search
 
Elastic search Walkthrough
Elastic search WalkthroughElastic search Walkthrough
Elastic search Walkthrough
 
An Introduction to Elastic Search.
An Introduction to Elastic Search.An Introduction to Elastic Search.
An Introduction to Elastic Search.
 
What I learnt: Elastic search & Kibana : introduction, installtion & configur...
What I learnt: Elastic search & Kibana : introduction, installtion & configur...What I learnt: Elastic search & Kibana : introduction, installtion & configur...
What I learnt: Elastic search & Kibana : introduction, installtion & configur...
 
Introduction to Elasticsearch
Introduction to ElasticsearchIntroduction to Elasticsearch
Introduction to Elasticsearch
 
Elastic Search
Elastic SearchElastic Search
Elastic Search
 
Elastic search & patent information @ mtc
Elastic search & patent information @ mtcElastic search & patent information @ mtc
Elastic search & patent information @ mtc
 
Simple search with elastic search
Simple search with elastic searchSimple search with elastic search
Simple search with elastic search
 
Power of Elastic Search - nLocate
Power of Elastic Search - nLocatePower of Elastic Search - nLocate
Power of Elastic Search - nLocate
 
Ricerche performanti con ElasticSearch sfruttando la potenza e la flessibilit...
Ricerche performanti con ElasticSearch sfruttando la potenza e la flessibilit...Ricerche performanti con ElasticSearch sfruttando la potenza e la flessibilit...
Ricerche performanti con ElasticSearch sfruttando la potenza e la flessibilit...
 
Elk - Elasticsearch Logstash Kibana stack explained
Elk - Elasticsearch Logstash Kibana stack explainedElk - Elasticsearch Logstash Kibana stack explained
Elk - Elasticsearch Logstash Kibana stack explained
 
Elastic Search Indexing Internals
Elastic Search Indexing InternalsElastic Search Indexing Internals
Elastic Search Indexing Internals
 
Logstash: Progetto open per l'analisi dei log in tempo reale di architetture ...
Logstash: Progetto open per l'analisi dei log in tempo reale di architetture ...Logstash: Progetto open per l'analisi dei log in tempo reale di architetture ...
Logstash: Progetto open per l'analisi dei log in tempo reale di architetture ...
 
Webinar usando graylog para la gestión centralizada de logs
Webinar usando graylog para la gestión centralizada de logsWebinar usando graylog para la gestión centralizada de logs
Webinar usando graylog para la gestión centralizada de logs
 
Amministratori Di Sistema: Adeguamento al Garante Privacy - Log Management e ...
Amministratori Di Sistema: Adeguamento al Garante Privacy - Log Management e ...Amministratori Di Sistema: Adeguamento al Garante Privacy - Log Management e ...
Amministratori Di Sistema: Adeguamento al Garante Privacy - Log Management e ...
 
Lucene basics
Lucene basicsLucene basics
Lucene basics
 
Apache Lucene: Searching the Web and Everything Else (Jazoon07)
Apache Lucene: Searching the Web and Everything Else (Jazoon07)Apache Lucene: Searching the Web and Everything Else (Jazoon07)
Apache Lucene: Searching the Web and Everything Else (Jazoon07)
 
How ElasticSearch lives in my DevOps life
How ElasticSearch lives in my DevOps lifeHow ElasticSearch lives in my DevOps life
How ElasticSearch lives in my DevOps life
 
Advanced troubleshooting linux performance
Advanced troubleshooting linux performanceAdvanced troubleshooting linux performance
Advanced troubleshooting linux performance
 

Semelhante a Elastic search

Swift configurator installation-manual
Swift configurator installation-manualSwift configurator installation-manual
Swift configurator installation-manual
Pramod Sharma
 

Semelhante a Elastic search (20)

Nginx as a Revers Proxy for Apache on Ubuntu
Nginx as a Revers Proxy for Apache on UbuntuNginx as a Revers Proxy for Apache on Ubuntu
Nginx as a Revers Proxy for Apache on Ubuntu
 
Making Spinnaker Go @ Stitch Fix
Making Spinnaker Go @ Stitch FixMaking Spinnaker Go @ Stitch Fix
Making Spinnaker Go @ Stitch Fix
 
Nicolas-Embleton - Deploying node.js with forever and nginx
Nicolas-Embleton  - Deploying node.js with forever and nginxNicolas-Embleton  - Deploying node.js with forever and nginx
Nicolas-Embleton - Deploying node.js with forever and nginx
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with Puppet
 
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
 
How to install Setup & Configure SSH Jump Server on a Linux box
How to install Setup & Configure  SSH Jump Server on a Linux boxHow to install Setup & Configure  SSH Jump Server on a Linux box
How to install Setup & Configure SSH Jump Server on a Linux box
 
Ansible is the simplest way to automate. SymfonyCafe, 2015
Ansible is the simplest way to automate. SymfonyCafe, 2015Ansible is the simplest way to automate. SymfonyCafe, 2015
Ansible is the simplest way to automate. SymfonyCafe, 2015
 
Deploying your rails application to a clean ubuntu 10
Deploying your rails application to a clean ubuntu 10Deploying your rails application to a clean ubuntu 10
Deploying your rails application to a clean ubuntu 10
 
Start tracking your ruby infrastructure
Start tracking your ruby infrastructureStart tracking your ruby infrastructure
Start tracking your ruby infrastructure
 
Calico with open stack and chef
Calico with open stack and chefCalico with open stack and chef
Calico with open stack and chef
 
Install and Configure WordPress in AWS on RHEL 7 or CentOS 7
Install and Configure WordPress in AWS on RHEL 7 or CentOS 7Install and Configure WordPress in AWS on RHEL 7 or CentOS 7
Install and Configure WordPress in AWS on RHEL 7 or CentOS 7
 
Using Puppet in Small Infrastructures
Using Puppet in Small InfrastructuresUsing Puppet in Small Infrastructures
Using Puppet in Small Infrastructures
 
Automating complex infrastructures with Puppet
Automating complex infrastructures with PuppetAutomating complex infrastructures with Puppet
Automating complex infrastructures with Puppet
 
Chef solo the beginning
Chef solo the beginning Chef solo the beginning
Chef solo the beginning
 
Installing Lamp Stack on Ubuntu Instance
Installing Lamp Stack on Ubuntu InstanceInstalling Lamp Stack on Ubuntu Instance
Installing Lamp Stack on Ubuntu Instance
 
How to install and configure LEMP stack
How to install and configure LEMP stackHow to install and configure LEMP stack
How to install and configure LEMP stack
 
Swift configurator installation-manual
Swift configurator installation-manualSwift configurator installation-manual
Swift configurator installation-manual
 
Cooking with Chef
Cooking with ChefCooking with Chef
Cooking with Chef
 
Philly security shell meetup
Philly security shell meetupPhilly security shell meetup
Philly security shell meetup
 

Último

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
chumtiyababu
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
AldoGarca30
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
MayuraD1
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
jaanualu31
 

Último (20)

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to Computers
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 

Elastic search

  • 1. Setting up Elastic Search on Ubuntu Server from scratch By: Rahul Agarwal Sr. web developer at Gaadi.com
  • 2. Overview ● Requirement ● Solution ● Set up server ● Install Apache ● Install PHP,JAVA ● Install Elastic Search server,Composer ● Install Elastic Search PHP API ● Test php scripts with elastic search api
  • 3. Requirement ● Setting Up Elastic Search on the server. With PHP and Apache server for front end connection. ● Setting up on Ubuntu server.
  • 4. Solution ● Elastic Search configured on any new ubuntu server.
  • 5. Set up server ● Configured new server. ● Run “sudo apt-get update" on server.
  • 6. Install Apache ● Run “sudo apt-get install apache2"
  • 7. Install PHP ● Run “sudo apt-get install php5 libapache2- mod-php5"
  • 8. Restart Server ● Run “sudo service apache2 restart"
  • 9. Test PHP ● Run “php -r 'echo "nnYour PHP installation is working fine.nnn";' "
  • 10. Install Java ● Run “add-apt-repository -y ppa:webupd8team/java" ● Run "apt-get update" ● Run "apt-get install oracle-java8-installer"
  • 11. Install ElasticSearch server ● Run “sudo wget -qO - https://packages.elastic.co/GPG-KEY- elasticsearch | sudo apt-key add -" ● Run "echo "deb http://packages.elastic.co/elasticsearch/2.x/ debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-2.x.list" ● Run "sudo apt-get update" ● Run "sudo apt-get -y install elasticsearch"
  • 12. Install ElasticSearch server ● Run "sudo nano /etc/elasticsearch/elasticsearch.yml" ● You will want to restrict outside access to your Elasticsearch instance (port 9200), so outsiders can't read your data or shutdown your Elasticsearch cluster through the HTTP API. Find the line that specifies network.host, uncomment it, and replace its value with "localhost" so it looks like this: ● network.host: localhost
  • 13. Install ElasticSearch server ● Save and exit elasticsearch.yml. ● Run "sudo service elasticsearch restart" ● Then run the following command to start Elasticsearch on boot up: ● Run “ sudo update-rc.d elasticsearch defaults 95 10"
  • 14. Set up Elastic Search PHP files ● Run "cd /var/www/html" ● Upload composer file “composer.json” on the folder /var/www/html ● Run ● curl -s http://getcomposer.org/installer | php ● php /root/composer.phar install –no-dev ● sudo apt-get install php5-curl ● sudo service apache2 restart
  • 15. Test Elastic Search ● Run “curl -X GET 'http://localhost:9200' "
  • 16. Test basic connection files ● Upload insert.php,out.txt,search.php on /var/www/html folder ● Go to browser and hit insert.php ● Go to browser and hit search.php and search google