How to Install Apache Solr on Ubuntu 16.04

  1. Supports different file formats like XML, JSON and .CSV.
  2. Can be deployed in any kind of systems such as standalone, distributed, and cloud.
  3. Allows customization of components easily.
  4. Provides a user-friendly, and feature powered web interface that can be used to manage logs, add, delete, update and search documents.
  5. Provides advanced text search capabilities including phrases, wildcards, joins, grouping and much more across any data type.

Prerequisites

  1. A fresh Alibaba cloud instance with Ubuntu 16.04 server installed.
  2. A static IP address 192.168.0.103 is configured on the instance.
  3. A root password is setup on the server.

Launch an Alibaba Cloud ECS Instance

apt-get update -y

Install Java

apt-get install python-software-properties -y
add-apt-repository ppa:webupd8team/java
apt-get update -y
apt-get install oracle-java8-installer -y
java -version
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)

Install Apache Solr

cd /opt/
wget http://redrockdigimark.com/apachemirror/lucene/solr/7.3.1/solr-7.3.1.tgz
tar xzf solr-7.3.1.tgz solr-7.3.1/bin/install_solr_service.sh --strip-components=2
./install_solr_service.sh solr-7.3.1.tgz
Service solr installed.
Customize Solr startup configuration in /etc/default/solr.in.sh
● solr.service - LSB: Controls Apache Solr as a Service
Loaded: loaded (/etc/init.d/solr; bad; vendor preset: enabled)
Active: active (exited) since Sun 2018-05-20 07:37:04 IST; 5s ago
Docs: man:systemd-sysv-generator(8)
service solr status
solr.service - LSB: Controls Apache Solr as a Service
Loaded: loaded (/etc/init.d/solr; bad; vendor preset: enabled)
Active: activating (start) since Thu 2018-05-24 21:22:20 IST; 49s ago
Docs: man:systemd-sysv-generator(8)
└─569 /bin/sh /etc/init.d/solr start

Create Your First Solr Collection

cd /opt
solr -c "/opt/solr/bin/solr create -c letsstarted -n data_driven_schema_configs"
Created new core 'letsstarted'

Access Solr Web Interface

{
"id": 1,
"book_title": "Linux Cookbook",
"published": 2018,
"description": "All about Linux"
}
Status: success
Response:
"status": 0,
"QTime": 1611

Related Alibaba Cloud Products

--

--

--

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Notion Tips For Self-reflection Process

Practices of Kubernetes Multi-tenant Clusters

Alibaba Cloud Elasticsearch: Lifecycle Management for Index Data

Cloud-Based Practices for Spring Cloud Applications in Kubernetes: Development

Effortlessly Pulling Ethereum Block Data into Azure Machine Learning

Learn Just Enough Dart For Flutter: Part 3

Setting Up a Server Cluster for Enterprise Web Apps — Part 3

What’s New in Redis 4.0?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com

More from Medium

Elasticsearch Workshop #1: enrich documents

How to setup Simple Hadoop Cluster on Docker

depiction of Hadoop cluster with datanodes and the namenode

Apache AirFlow: Introduction and Installation

Apache Kafka for beginners