1. install and configure jdk, Tomcat, and solr

Source: Internet
Author: User
Tags solr

1. jdk installation and configuration

1) download the corresponding jdk version from the official website based on the computer type.

 

2. Double-click the jdk-8u5-windows-x64.exe installation package and click Next. Remember the installation directories of jdk and jre.

3) environment variable configuration: Computer = advanced system settings = Advanced = Environment Variables

 

Create a new system variable,

 

Create a variable named JAVA_HOME. The variable value is the jdk installation path.

The new variable is named CLASSPATH and its value is:

.; % JAVA_HOME % \ lib \ tools. jar (note the. And; At the beginning ;)

Edit the variable name Path, which is added after the original variable:

; % JAVA_HOME % \ bin; % JAVA_HOME % \ jre \ bin (Be sure not to miss the previous; No)

After the configuration is complete, enter javac In the cmd window. If the following information is displayed, the configuration is successful.

 

 

2. Tomcat installation and configuration

1) download the corresponding Tomcat version from the official website based on the computer type.

 

This version is an decompressed version. Put the decompressed apache-tomcat-8.0.8 file in a directory that you think is appropriate and does not need to be installed. You can simply configure it.

2) modify the startup. bat and shutdown. bat files in the C: \ apache-tomcat-8.0.8 \ bin Folder:

Add the following two rows before the first row --

SET JAVA_HOME = JDK directory

SET CATALINA_HOME = Tomcat directory after decompression

For example:

SET JAVA_HOME = C: \ Program Files \ Java \ jdk1.8.0 _ 05

SET CATALINA_HOME = C: \ apache-tomcat-8.0.8

3) double-click startup. bat to open the Tomcat service and access http: // localhost: 8080/. The Tomcat website is configured.

Double-click shutdown. bat to disable the service.

4) to modify the port number, open the servlet in the conf folder under the Tomcat installation directory. modify the <Connector port = "8080" protocol = "HTTP/1.1" connectionTimeout = "20000" redirectPort = "8443"/> node in the xml file. Tomcat has been configured before, but every time the service is started, a black form will pop up, which is a bit unpleasant. However, if there is an error in solr learning, this dark form will prompt an error message.

5) optional steps: install Tomcat to the Windows Service

Switch to the C: \ apache-tomcat-8.0.8 \ bin directory in the cmd window

Install: service install tomcat

Uninstall: service uninstall tomcat

After installation, you can find the Tomcat service in the service.

 

 

3. solr configuration (my version is solr4.7.2)

Disable Tomcat services before configuration.

1) decompress the downloaded solr package and the decompressed directory structure is as follows:

 

2) Put the solr folder under the solr-4.7.2/example/folder to any location on your hard disk you want to store, I put it to the C directory.

3) The solr under the solr-4.7.0/example/webapp/solr directory will be decompressed. copy war to the C: \ apache-tomcat-8.0.8 \ webapps directory, and then start tomcat, solr. war is automatically decompressed, The solr directory will appear under the webapp directory, find the WEB-INF folder under some directories, modify the web under the folder. xml file

 

Remove the comment of this node and modify the content in the <env-entry-value> node to the solr directory in step 2, for example: <env-entry-value> C: \ solr </env-entry-value>

4) Put the jar package under the solr-4.7.2/example/lib/ext directory under C: \ apache-tomcat-8.0.8 \ webapps \ solr \ WEB-INF \ lib

5) Restart tomcat and enter http: // localhost: 8080/solr/admin in the address bar. If the solr page is displayed, the configuration is successful.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.