CFMX on Gentoo Linux

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/apache2to/etc/apache2 - ColdFusion Startup script was not working - the
/opt/coldfusionmx/bin/coldfusionstart 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 thesucommand in thecoldfusionscript. It was usingsu cfmxuser -s /bin/sh -c .... By removing the-s /bin/shfrom the startup script and making sure that ourcfmxuserhad 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 xfreeto solve that issue. We also had to give thecfmxuserpermission to write in the/opt/coldfusionmx/charting/cachefolder. - CFMAIL not working - the
cfmxuserdid not have permission to write in the spool directory/opt/coldfusionmx/Maildirectory. - Other permissions issues - I also gave the
cfmxuserpermission to thestubsdirectory. You may just want to runchown -R cfmxuser /opt/coldfusionmxso the user has permission to everything.
Trackbacks
Trackback Address: 161/4DB71AA6EA7DFC44F929458F69883822
- ColdFusion MX 6.1 on Gentoo with Apache2 Cat Tracks - Amy Jo Hines' Weblog
Comments
On 09/18/2004 at 2:13:24 PM EDT Jack wrote:
1
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.
On 09/19/2004 at 1:13:22 AM EDT Jack wrote:
2
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
On 12/08/2004 at 12:08:49 PM EST Grant wrote:
3
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;;'
On 12/08/2004 at 12:09:32 PM EST Grant wrote:
4
ummm... I forgot... help plz
Post a Comment
Recent Entries
- Cache Template in Request Setting Explained
- What Version of Java is ColdFusion Using?
- ColdFusion 9 Performance Brief from Adobe
- Request Filtering in IIS 7 Howto
- J2EE Session Cookies on ColdFusion / JRun
- Hands on ColdFusion Security Training
- ColdFusion 9 Solr Vulnerability - Are you at Risk?
- FCKEditor Year 2010 Bug for Firefox 3.6 with ColdFusion
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.
#!/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



add to del.icio.us



