solr 安装

[root@bogon ~]# mkdir /usr/local/solr
[root@bogon ~]# cp apache-tomcat-7.0.47 /usr/local/solr/tomcat
cp: omitting directory `apache-tomcat-7.0.47'
[root@bogon ~]# cp apache-tomcat-7.0.47 /usr/local/solr/tomcat -r
[root@bogon ~]# cd /usr/local/solr/
[root@bogon solr]# ll
total 4
drwxr-xr-x. 9 root root 4096 Feb 20 22:36 tomcat
[root@bogon solr]# cd ~
[root@bogon ~]# ll

[root@bogon ~]# tar -zxf solr-4.10.3.tgz.tgz
[root@bogon ~]# cd solr-4.10.3
[root@bogon solr-4.10.3]# ll
[root@bogon solr-4.10.3]# cd example/
[root@bogon example]# ll

[root@bogon example]# cd ..
[root@bogon solr-4.10.3]# ll
[root@bogon solr-4.10.3]# cd dist/
[root@bogon dist]# ll
[root@bogon dist]# cp solr-4.10.3.war /usr/local/solr/tomcat/webapps/solr.war
[root@bogon dist]# cd /
[root@bogon /]# cd usr/local/solr/
[root@bogon solr]# cd tomcat/
[root@bogon tomcat]# cd bin/
[root@bogon bin]# ./startup.sh
Using CATALINA_BASE:   /usr/local/solr/tomcat
Using CATALINA_HOME:   /usr/local/solr/tomcat
Using CATALINA_TMPDIR: /usr/local/solr/tomcat/temp
Using JRE_HOME:        /var/jdk1.7.0_55
Using CLASSPATH:       /usr/local/solr/tomcat/bin/bootstrap.jar:/usr/local/solr/tomcat/bin/tomcat-juli.jar
[root@bogon bin]# cd ..
[root@bogon tomcat]# cd webapps/
[root@bogon webapps]# lll
-bash: lll: command not found
[root@bogon webapps]# ll
[root@bogon webapps]# ..
-bash: ..: command not found
[root@bogon webapps]# ..
-bash: ..: command not found
[root@bogon webapps]# cd ..
[root@bogon tomcat]# ll
t
[root@bogon tomcat]# cd bin/
[root@bogon bin]# ll
[root@bogon bin]# cd ~
[root@bogon ~]# cd solr-4.10.3
[root@bogon solr-4.10.3]# ll
[root@bogon solr-4.10.3]# cd dist/
[root@bogon dist]# ll
[root@bogon dist]# cd ..
[root@bogon solr-4.10.3]# cd example/
[root@bogon example]# ll

[root@bogon example]# cd lib/
[root@bogon lib]# ll

[root@bogon lib]# cd ext/
[root@bogon ext]# ll\
> ^C
[root@bogon ext]# ll

[root@bogon ext]# cp * /usr/local/solr/tomcat/webapps/solr/WEB-INF/lib/
[root@bogon ext]# pws
-bash: pws: command not found
[root@bogon ext]# pwd
/root/solr-4.10.3/example/lib/ext
[root@bogon ext]# cd ..
[root@bogon lib]# cd ..
[root@bogon example]# ll
total 104
drwxr-xr-x. 2 root root  4096 Feb 20 22:37 contexts
drwxr-xr-x. 2 root root  4096 Feb 20 22:37 etc
drwxr-xr-x. 4 root root  4096 Feb 20 22:37 example-DIH
drwxr-xr-x. 2 root root  4096 Feb 20 22:37 exampledocs
drwxr-xr-x. 3 root root  4096 Dec  9  2014 example-schemaless
drwxr-xr-x. 3 root root  4096 Feb 20 22:37 lib
drwxr-xr-x. 2 root root  4096 Dec  1  2014 logs
drwxr-xr-x. 5 root root  4096 Feb 20 22:37 multicore
-rw-r--r--. 1 root root  2992 Dec  1  2014 README.txt
drwxr-xr-x. 2 root root  4096 Feb 20 22:37 resources
drwxr-xr-x. 4 root root  4096 Dec  9  2014 scripts
drwxr-xr-x. 4 root root  4096 Feb 20 22:37 solr
drwxr-xr-x. 2 root root  4096 Dec  9  2014 solr-webapp
-rw-r--r--. 1 root root 46294 Mar 12  2013 start.jar
drwxr-xr-x. 2 root root  4096 Feb 20 22:37 webapps
[root@bogon example]# cp -r solr /usr/local/solr/solrhome
[root@bogon example]# cd /
[root@bogon /]# cd usr/local/solr/tomcat/
[root@bogon tomcat]# ll
total 116
drwxr-xr-x. 2 root root  4096 Feb 20 22:36 bin
drwxr-xr-x. 3 root root  4096 Feb 20 22:38 conf
drwxr-xr-x. 2 root root  4096 Feb 20 22:36 lib
-rw-r--r--. 1 root root 56812 Feb 20 22:36 LICENSE
drwxr-xr-x. 2 root root  4096 Feb 20 22:38 logs
-rw-r--r--. 1 root root  1192 Feb 20 22:36 NOTICE
-rw-r--r--. 1 root root  8826 Feb 20 22:36 RELEASE-NOTES
-rw-r--r--. 1 root root 16262 Feb 20 22:36 RUNNING.txt
drwxr-xr-x. 2 root root  4096 Feb 20 22:36 temp
drwxr-xr-x. 8 root root  4096 Feb 20 22:38 webapps
drwxr-xr-x. 3 root root  4096 Feb 20 22:38 work
[root@bogon tomcat]# cd //
[root@bogon //]# cd /
[root@bogon /]# cd usr/local/solr/
[root@bogon solr]# ll
total 8
drwxr-xr-x. 4 root root 4096 Feb 20 22:43 solrhome
drwxr-xr-x. 9 root root 4096 Feb 20 22:36 tomcat
[root@bogon solr]# vi  tomcat/webapps/solr/WEB-INF/
[root@bogon solr]# pwd
/usr/local/solr
[root@bogon solr]# cd tomcat/webapps
[root@bogon webapps]# ll
total 29072
drwxr-xr-x. 13 root root     4096 Feb 20 22:36 docs
drwxr-xr-x.  7 root root     4096 Feb 20 22:36 examples
drwxr-xr-x.  5 root root     4096 Feb 20 22:36 host-manager
drwxr-xr-x.  5 root root     4096 Feb 20 22:36 manager
drwxr-xr-x.  3 root root     4096 Feb 20 22:36 ROOT
drwxr-xr-x.  8 root root     4096 Feb 20 22:38 solr
-rw-r--r--.  1 root root 29741796 Feb 20 22:38 solr.war
[root@bogon webapps]# cd solr
[root@bogon solr]# ll
total 36
-rw-r--r--. 1 root root 5990 Dec  1  2014 admin.html
drwxr-xr-x. 3 root root 4096 Feb 20 22:38 css
-rw-r--r--. 1 root root 1146 Dec  1  2014 favicon.ico
drwxr-xr-x. 4 root root 4096 Feb 20 22:38 img
drwxr-xr-x. 4 root root 4096 Feb 20 22:38 js
drwxr-xr-x. 2 root root 4096 Feb 20 22:38 META-INF
drwxr-xr-x. 2 root root 4096 Feb 20 22:38 tpl
drwxr-xr-x. 3 root root 4096 Feb 20 22:38 WEB-INF
[root@bogon solr]# cd WEB-INF/
[root@bogon WEB-INF]# vi web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
 Licensed to the Apache Software Foundation (ASF) under one or more
 contributor license agreements.  See the NOTICE file distributed with
 this work for additional information regarding copyright ownership.
 The ASF licenses this file to You under the Apache License, Version 2.0
 (the "License"); you may not use this file except in compliance with
 the License.  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         version="2.5"
         metadata-complete="true"
>
  <!-- Uncomment if you are trying to use a Resin version before 3.0.19.
    Their XML implementation isn't entirely compatible with Xerces.
    Below are the implementations to use with Sun's JVM.
  <system-property javax.xml.xpath.XPathFactory=
             "com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl"/>
  <system-property javax.xml.parsers.DocumentBuilderFactory=
             "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl"/>
  <system-property javax.xml.parsers.SAXParserFactory=
             "com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl"/>
   -->

  <!-- People who want to hardcode their "Solr Home" directly into the
       WAR File can set the JNDI property here...
   -->

    <env-entry>
       <env-entry-name>solr/home</env-entry-name>
       <env-entry-value>/usr/local/solr/solrhome</env-entry-value>
       <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>
  <!-- Any path (name) registered in solrconfig.xml will be sent to that filter -->
  <filter>
    <filter-name>SolrRequestFilter</filter-name>
    <filter-class>org.apache.solr.servlet.SolrDispatchFilter</filter-class>
    <!-- If you are wiring Solr into a larger web application which controls
"web.xml" 195L, 7044C written
[root@bogon WEB-INF]# cd ..
[root@bogon solr]# cd ..
[root@bogon webapps]# cd ..
[root@bogon tomcat]# cd bin/
[root@bogon bin]# cd ..
[root@bogon tomcat]# bin/startup.sh
Using CATALINA_BASE:   /usr/local/solr/tomcat
Using CATALINA_HOME:   /usr/local/solr/tomcat
Using CATALINA_TMPDIR: /usr/local/solr/tomcat/temp
Using JRE_HOME:        /var/jdk1.7.0_55
Using CLASSPATH:       /usr/local/solr/tomcat/bin/bootstrap.jar:/usr/local/solr/tomcat/bin/tomcat-juli.jar
[root@bogon tomcat]# tail -f logs/c
tail: cannot open `logs/c' for reading: No such file or directory
[root@bogon tomcat]# tail -f logs/catalina.out
Feb 20, 2017 10:49:36 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/local/solr/tomcat/webapps/ROOT
Feb 20, 2017 10:49:36 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/local/solr/tomcat/webapps/host-manager
Feb 20, 2017 10:49:36 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Feb 20, 2017 10:49:36 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Feb 20, 2017 10:49:36 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 8385 ms

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值