{"id":2518,"date":"2015-08-02T23:06:36","date_gmt":"2015-08-02T23:06:36","guid":{"rendered":"http:\/\/www.garysieling.com\/blog\/?p=2518"},"modified":"2015-08-02T23:06:36","modified_gmt":"2015-08-02T23:06:36","slug":"installing-solr-5-x-on-centos-7","status":"publish","type":"post","link":"https:\/\/www.garysieling.com\/blog\/installing-solr-5-x-on-centos-7\/","title":{"rendered":"Installing Solr 5.x on CentOS 7"},"content":{"rendered":"<p>To install Solr 5.+ on centos 7, you need a JDK, preferably 64 bit:<\/p>\n<pre lang=\"bash\">\nyum search openjdk\n\nyum -y install java-1.8.0-openjdk.x86_64\n<\/pre>\n<p>Then, download from a mirror and extract Solr:<\/p>\n<pre lang=\"bash\">\nwget http:\/\/mirrors.gigenet.com\/apache\/lucene\/solr\/5.2.1\/solr-5.2.1.tgz\n\ntar xvf solr-5.2.1.tgz\n<\/pre>\n<p>If everything worked, it should be simple to start:<\/p>\n<pre lang=\"bash\">\ncd solr-5.2.1\n\nbin\/solr start -h 45.55.156.155 -p 8000\n<\/pre>\n<p>To test that Solr is working, you can use wget. This won\u2019t work until it starts up, which takes a 10-30 seconds:<\/p>\n<pre lang=\"bash\">\nwget localhost:8000\n<\/pre>\n<p>Output:<\/p>\n<pre lang=\"bash\">\n--2015-08-02 18:57:19--  http:\/\/localhost:8000\/\nResolving localhost (localhost)... ::1, 127.0.0.1\nConnecting to localhost (localhost)|::1|:8000... connected.\nHTTP request sent, awaiting response... 302 Found\nLocation: http:\/\/localhost:8000\/solr\/ [following]\n--2015-08-02 18:57:19--  http:\/\/localhost:8000\/solr\/\nReusing existing connection to [localhost]:8000.\nHTTP request sent, awaiting response... 200 OK\nLength: unspecified [text\/html]\nSaving to: \u2018index.html\u2019\n\n[ <=>                    ] 6,079     -.-K\/s   in 0s\n\n2015-08-02 18:57:19 (125 MB\/s) - \u2018index.html\u2019 saved [6079]\n<\/pre>\n<p>If this fails after waiting, run solr again with \u201c-f\u201d to see the error.<\/p>\n<pre lang=\"bash\">\nbin\/solr start -p 8000 -h 45.55.156.155 -p 8000\n<\/pre>\n<p>If you run out of memory, add the \u201c-m\u201d argument (e.g. -m 256m) &#8211; by default Solr uses 512mb.<\/p>\n<pre lang=\"bash\">\nbin\/solr start -h 45.55.156.155 -p 8000 -f -m 256m\n<\/pre>\n<p>To access Solr\u2019s administration pages, run SSH and enable port forwarding. With Putty this means adding \u201c-L 8000:localhost:8000\u201d (for our example) to the command line arguments. Once you connect this way, you can use \u201chttp:\/\/localhost:8000\/solr\/#\/\u201d to connect to the Solr admin panel.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To install Solr 5.+ on centos 7, you need a JDK, preferably 64 bit: yum search openjdk yum -y install java-1.8.0-openjdk.x86_64 Then, download from a mirror and extract Solr: wget http:\/\/mirrors.gigenet.com\/apache\/lucene\/solr\/5.2.1\/solr-5.2.1.tgz tar xvf solr-5.2.1.tgz If everything worked, it should be simple to start: cd solr-5.2.1 bin\/solr start -h 45.55.156.155 -p 8000 To test that Solr &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.garysieling.com\/blog\/installing-solr-5-x-on-centos-7\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Installing Solr 5.x on CentOS 7&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[9],"tags":[104,300,517],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/2518"}],"collection":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/comments?post=2518"}],"version-history":[{"count":0,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/2518\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/media?parent=2518"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/categories?post=2518"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/tags?post=2518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}