CFMX on Gentoo Linux

September 15, 2004
coldfusionlinux

We just installed CFMX 6.1 Pro Updator 1 on Gentoo Linux. We ran into a few issues but its working great now.

  • Installation - created a symbolic link at /usr/local/apache2 to /etc/apache2
  • ColdFusion Startup script was not working - the /opt/coldfusionmx/bin/coldfusion start up script was not working, but we could start the server using /opt/coldfusionmx/bin/cfusion -start default. We found the problem to be in the su command in the coldfusion script. It was using su cfmxuser -s /bin/sh -c .... By removing the -s /bin/sh from the startup script and making sure that our cfmxuser had a default shell set, we resolved this problem.
  • CFCHART not working - this is a common one with CFMX and unix, because CFCHART requires X11. We ran emerge xfree to solve that issue. We also had to give the cfmxuser permission to write in the /opt/coldfusionmx/charting/cache folder.
  • CFMAIL not working - the cfmxuser did not have permission to write in the spool directory /opt/coldfusionmx/Mail directory.
  • Other permissions issues - I also gave the cfmxuser permission to the stubs directory. You may just want to run chown -R cfmxuser /opt/coldfusionmx so the user has permission to everything.


3 people found this page useful, what do you think?

Trackbacks

Comments

Hmm, not me. I get the oddest problems installing CFMX on gentoo. This is a recent build of gentoo, already has apache2 in /etc. So the install goes fine, but the script throws really odd errors: ps: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory That's just an example. Every command in the script does that. So it's something odd in the script, cause all those commands work fine outside of the script - ps, ln, etc. CF does start fine with /opt/coldfusionmx/bin/cfusion -start default, so that is good. Am following your instructions aw well as I can, but I think I'll be rewriting that script because it fails work work even at all.
Okay, I've rewritten their script. Very little is different but it works fine. Anyway I thought i'd copy / paste it in for someone else. #!/bin/bash # Rework of broken ColdFusion MX script. Most (99%) of the scriptwork in here is from the original ColdFusion script. PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/3.3:/opt/blackdown-jdk-1.4.1/bin:/opt/blackdown-jdk-1.4.1/jre/bin CONNECTOR="" RUNTIME_USER="apache" JAVA_HOME="/opt/coldfusionmx/runtime/jre" JAVA_EXECUTEABLE="/opt/coldfutionmx/runtime/jre/bin/java" DOCROOT="/var/www/localhost/htdocs" CF_DIR="/opt/coldfusionmx" LD_LIBRARY_PATH="/opt/coldfusionmx/lib:/opt/coldfusionmx/lib/_ilnx21/bin" CFSTART='su $RUNTIME_USER -c "export PATH=$PATH:/opt/coldfusionmx/runtime/bin; export LD_LIBRARY_PATH=$LD_LIBRARY_PATH; cd /opt/coldfusionmx/runtime/bin; nohup /opt/coldfusionmx/bin/cfusion -autorestart -start default &"' CFSTOP='su $RUNTIME_USER -c "env -i; cd /opt/coldfusionmx/runtime/bin; /opt/coldfusionmx/bin/cfusion stop default"' ARG=$1 ID=`id -u` if [ ! $ID -eq 0 ]; then echo "You must be root to start ColdFusion MX." exit 1 fi ######################################### Start ColdFusion MX cfstart() { [ -f $CF_DIR/bin/jvm.config ] || { ln -s $CF_DIR/runtime/bin/jvm.config $CF_DIR/bin/jvm.config } eval $CFSTART >> $CF_DIR/logs/cfserver.log 2>&1 echo "There may be a few moments before you can access the ColdFusion MX administrator. This is normal." # Insert a sleep statement to give the server a few moments. sleep 12 ps -e | grep -w [c]fusion > /dev/null 2>&1 || { echo "There has been an error starting ColdFusion MX, please check the logs." exit 1 } [ -f "$CF_DIR/bin/cfmx-connectors.sh" ] && { echo "======================================================================" echo "Running the ColdFusion MX connector wizard" echo "======================================================================" sh $CF_DIR/bin/cfmx-connectors.sh && { mv -f $CF_DIR/bin/cfmx-connectors.sh $CF_DIR/bin/cfmx-connectors-run.sh } } echo "======================================================================" echo "ColdFusion MX has been started." echo "ColdFusion MX will write logs to $CF_DIR/logs/cfserver.log" echo "======================================================================" } ######################################### End Start ColdFusion MX ######################################### Stop ColdFusion MX cfstop() { ## See if ColdFusion is running. If it is, skip the stuff in the brackets. ps -e | grep -w [c]fusion > /dev/null 2>&1 || { echo "ColdFusion MX does not seem to be currently running" return } ## Okay, so it is running... echo "Stopping ColdFusion MX, please wait" eval $CFSTOP ## wait and see if it really did work. sleep 10 ps -e | grep -w [c]fusion > /dev/null 2>&1 && { echo "The ColdFusion MX server seems to be hanging, will stop non-gracefully" ps -e | grep -w [c]fusion | awk '{print $1}' | xargs kill -9 > /dev/null 2>&1 sleep 2 } ## And for the ones that just wont die... do them in by hand. ps -e | grep -w [c]fusion > /dev/null 2>&1 && { echo "There are some very stubborn ColdFusion MX processes that will not die, please kill the following PIDs by hand" ps -e | grep -w [c]fusion | awk '{print $1}' echo exiting exit 1 } echo "ColdFusion MX has been stopped" ## So it would seem. } ######################################### End Stop ColdFusion MX ########################################## Choice of user... [ -z "$ARG" ] && ARG=usage case $ARG in start) echo "Start ColdFusion MX" cfstart ;; stop) echo "Stop ColdFusion MX" cfstop ;; restart) echo "Restart ColdFusion MX" cfstop cfstart ;; status) if [ -x "$CF_DIR/bin/cfstat" ]; then shift $CF_DIR/bin/cfstat $@ else echo "$0: $CF_DIR/bin/cfstat no such file" fi ;; wsconfig) WSCONFIG_JAR=$CF_DIR/runtime/lib/wsconfig.jar if [ $# -eq 0 ]; then # no arguments so display built-in help from wsconfig.jar $JAVA_EXECUTABLE -jar $WSCONFIG_JAR -help break else # brief help if [ "$2" = "help" ]; then echo "To configure a webserver connector you must specify the -ws and -dir options." echo "If configuring Apache it is recomended that you also specify the -bin and " echo "-script options." echo "" echo "To list all configured webserver connectors use the -list option." echo "To remove a configured webserver connector use the -r option with the " echo "-ws and -dir options." echo "To remove all webserver connectors use the -uninstall option." echo "To upgrade all installed webserver connectors use the -upgrade option." echo "" echo "For more detailed help see $0 $1." fi break fi # pass on all args to wsconfig.jar shift $JAVA_EXECUTABLE -jar $WSCONFIG_JAR $@ -coldfusion ;; *) echo "Usage:$0 (start|stop|restart|status|wsconfig)" ;; esac exit 0
This script is reporting syntax errors for me... ./coldfusion: line 45: syntax error near unexpected token `;;' ./coldfusion: line 45: `else echo "$0: $CF_DIR/bin/cfstat no such file" fi;;'
ummm... I forgot... help plz

Post a Comment




  



Spell Checker by Foundeo

Recent Entries



foundeo


did you hack my cf?