SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

Tendances (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
 

En vedette

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
琛琳 饶
 

En vedette (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
 

Similaire à Elastic search

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

Similaire à 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
 

Dernier

AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 

Dernier (20)

AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 

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