Hi all -
Been trying all day to get tomcat + pebble to work on my Slack 10.2 system.
I currently run apache and a cacti server off my box, both of which are configured and working fine out of the
/www directory.
If I download tomcat 6, extract it, and place it in
/www/htdocs/tomcat then run the
startup.sh script, tomcat starts up fine and I can configure a manager user/pass and then deploy my
pebble.war file without trouble.
Problem here is that:
One) The tomcat daemon runs as
root
Two) When I blog in pebble the blogs go to
/root/pebble
Ok, so I scratched the above setup and did the following...
Code:
Tomcat Config
Install Tomcat to /www/htdocs/tomcat
Configure group/user for Tomcat
groupadd tomcat
useradd -g tomcat tomcatuser
Set perms on /www/htdocs/tomcat
chgrp -R tomcat ./tomcat/
chown -R tomcatuser ./tomcat/
Set perms on /www/htdocs/tomcat/conf
chmod 750 ./conf
Add manager account for Tomcat
cd /www/htdocs/tomcat/conf
pico ./tomcat-users.xml
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="manager"/>
<user username="manager" password="4manage" roles="manager"/>
</tomcat-users>
Compile/Install jsvc
Note: javac compile errors are related to lack of jdk package
cd /www/htdocs/tomcat/bin/
tar xvfz jsvc.tar.gz
cd jsvc-src
autoconf
chmod +x ./configure
./configure --with-java=/usr/lib/java
make
cp jsvc ..
cd ..
To START tomcat
cd /www/htdocs/tomcat
./bin/jsvc -cp ./bin/bootstrap.jar -outfile ./logs/catalina.out \
-errfile ./logs/catalina.err -user tomcatuser \
org.apache.catalina.startup.Bootstrap
Alright, so that gets Tomcat running as
tomcatuser, a user with much less privaledges then
root.
Pebble took some mucking with, mainly with the
ApplicationContext-pebble.xml file in the WEB-INF folder of the Pebble folder inside of webapps
Code:
<!-- the location where your Pebble data is stored, default is ${user.home}/pebble -->
<property name="dataDirectory" value="/www/htdocs/tomcat/webapps/pebble/pebble_data/pebble"/>
After making that change I was able to start the Pebble webapp from within Tomcat and then login to Pebble with the default username/password.
Now heres where the new wierd stuff starts happening. Whenever I click on a link, say to change my user info or password or even logout, the cpu utilization spikes to 100% for about 10 seconds and I am left with a blank browser window.
I cannot find anything in the logs or any debugging info anywhere to lead me in the right direction. I know the issue is with permissions, just cannot figure out where.
Also noticed that my
catalina.out file is huge, like 130mb+ and growing. Normal?
Thanks,
Scott