install activemq with selinux centos and Solr

First things first, install the Puppet Labs repository:

rpm -Uvh http://yum.puppetlabs.com/el/6/products/x86_64/puppetlabs-release-6-5.noarch.rpm
 
yum -y install tomcat6 tomcat6-webapps tomcat6-admin-webapps httpd java java-1.6.0-openjdk activemq 

or you can download jdk and jre in http://www.oracle.com/technetwork/java/javase/downloads/index.html

download rpm file and install with yum localinstall


service activemq restart
 Selinux for activemq

allow port

semanage port -l | grep '^http_port_t'
semanage port -a -t http_port_t -p tcp 8161
service httpd start
add in /etc/httpd/conf/httpd.conf

NameVirtualHost *:80
<VirtualHost *:80>
ProxyPreserveHost On
ProxyRequests Off
ServerName YOURDOMAIN
ServerAlias YOURDOMAIN
ProxyPass / http://127.0.0.1:8161/admin/
ProxyPassReverse / http://127.0.0.1/:8161/admin/
</VirtualHost>

 Install solr

Now you have to set up a manager role for Tomcat to be able to administrate the instance:
Edit the /etc/tomcat6/tomcat-users.xml file and add the following lines between the line while replacing YourUserName and YourSecretPassword with your own values:


Installing Apache Commons Loggins
Download Apache Commons Logging (Binaries) fromhttp://commons.apache.org/proper/commons-logging/download_logging.cgi to your directory of choice (e.g. your home directory) and copy them to your/usr/share/tomcat6/lib directoy:

Installing Simple Logging Facade for Java (SLF4J)
Download SLF4J from http://www.slf4j.org/ to your directory of choice (e.g. your home directory) and also copy them to your /usr/share/tomcat6/lib directoy. Please note that you have to exclude (or remove after copy) a couple of Android files (slf4j-android-1.7.7.jar and slf4j-android-1.7.7-sources.jar), otherwise your Tomcat server won’t start!

Installing Apache Solr
Download Apache Solr from http://lucene.apache.org/solr/downloads.html to your directory of choice (e.g. your home directory) and uncompress your archive:
Copy and rename the included Solr solr.war to your Tomcat apps folder (please note, that we are in the /home/solr-4.9.0/ directory):
Now you have to create a folder where Solr stores all its files for your index. You are free to set this directory outside from your solr web-apps directory. I recommend you to edit the schema.xml file because Solr comes along with some predefined example structures which may result in unused overhead if you leave this file untouched. In my case I’ve created the solr folder in /var/www/:
You can find the schema.xml in the default collection directory:/var/www/solr/collection1/conf/.
Time to restart your Tomcat server!
Once your Tomcat server restarted it unpacked the solr.war file mentioned above. You finally have to edit the web.xml file to get Solr running:
Look for the following code and edit it with your Solr home directory (in my example: /var/www/solr). Don’t forget to remove the comment markers!
Another restart of Tomcat and you’re almost done!
 source solr
source activemq
source activemq with passwd
source discus activemq with passwd 
source selinux
source selinux serverfault
source activemq with source

Comments

Popular Posts