| | 1 | = Apache Solr on mirabal.mayfirst.org = |
| | 2 | |
| | 3 | mirabal.mayfirst.org is a dedicated [http://lucene.apache.org/solr/ Apache Solr] Server. |
| | 4 | |
| | 5 | == // For webmasters // == |
| | 6 | |
| | 7 | ''...who want to use mirabal.mayfirst.org as their Apache Solr server'' |
| | 8 | |
| | 9 | === Get in touch === |
| | 10 | |
| | 11 | Please write a [/newticket ticket] or contact the tech crew via [https://chat.indymedia.org/?chans=mayfirst&nick=visita IRC] ([https://chat.indymedia.org/?form=off&secure=on&chans=mayfirst&nick=solr&cgiirc=mozilla Firefox], [https://chat.indymedia.org/?form=off&secure=on&chans=mayfirst&nick=solr&cgiirc=konqueror Konqueror/Safari], [https://chat.indymedia.org/?form=off&secure=on&chans=mayfirst&nick=solr&cgiirc=opera7 Opera 7], [https://chat.indymedia.org/?form=off&secure=on&chans=mayfirst&nick=solr&cgiirc=opera Opera], [https://chat.indymedia.org/?form=off&secure=on&chans=mayfirst&nick=solr&cgiirc=ie Internet Explorer]). |
| | 12 | |
| | 13 | === Provide SSH access === |
| | 14 | |
| | 15 | You have to ask the admin of your host server to create a new user on the server and add mirabal's public ssh key to the new user's ./ssh/authorized_keys file. mirabal will connect to the host server and provide an ssh tunnel to the Apache Solr server. |
| | 16 | |
| | 17 | === Access Apache Solr === |
| | 18 | |
| | 19 | You can then connect to the Apache Solr server on mirabal.mayfirst.org: |
| | 20 | |
| | 21 | {{{ |
| | 22 | Solr host name: localhost |
| | 23 | Solr port: 9080 |
| | 24 | Solr path: /solr/<sitename> |
| | 25 | }}} |
| | 26 | |
| | 27 | == // For admins // == |
| | 28 | |
| | 29 | ''...who want to add access for another website to Apache Solr on mirabal.mayfirst.org'' |
| | 30 | |
| | 31 | There are two things to do on mirabal.mayfirst.org: add a ssh tunnel to the host server and create a new Apache Solr site in Apache Tomcat. |
| | 32 | |
| | 33 | === Create SSH tunnel === |
| | 34 | |
| | 35 | To add a SSH tunnel simply add the login credentials to |
| | 36 | {{{ |
| | 37 | /etc/default/solr-autossh |
| | 38 | }}} |
| | 39 | |
| | 40 | Restart the script with |
| | 41 | {{{ |
| | 42 | service solr-autossh restart |
| | 43 | }}} |
| | 44 | |
| | 45 | === Test SSH tunnel === |
| | 46 | |
| | 47 | Check with |
| | 48 | {{{ |
| | 49 | service solr-autossh status |
| | 50 | }}} |
| | 51 | if the tunnel exists. |
| | 52 | |
| | 53 | Log into the server running the website (as solr user) and do a |
| | 54 | {{{ |
| | 55 | wget localhost:9080 |
| | 56 | }}} |
| | 57 | which should download the Apache Tomcat welcome page from mirabal.mayfirst.org. |
| | 58 | |
| | 59 | === Create new Solr configuration === |
| | 60 | |
| | 61 | Copy the configuration directory |
| | 62 | {{{ |
| | 63 | cp -a /etc/solr/conf /etc/solr/<sitename> |
| | 64 | }}} |
| | 65 | |
| | 66 | If you need a different configuration than [http://drupal.org/project/apachesolr Apache Solr Drupal] you probably have to change at least ''schema.xml'' and ''solrconfig.xml''. |
| | 67 | |
| | 68 | === Create new Solr site === |
| | 69 | |
| | 70 | Copy an existing Solr core |
| | 71 | {{{ |
| | 72 | cp -a /usr/share/solr/testsite /usr/share/solr/<sitename> |
| | 73 | }}} |
| | 74 | |
| | 75 | Change the symbolic link to the new configuration directory |
| | 76 | {{{ |
| | 77 | ln -sf /etc/solr/<sitename> /usr/share/solr/<sitename>/conf |
| | 78 | }}} |
| | 79 | |
| | 80 | Create a new data directory |
| | 81 | {{{ |
| | 82 | mkdir /var/lib/solr/data/<sitename> |
| | 83 | }}} |
| | 84 | |
| | 85 | Change the symbolic link to the new data directory |
| | 86 | {{{ |
| | 87 | ln -sf /var/lib/solr/data/<sitename> /usr/share/solr/<sitename>/ |
| | 88 | }}} |
| | 89 | |
| | 90 | === Create new Solr core === |
| | 91 | |
| | 92 | Add a new core |
| | 93 | {{{ |
| | 94 | <core name="<sitename>" instanceDir="<sitename>" /> |
| | 95 | }}} |
| | 96 | to Apache Solr |
| | 97 | {{{ |
| | 98 | /etc/solr/solr-multicore.xml |
| | 99 | }}} |
| | 100 | |
| | 101 | === Restart Apache Tomcat === |
| | 102 | |
| | 103 | Restart Apache Tomcat with |
| | 104 | {{{ |
| | 105 | service tomcat6 restart |
| | 106 | }}} |
| | 107 | |
| | 108 | === Test new Solr site === |
| | 109 | |
| | 110 | Check that the new core is accessible |
| | 111 | {{{ |
| | 112 | http://localhost:8080/solr/<sitename>/admin |
| | 113 | }}} |