This tutorial will explain to you in detail how to install
Apache 2 and ColdFusion MX 6.1 and how to get them to work together on redhat/mandrake/suse. It may
work on others but these are the 3 distros that I have tested.
---Getting your packages---
First you will need to obtain your packages.
Apache 2 (http://httpd.apache.org/download.cgi)
Coldfusion Mx 6.1 (http://www.macromedia.com/downloads/)
*note it is best to just download your files your home directory for the time being.
For this tutorial I will be using Apache 2.0.53
---Setting Foundation----
Next we need to obtain root access to the server via either terminal window or via putty
(http://www.chiark.greenend.org.uk/~sgtatham/putty/).
To obtain root via a terminal window you will want to use the following commands.
(please note that the [root@webserver root]$ is just used to show your prompt, it could also be a
[root@webserver root]# or something similar when you are in root)
[user@webserver home]$su -
password: <enter your root password here> |
Now that you have obtained root, you will next want to create a new directory named temp. Most
people use /tmp, but I prefer to have a folder named /temp.
To create your new directory use the following commands.
[root@webserver /]$ cd .. (this will take you to your / directory)
[root@webserver /]$ mkdir temp (creates a new directory named temp in your / directory)
[root@webserver /]$ chmod 775 temp (grants rwxrwxrw- permissions to the new directory)
[root@webserver /]$ chown root.root temp (sets the owner of /temp to the user root and the group root) |
---Moving Packages---
Ok now that we have our foundation setup it is time to move your files to your new directory. You
can do this with the follwing commands
[root@webserver /]$ cd /home/user/
[root@webserver user]$ cp httpd-2.0.53.tar.gz /temp (copies the apache package to the /temp
direcotry)
[root@webserver user]$ rm httpd-2.0.53.tar.gz (removes the apache package)
[root@webserver user]$ cp coldfusionmx-6.1.bin /temp (copies the coldfusion package to the /temp directory)
[root@webserver user]$ rm coldfusionmx-6.1.bin (removes the coldfusion package)
[root@webserver user]$ cd /temp (changes your directory to the /temp directory) |
---Preparing Packages---
Now that we have our foundation setup, and our packages in the right place we are ready to start the install
process.
We will start with apache first. First we will want to untar the apache package.
We will do this by using the following command.
[root@webserver temp]$ tar
-zxvf httpd-2.0.53.tar.gz
[root@webserver temp]$ cd httpd-2.0.53 (changes directory to the new httpd-2.0.53 folder) |
Now we are ready to install. Use the following commands to start your install process.
*note Replace PREFIX with the filesystem path under which
Apache should be installed. A typical installation
might use "/usr/local/apache2" for PREFIX (without the
quotes).
[root@webserver httpd-2.0.53]$ ./configure --prefix=PREFIX
[root@webserver httpd-2.0.53]$ make
[root@webserver httpd-2.0.53]$ make install
[root@webserver httpd-2.0.53]$ PREFIX/bin/apachectl start |
Ok now that we have apache installed, we are ready to install
ColdFusion. You can do this by using the following
commands.
* note that I am using ColdFusion MX 6.1, your file name may be different)
[root@webserver httpd-2.0.53]$ cd .. (changes directory to the /temp directory)
[root@webserver temp]$ chmod 775 coldfusionmx-6.1.bin (sets the permissions to
rwxrwxrw-)
[root@webserver temp]$ ./coldfusion-6.1.bin (this starts the install process) |
During install you will want to make sure that you choose, developers edition (unless you have a standard or
enterprise version), also make sure that you DO NOT install any web connectors. Just install it to defualt
built in webserver for now. Also it is best to just install coldfusion to the default directory of /opt/coldfusionmx.
Now that you have coldfusion installed, we need to start the server up, you can do so with the following commands.
[root@webserver temp]$cd
/opt/coldfusionmx (if you installed to the default directory, otherwise substitute your
install directory)
[root@webserver coldfusionmx]$cd bin
[root@webserver bin]$ ./coldfusion start (this will start your server)
|
Now we need to copy the CFIDE and cfdocs directories to the apache server. You can do this by using the following commands.
[root@webserver bin]$ cd ..
[root@webserver coldfusionmx]$ cd wwwroot
[root@webserver wwwroot]$ cp CFIDE /usr/local/apache2/htdocs/
[root@webserver wwwroot]$ cp cfdocs /usr/local/apache2/htdocs/ |
---Installing Connectors---
Now that both your coldfusion and apache servers are installed, it is time to install the coldfusion
connectors for apache. Use the following commands. We are going to start in base / directory.
[root@webserver bin]$ cd /
[root@webserver /]$ cd /opt/coldfusionmx/bin/connectors/
[root@webserver coldfusionmx]$ apache_connetor.sh |
This will build your apache connector. However, if you installed apache to a directory other then what I have used
you will need to edit the apache_connector.sh file and substitute your apache install directory with your information.
---Finalizing Installation---
Now your coldfusion and apache server is almost ready to go. The last thing that you will need to do is add index.cfm
to your vitual hosts. For this tutorial I am using namedvirutalhosts. See the example below. You can find this file in
your /usr/local/apache2/conf/ folder (if you did not us the defualt directory substitute your information)
<VirtualHost *:80>
ServerName www.foo.com
ServerAlias foo.com *.foo.com
DirectoryIndex index.html index.htm index.cfm (this was added)
DocumentRoot "/usr/local/apache2/htdocs/foo"
UserDir "/usr/local/apache2/htdocs/foo"
</VirtualHost>
|
Now that you have both apache and coldfusion installed, and your connectors in place. You need to restart your apache
server so that your changes will be reflected.You can do this by using the commands. We will be starting from the base /
directory.
[root@webserver /]$ cd
/usr/local/apache2/bin
[root@webserver bin]$ ./apachectl stop
[root@webserver bin]$ ./apachectl start |
You can find more information on how to setup virtual hosts, and namedvirtualhosts on the
apache website.