viviotech / lucee-installer

BitRock Installer XML config and files for the Lucee installers
http://lucee.viviotech.net/
9 stars 2 forks source link

Problem with install_mod_cfml.sh on Amazon Linux #74

Closed utdream closed 8 years ago

utdream commented 9 years ago

Andrew Dixon found and reported an issue with the install_mod_cfml.sh script not functioning properly in Amazon Linux in that the mod_cfml configuration doesn't get added to the Apache conf file. There is probably a function or a line of code in there that needs to be customized specifically for Amazon Linux.

Need to identify and correct the issue.

utdream commented 9 years ago

Log file excerpt:

Executing /opt/lucee/sys/install_mod_cfml.sh -m install -f /etc/httpd/conf/httpd.conf -d /usr/lib64/httpd/modules -c /usr/sbin/apachectl -k [redacted]
Script exit code: 0

Script output:
 * Attempting to detect Apache version...
* Found Apache version 2.2 [SUCCESS]
* Checking for pre-existing mod_cfml install...* Restarting Apache so changes take effect...
* mod_cfml Installation Complete

If nothing else, there's a missing CR in there.

hippiex commented 8 years ago

For the 64Bit version of Amazon Linux I did this to correct the problem

cp /opt/lucee/sys/mod_cfml/centos-httpd22-x64/mod_cfml.so /usr/lib64/httpd/modules/
chmod 755 mod_cfml.so 

# get shared key from /opt/lucee/tomcat/conf/server.xml
# <!-- visit modcfml.org for details on mod_cfml configuration options -->
#        <Valve className="mod_cfml.core"
#                loggingEnabled="false"
#                maxContexts="200"
#                timeBetweenContexts="2000"
#                scanClassPaths="false"
#                sharedKey="SHARED KEY"
#                />
#edit /etc/httpd/conf/httpd.conf
DirectoryIndex index.cfm index.cfml index.html index.html.var

#add this to the end                
LoadModule modcfml_module modules/mod_cfml.so
CFMLHandlers ".cfm .cfc .cfml"
ModCFML_SharedKey "SHARED KEY FROM ABOVE"
# Optional, all for logging and debugging:
# LogHeaders true
# LogHandlers true
# LogAliases true
# VDirHeader false
utdream commented 8 years ago

narrowed this problem down to the getLinuxVersion() function not recognizing Amazon Linux. Going to see about using the cat /etc/issue command to try to properly identify it.

utdream commented 8 years ago

The '/etc/issue' file is unreliable. Other possible options include reading the '/etc/lsb-release' file or the '/etc/os-release' file, but these options are not available on older systems. Without a reliable way to determine the linux flavor we're running on, I'll have to postpone updating the system detection function. For now, since the installers only officially support RHEL and Debian-based systems, I'll have the script simply default to the RHEL option. This should move us past this particular hurdle and get the Amazon Linux folks up and running.

utdream commented 8 years ago

Fixed in Lucee 5.0.0.178-BETA.