Why This Tutorial?
Because there is not any documentation about ColdFusion installation on Debian over internet. As you know Debian Linux is not supported officialy by Adobe. But Debian is one of the mosts used and well known Linux distribition for specially server usage and I think there would be some other people who wants to use Debian and ColdFusion together.Debian Installation
I have decided to install a clean Debian Linux for this tutorial. I think we can also see required packages for a base system.
I just downloded Debian 3.1r1 NET install CD and started to installation. You can find detailed information about Debian installation on official Debian page or HowToForge page.
Installation may depends on your requirements. Such as devices, partitions, etc. But what I have selected is a 2.6.x kernel on boot with "kernel26" start. When there is a question about package selection I did not installed any package as default. I will add required packages later.
After base system installation, I installed following packages just for a web server such as MySQL, PHP, Perl support etc.
debian:~# apt-get install apache2 apache2-common apache2-mpm-prefork bzip2 diff gcc gzip libapache2-mod-php4 libberkeleydb-perl libc6-dev libcrypt-blowfish-perl libcrypt-cbc-perl libcrypt-passwdmd5-perl libdate-calc-perl libdate-manip-perl libdbd-mysql-perl libdbi-perl libio-stringy-perl libmail-sendmail-perl libmailtools-perl libmcrypt4 libmd5-perl libmime-base64-perl libmime-perl libnet-dns-perl libnet-netmask-perl libnet-perl libnet-smtp-server-perl libperl5.8 libsasl2 libsasl2-modules libsnmp-session-perl libterm-readkey-perl libterm-readpassword-perl libtimedate-perl make mysql-client-4.1 mysql-common-4.1 mysql-server-4.1 perl perl-base perl-modules php4 php4-gd php4-mcrypt php4-mysql php4-pear postfix postfix-tls procmail sasl2-bin ssh tar wget nmap mc
Of course you may decide your own packages. But what is important for us is Apache2 server and if you need a database engine MySQL server. I also prefer to install Postfix insted of defaul Exim and I prefer to use it as SMTP server on my server.
I would suggest to use another desktop computer and reach your server via SSH. You may copy & paste these commands etc. easily. I would suggest Putty or SSH.com clients.
When we check server with IP on browser as "http://[machinename]/", we must get Apache default page. We can use also to check active services on server with nmap tool.
Here is my nmap results on local.
debian:~# nmap localhost Starting nmap 3.81 ( http://www.insecure.org/nmap/ ) at 2006-01-09 16:43 CET Interesting ports on localhost.localdomain (127.0.0.1): (The 1656 ports scanned but not shown below are in state: closed) PORT STATE SERVICE 22/tcp open ssh 25/tcp open smtp 80/tcp open http 111/tcp open rpcbind 113/tcp open auth 654/tcp open unknown 3306/tcp open mysql Nmap finished: 1 IP address (1 host up) scanned in 1.021 seconds debian:~#
As you can see port 80 is there and waiting for you. :)
ColdFusion Installation
Now server is ready for ColdFusion installation. We can download ColdFusion installer for Linux "coldfusion-701-lin.bin" and start to installation. Unfortunatelly at this step I do not know any place where I can download required ColdFusion installer via Wget. I need to download first over web and put into my server via SSH.Let us start to install.
debian:~# ls -la total 282884 drwxr-xr-x 3 root root 4096 2006-01-09 16:44 . drwxr-xr-x 21 root root 4096 2006-01-09 16:08 .. drwx------ 2 root root 4096 2006-01-09 16:13 .aptitude -rw-r--r-- 1 root root 412 2004-12-15 23:53 .bashrc -rw-r--r-- 1 root root 289355078 2006-01-09 15:40 coldfusion-701-lin.bin -rw-r--r-- 1 root root 197 2006-01-09 16:08 dbootstrap_settings -rw-r--r-- 1 root root 1336 2006-01-09 16:08 install-report.template -rw-r--r-- 1 root root 110 2004-11-10 17:10 .profile debian:~# chmod +x coldfusion-701-lin.bin
After download we can set required mode to start installation and start.
debian:~# ./coldfusion-701-lin.bin
Preparing to install...
Extracting the JRE from the installer archive...
Unpacking the JRE...
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...
Launching installer...
Preparing CONSOLE Mode Installation...
===============================================================================
Choose Locale...
----------------
->1- English
CHOOSE LOCALE BY NUMBER: 1
===============================================================================
(created with InstallAnywhere by Zero G)
-------------------------------------------------------------------------------
===============================================================================
Introduction
------------
Welcome to the Install Wizard for Macromedia ColdFusion MX 7
This wizard installs Macromedia ColdFusion MX 7 on your computer or produces
an EAR or WAR file for deployment on your J2EE application server. Macromedia
recommends that you exit from all running applications before proceeding.
Respond to each prompt to proceed to the next step in the installation. If you
want to change something on a previous step, type 'back'.
You may cancel this installation at any time by typing 'quit'.
WARNING: This program is protected by copyright laws and international
treaties.
PRESS <ENTER> TO CONTINUE:
===============================================================================
License Agreement
-----------------
...
DO YOU ACCEPT THE TERMS OF THIS LICENSE AGREEMENT?
(Y/N) : Y
===============================================================================
Pre-Installation Check
----------------------
The installer has found the following errors/warnings:
Warning: C++ compatibility pack
The installer was unable to determine if the C++ compatibility pack is
installed by running the following command: rpm --query compat-libstdc++
If this machine uses a version of glibc that is 2.2.5.x or higher the
compatibility pack is necessary for C++ custom tags, Verity, and web server
connectors to work properly.
For more information see the installation manual at
http://www.macromedia.com/go/livedocs_cfmx7docs
PRESS <ENTER> TO CONTINUE WITH THE INSTALLER:
At this step we got a warning on system. This is not direct problem for ColdFusion installation but as you can see if you need verity or custom tag supports you must find a solution. This error has been explained in ColdFusion Technotes for RedHat Linux. But these explanations does not work for Debian. I would suggest to install libstdc packages on Debian as following.
debian:~# apt-get install libstdc++6 libstdc++5 libstdc++2.10-glibc2.2
I will test these services later and try to explain in another tutorial. But as I let you know this warning is not important for base installation.
===============================================================================
Install Type
------------
If you do not have a serial number, select either 30-day trial or Developer
Edition.
->1- Install new version of ColdFusion MX with a serial number
2- 30-day trial
3- Developer Edition
Installation Choice: 2
First we select 30 day trial. We can update our license later via ColdFusion administrator.
===============================================================================
Installer Configuration
-----------------------
What kind of installation do you want?
->1- Server configuration
2- Multiserver configuration
3- J2EE configuration (EAR file)
4- J2EE configuration (WAR file)
Please select one of the following options: 1
We want to install ColdFusion with Apache webserver and we have selected server configuration.
===============================================================================
Is Macromedia ColdFusion MX 7 (Server Configuration) Installed?
---------------------------------------------------------------
You cannot install the server configuration of Macromedia ColdFusion MX 7 if it is already installed on this computer.
Is there already a server configuration of Macromedia ColdFusion MX 7 installed?
1- Yes
->2- No
ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS <ENTER> TO ACCEPT THE DEFAULT:
: 2
===============================================================================
Sub-component installation
--------------------------
The following options are available for installation.
An option with "[X]" in front will be installed and an option with "[ ]" will
not. Choosing an option will toggle it on or off
[X] 1) Getting Started Experience, Tutorials, & Documentation
[X] 2) ColdFusion MX 7 Search Services
[X] 3) Start ColdFusion on system init
4) Continue with installation
Select an option: 1
===============================================================================
Sub-component installation
[ ] 1) Getting Started Experience, Tutorials, & Documentation
[X] 2) ColdFusion MX 7 Search Services
[X] 3) Start ColdFusion on system init
4) Continue with installation
Select an option: 4
We have just removed totorials and documentation for security reason on our server.
===============================================================================
Choose Install Folder
---------------------
Select the directory in which to install Macromedia ColdFusion MX 7.
Directory:
Default Install Folder: /opt/coldfusionmx7
ENTER AN ABSOLUTE PATH, OR PRESS <ENTER> TO ACCEPT THE DEFAULT
:
===============================================================================
Earlier Versions of Macromedia ColdFusion installed?
----------------------------------------------------
If you installed an earlier version of ColdFusion on this computer, you can migrate your settings to Macromedia ColdFusion MX 7.
Is there an earlier version of ColdFusion installed on this computer (for example, ColdFusion 5 or ColdFusion MX)?
1- Yes
->2- No
ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS <ENTER> TO ACCEPT THE DEFAULT:
: 2
===============================================================================
Configure Web Servers
---------------------
Please configure your web server(s). If you do not configure a web server the
built-in web server will be used on port 8500 or the next available port.
1- Add Web Server Configuration
->2- Continue with installation
Choice: 2
We will install first built-in web server and than we will configure Apache with required connector later.
=============================================================================== Runtime User ------------ Enter the name of the runtime user. This user must exist already on the system. User Name: (DEFAULT: nobody): cfmx =============================================================================== Administrator Password ---------------------- Enter the password that you will use to control access to the ColdFusion MX Administrator. This field is required. Password: Confirm Password: Confirm Password:
As default installation ColdFusion would be installed with nobody user. But I prefer to install with a real system user. This would be useful later when we need to define some rights etc. for ColdFusion server such as on CFFILE usage etc.
If you have not insterted a new user before, you can add a new one as "useradd cfmx" on Debian.
=============================================================================== RDS Password ------------ The ColdFusion Remote Development Service (RDS) lets developers using Macromedia tools remotely connect to this server for development purposes. If this is a production server, Macromedia recommends that you disable RDS. Note, however, that disabling RDS also disables the directory browsing applets in the ColdFusion Administrator and some of the functionality in the Report Designer. Enable RDS (required for Report Builder and DW Extensions) (Y/N) : N
I prefer not to install RDS server on a production server because of security reasons.
=============================================================================== Installation Confirmation ------------------------- Installation Type: Server configuration Licensing: 30-day trial Installation Directories: Product: /opt/coldfusionmx7 Web root: /opt/coldfusionmx7/wwwroot Server Information: Web Server: Built-in Web Server Port: 8500 Search Service: installed Sample Apps: not installed RDS: disabled Disk Space Information (for Installation Target): Required: 403,194,052 bytes Available: 1,651,998,720 bytes PRESS <ENTER> TO CONTINUE: =============================================================================== Installing... ------------- [==================|==================|==================|==================] [------------------|------------------|------------------|------------------] =============================================================================== Installation Complete --------------------- You have successfully completed the first step in installing Macromedia ColdFusion MX 7. To continue with your installation, go to /opt/coldfusionmx7/bin and type "./coldfusion start" to start your server. Once the server is started log in to the Configuration Wizard at http://[machinename]:8500/CFIDE/administrator/index.cfm PRESS <ENTER> TO EXIT THE INSTALLER: debian:~#
Base installation has been completed. Now we can start ColdFusion server first time.
debian:~# /opt/coldfusionmx7/bin/coldfusion start Starting ColdFusion MX 7... The ColdFusion MX 7 server is starting up and will be available shortly. ====================================================================== ColdFusion MX 7 has been started. ColdFusion MX 7 will write logs to /opt/coldfusionmx7/logs/cfserver.log ====================================================================== debian:~#
Let us check generated ColdFusion server log file.
debian:~# cat /opt/coldfusionmx7/logs/cfserver.log Starting Macromedia JRun 4.0 (Build 92909), coldfusion server 01/09 17:06:28 warning Unable to open /opt/coldfusionmx7/runtime/lib/license.properties 01/09 17:06:31 info JRun Naming Service listening on *:2920 01/09 17:06:31 warning No sessionSecret has been specified in jrun.xml. Installing a self generated sessionSecret. 01/09 17:06:32 info No JDBC data sources have been configured for this server (see jrun-resources.xml) 01/09 17:06:32 info JRun Web Server listening on *:8500 01/09 17:06:32 info Deploying enterprise application "Macromedia ColdFusion MX" from: file:/opt/coldfusionmx7/ 01/09 17:06:33 info Deploying web application "Macromedia Coldfusion MX" from: file:/opt/coldfusionmx7/ 01/09 17:06:37 INFO License Service: Flex 1.5 CF Edition enabled 01/09 17:06:37 INFO Starting Flex 1.5 CF Edition 01/09 17:06:37 user JSPServlet: init 01/09 17:06:38 user CFMxmlServlet: init 01/09 17:06:38 user CFMxmlServlet: Macromedia Flex Build: 87315.134646 01/09 17:06:38 INFO Macromedia Flex Build: 87315.134646 01/09 17:06:42 user ColdFusionStartUpServlet: init 01/09 17:06:42 user ColdFusionStartUpServlet: ColdFusion MX: Starting application services 01/09 17:06:42 user ColdFusionStartUpServlet: ColdFusion MX: VM version = 1.4.2_05-b04 01/09 17:06:42 Information [main] - /opt/coldfusionmx7/logs/server.log initialized 01/09 17:06:42 Information [main] - Starting logging... 01/09 17:06:42 Information [main] - Starting crypto... 01/09 17:06:44 Information [main] - Starting license... 01/09 17:06:44 Information [main] - Starting License server ... 01/09 17:06:50 Information [main] - Starting scheduler... 01/09 17:06:50 Information [main] - Starting WatchService... 01/09 17:06:50 Information [main] - Starting debugging... 01/09 17:06:50 Information [main] - Starting sql... 01/09 17:06:50 Information [main] - Starting mail... 01/09 17:06:50 Information [main] - CORBA Configuration not enabled 01/09 17:06:50 Information [main] - Starting cron... 01/09 17:06:50 Information [main] - Starting registry... 01/09 17:06:51 Information [main] - Starting client... 01/09 17:06:51 Information [main] - Starting xmlrpc... 01/09 17:06:52 Information [main] - Starting graphing... 01/09 17:06:52 Error [main] - Unable to initialize Graphing service: java.lang.UnsatisfiedLinkError: /opt/coldfusionmx7/runtime/jre/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory 01/09 17:06:52 [] - 01/09 17:06:52 Information [main] - Starting verity... 01/09 17:06:53 Information [main] - Starting archive... 01/09 17:06:53 Information [main] - Starting document... 01/09 17:06:54 Information [main] - Starting eventgateway... 01/09 17:06:55 Information [main] - /opt/coldfusionmx7/logs/eventgateway.log initialized 01/09 17:06:55 Information [main] - Starting Event Backend Handlers 01/09 17:06:55 Information [main] - Initialized EventRequestDispatcher with a Thread Pool size of 10 01/09 17:06:55 Information [main] - Initializing EventRequestHandler 01/09 17:06:55 Information [main] - Starting Event Gateways 01/09 17:06:55 Information [main] - ColdFusion started 01/09 17:06:55 user ColdFusionStartUpServlet: ColdFusion MX: application services are now available 01/09 17:06:56 user CFSwfServlet: init 01/09 17:06:56 user CFCServlet: init 01/09 17:06:57 user FlashGateway: init 01/09 17:06:57 user CFFormGateway: init 01/09 17:06:57 user CFInternalServlet: init Server coldfusion ready (startup time: 33 seconds) debian:~#
As you can see there is a problem with "Graphing service" and it could not start. When we reach ColdFusion Administrator pages as "http://[machinename]:8500/CFIDE/administrator/index.cfm" we also get same error as below.
The reason of problem is X libraries that we do not have at our system yet. So we can install with an easy step.
debian:~# apt-get install xlibs
Than restarting ColdFusion server.
debian:~# /opt/coldfusionmx7/bin/coldfusion stop Stopping ColdFusion MX 7, please wait Stopping coldfusion server...stopped ColdFusion MX 7 has been stopped debian:~# /opt/coldfusionmx7/bin/coldfusion start Starting ColdFusion MX 7... The ColdFusion MX 7 server is starting up and will be available shortly. ====================================================================== ColdFusion MX 7 has been started. ColdFusion MX 7 will write logs to /opt/coldfusionmx7/logs/cfserver.log ====================================================================== debian:~#
When we check again "cfserver.log" file we can see that graphing service has been started as expected.
debian:~# cat /opt/coldfusionmx7/logs/cfserver.log Starting Macromedia JRun 4.0 (Build 92909), coldfusion server 01/09 17:21:53 warning Unable to open /opt/coldfusionmx7/runtime/lib/license.properties 01/09 17:21:55 info JRun Naming Service listening on *:2920 01/09 17:21:56 warning No sessionSecret has been specified in jrun.xml. Installing a self generated sessionSecret. 01/09 17:21:56 info No JDBC data sources have been configured for this server (see jrun-resources.xml) 01/09 17:21:56 info JRun Web Server listening on *:8500 01/09 17:21:56 info Deploying enterprise application "Macromedia ColdFusion MX" from: file:/opt/coldfusionmx7/ 01/09 17:21:57 info Deploying web application "Macromedia Coldfusion MX" from: file:/opt/coldfusionmx7/ 01/09 17:21:59 INFO License Service: Flex 1.5 CF Edition enabled 01/09 17:21:59 INFO Starting Flex 1.5 CF Edition 01/09 17:21:59 user JSPServlet: init 01/09 17:22:00 user CFMxmlServlet: init 01/09 17:22:00 user CFMxmlServlet: Macromedia Flex Build: 87315.134646 01/09 17:22:00 INFO Macromedia Flex Build: 87315.134646 01/09 17:22:02 user ColdFusionStartUpServlet: init 01/09 17:22:02 user ColdFusionStartUpServlet: ColdFusion MX: Starting application services 01/09 17:22:02 user ColdFusionStartUpServlet: ColdFusion MX: VM version = 1.4.2_05-b04 01/09 17:22:04 Information [main] - Starting logging... 01/09 17:22:04 Information [main] - Starting crypto... 01/09 17:22:06 Information [main] - Starting license... 01/09 17:22:06 Information [main] - Starting License server ... 01/09 17:22:06 Information [main] - Starting scheduler... 01/09 17:22:06 Information [main] - Starting WatchService... 01/09 17:22:06 Information [main] - Starting debugging... 01/09 17:22:06 Information [main] - Starting sql... 01/09 17:22:06 Information [main] - Starting mail... 01/09 17:22:11 Information [main] - CORBA Configuration not enabled 01/09 17:22:11 Information [main] - Starting cron... 01/09 17:22:11 Information [main] - Starting registry... 01/09 17:22:11 Information [main] - Starting client... 01/09 17:22:11 Information [main] - Starting xmlrpc... 01/09 17:22:12 Information [main] - Starting graphing... 01/09 17:22:14 Information [main] - Starting verity... 01/09 17:22:14 Information [main] - Starting archive... 01/09 17:22:14 Information [main] - Starting document... 01/09 17:22:14 Information [main] - Starting eventgateway... 01/09 17:22:15 Information [main] - Starting Event Backend Handlers 01/09 17:22:15 Information [main] - Initialized EventRequestDispatcher with a Thread Pool size of 10 01/09 17:22:15 Information [main] - Initializing EventRequestHandler 01/09 17:22:15 Information [main] - Starting Event Gateways 01/09 17:22:15 Information [main] - ColdFusion started 01/09 17:22:15 user ColdFusionStartUpServlet: ColdFusion MX: application services are now available 01/09 17:22:15 user CFSwfServlet: init 01/09 17:22:15 user CFCServlet: init 01/09 17:22:16 user FlashGateway: init 01/09 17:22:17 user CFFormGateway: init 01/09 17:22:17 user CFInternalServlet: init Server coldfusion ready (startup time: 26 seconds) debian:~#
As we can see graphing server is ok now.
Now we can get ColdFusion administrator page again without any problem as below as http://[machinename]:8500/CFIDE/administrator/index.cfm
Enter your password that you have defined while installation.
Click OK to reach ColdFusion administrator pages.
Now we have installed ColdFusion with built-in webserver.
It is time to connect ColdFusion with Apache webserver.
Apache Webserver Configuration
If you check "/opt/coldfusionmx7/bin/connectors/" directory there are some connector files that we can use to connect ColdFusion with webservers such as "apache_connector.sh" for Apache webserver. But these files are not compatible with all version of OSs and we need to define our own.But instead of creating a script file I just use following command in order to configure Apache2 on Debian Linux.
debian:~# /opt/coldfusionmx7/runtime/bin/wsconfig -server coldfusion -ws apache -dir /etc/apache2/ -bin /usr/sbin/apache2 -script /usr/sbin/apache2ctl -coldfusion
Server version: Apache/2.0.54
Restarted Apache server
The Apache connector was installed to /etc/apache2
debian:~#
Server version: Apache/2.0.54
Restarted Apache server
The Apache connector was installed to /etc/apache2
debian:~#
OK. Now Apache is also configured.
We can check out Apache configuration file "httpd.conf".
debian:~# cat /etc/apache2/httpd.conf
# This is here for backwards compatability reasons and to support
# installing 3rd party modules directly via apxs2, rather than
# through the /etc/apache2/mods-{available,enabled} mechanism.
#
#LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so
# JRun Settings
LoadModule jrun_module /opt/coldfusionmx7/runtime/lib/wsconfig/1/mod_jrun20.so
<IfModule mod_jrun20.c>
JRunConfig Verbose false
JRunConfig Apialloc false
JRunConfig Ssl false
JRunConfig Ignoresuffixmap false
JRunConfig Serverstore /opt/coldfusionmx7/runtime/lib/wsconfig/1/jrunserver.store
JRunConfig Bootstrap 127.0.0.1:51011
#JRunConfig Errorurl <optionally redirect to this URL on errors>
#JRunConfig ProxyRetryInterval 600
#JRunConfig ConnectTimeout 15
#JRunConfig RecvTimeout 300
#JRunConfig SendTimeout 15
AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf
</IfModule>
debian:~#
Apache has been configured as expected.
We can now deactivate ColdFusion's built-in webserver because we do not need it anymore.
We open "/opt/coldfusionmx7/runtime/servers/coldfusion/SERVER-INF/jrun.xml" file and set following "deactivated" parameter as "true".
... <service class="jrun.servlet.http.WebService" name="WebService"> <attribute name="port">8500</attribute> <attribute name="interface">*</attribute> <attribute name="deactivated">true</attribute> <attribute name="activeHandlerThreads">8</attribute> <attribute name="minHandlerThreads">1</attribute> <attribute name="maxHandlerThreads">1000</attribute> <attribute name="mapCheck">0</attribute> <attribute name="threadWaitTimeout">300</attribute> <attribute name="backlog">500</attribute> <attribute name="timeout">300</attribute> </service> ...
And restart ColdFusion server again. When we check one more with nmap, we can see that port 8500 is already deactivated.
First Test Page
Now we create a test file as "info.cfm" like below and put into our Apache web root "/var/www/".info.cfm
<cfoutput> <cfdump var="#SERVER#" label="Server Variables"> <br /> <cfdump var="#CGI#" label="CGI Variables"> </cfoutput>
And call info.cfm as "http://[machinename]/info.cfm".
Just that! :)
Notes
I will try to create other tutorials for database connection such as MySQL, PostgreSQL or Verity usage etc. on Debian.If you have any question, please do not hesitate to contact with me via "howto@demirkapi.net".