1.在清华开源软件镜像站或者http://www.us.apache.org/dist/

下载Solr的安装包,我下载的是solr-6.5.1.tgz

2.解压并移动到/usr/local目录下

3.安装Solr需要安装Java环境,假设Java环境是安装好的

4.解压solr-6.5.1.tgz目录中的install_solr_service.sh文件

tar zxvf solr-6.5.1.tgz solr-6.5.1/bin/install_solr_service.sh --strip-components=2

5.运行这个脚本,进行安装

sudo bash ./install_solr_service.sh solr-6.5.1.tgz

6.如果安装失败的话,使用下面的命令删除Solr,然后重新安装

sudo service solr stop
sudo rm -r /var/solr
sudo rm -r /opt/solr-6.5.1
sudo rm -r /opt/solr
sudo rm /etc/init.d/solr
sudo deluser --remove-home solr
sudo deluser --group solr

7.安装成功了的话,使用下面的命令来检查 Solr 服务的状态

service solr status

8.solr的管理界面

http://localhost:8983/solr/

9.使用 Solr 用户添加多个集合

sudo su - solr -c "/opt/solr/bin/solr create -c myfirstcollection -n data_driven_schema_configs"

Copying configuration to new core instance directory:
/var/solr/data/myfirstcollection Creating new core 'myfirstcollection' using command:
http://localhost:8983/solr/admin/cores?action=CREATE&name=myfirstcollection&instanceDir=myfirstcollection {
"responseHeader":{
"status":0,
"QTime":2127},
"core":"myfirstcollection"}

10.对应的删除命令

/opt/solr-6.5.1/bin$ solr delete -c myfirstcollection

我们已经成功的为我们的第一个集合创建了新核心实例目录,并可以将数据添加到里面。要查看库中的默认模式文件,可以在这里找到:

cd /opt/solr/server/solr/configsets/data_driven_schema_configs/conf/

10.在web管理界面中点击Core Admin,可以看到我们刚刚创建的集合

11.除了使用命令行来添加集合的方式之外,还有可以在web管理界面中添加集合

方法:Core Admin——Core Selector——Submit Document

    {
"number": 1,
"Name": "George Washington",
"birth_year": 1989,
"Starting_Job": 2002,
"End_Job": "2009-04-30",
"Qualification": "Graduation",
"skills": "Linux and Virtualization"
}

Ubuntu下安装Solr的更多相关文章

  1. 在Ubuntu下安装Solr

    使用wget命令去官网下载solr的压缩包. 1 wget https://mirrors.bfsu.edu.cn/apache/lucene/solr/8.6.3/solr-8.6.3.tgz 使用 ...

  2. 在Ubuntu下安装ovs-dpdk

    在Ubuntu下安装ovs-dpdk 参考资料:https://software.intel.com/zh-cn/articles/using-open-vswitch-with-dpdk-on-ub ...

  3. Ubuntu 下安装QT

    Ubuntu 下安装QT 本文使用的环境 QT Library: qt-everywhere-opensource-src-4.7.4.tar.gz QT Creator: qt-creator-li ...

  4. Ubuntu下安装JDK以及相关配置

    1.查看系统位数,输入以下命令即可 getconf LONG_BIT 2.下载对应的JDK文件,我这里下载的是jdk-8u60-linux-64.tar.gz 3.创建目录作为JDK的安装目录,这里选 ...

  5. Ubuntu下安装mod_python报错(GIT错误)

    Ubuntu下安装mod_python3.4.1版本报出如下错误: writing byte-compilation script '/tmp/tmpE91VXZ.py' /usr/bin/pytho ...

  6. TODO:Ubuntu下安装Node

    TODO:Ubuntu下安装Node Node.js 是一个基于 Chrome V8 引擎的 JavaScript 运行环境.Node.js 使用了一个事件驱动.非阻塞式 I/O 的模型,使其轻量又高 ...

  7. Ubuntu杂记——Ubuntu下安装VMware

    转战Ubuntu,不知道能坚持多久,但是自己还是要努力把转战过程中的学习到的给记录下来.这次就来记录一下,Ubuntu下如何安装VMware. 就我所知,Linux下有VirtualBox和VMwar ...

  8. 来杯Caffe——在ubuntu下安装Caffe框架并测试

    Caffe是一种深度学习框架...blablabla...... Caffe要在ubuntu下安装 1. 安装依赖 sudo apt-get install libatlas-base-dev sud ...

  9. Ubuntu 下安装 Mysql

    这里讲用Ubuntu下安装MySql ubuntu上安装mysql非常简单只需要几条命令就可以完成. 1. sudo apt-get install mysql-server   2. apt-get ...

随机推荐

  1. 1013 ACM 杭电 root

    题目:http://acm.hdu.edu.cn/showproblem.php?pid=1013 题意:求两个数的根 如: 12->3,99->9,80->8 注意题目没有限制数的 ...

  2. socket 远程命令

    # -*- coding: utf-8 -*- # 斌彬电脑 from socket import * import subprocess server = socket(AF_INET, SOCK_ ...

  3. bzoj 3450 期望分数

    自己只能想到O(n^2)的: dp[i][j] 表示 以i结尾,长度为j的o串的概率,然后在每次遇到x的时候算分数. 正解是: dp[i]表示前i个的答案,d[i]表示以i结尾的期望长度. 推的时候它 ...

  4. Django的使用规则

    ORM应该算是Python的一大特色,功能类似于Mybatis或hibernate,但是显示要强大更多 一:terminal下命令行的使用 1.创建一个Project django-admin sta ...

  5. sql ,内连接,外连接,自然连接等各种连接

    1.内联接(典型的联接运算,使用像 = 或 <> 之类的比较运算符).包括相等联接和自然联接. 内联接使用比较运算符根据每个表共有的列的值匹配两个表中的行.例如,检索 students和c ...

  6. poj--1088--DFS(记忆化搜索之经典)

    滑雪 Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 68057   Accepted: 25039 Description ...

  7. 推荐10本C#编程的最佳书籍

    C#和.NET非常受全球开发人员的追捧和热爱.书籍是人类进步的阶梯.想要学习C# ?这里有10本学习C#编程的最好书籍在等着你哦. 1.<C# 5.0 in a Nutshell>:权威的 ...

  8. UE.getEditor('editor')

    <script type="text/javascript"> $().ready(function(){ var editor = document.getEleme ...

  9. 【ML】Predict and Constrain: Modeling Cardinality in Deep Structured Prediction -预测和约束:在深度结构化预测中建模基数

    [论文标题]Predict and Constrain: Modeling Cardinality in Deep Structured Prediction   (35th-ICML,PMLR) [ ...

  10. sklearn:Python语言开发的通用机器学习库

    引言:深入理解机器学习并全然看懂sklearn文档,须要较深厚的理论基础.可是.要将sklearn应用于实际的项目中,仅仅须要对机器学习理论有一个主要的掌握,就能够直接调用其API来完毕各种机器学习问 ...