|
Installation
This page gives detailed instructions to compile and install the Canopy Web server. Once the software is installed, you will need to configure it according to your needs. See the Configuration page for details on configuring Canopy. RequirementsThe following requirements have to be met in order to compile and run the Canopy Web server:
Some of the modules that ship with the installation sometimes require extra software to be installed; for example, the mod_java module needs a full installation of the Java Runtime Environment and Development Kit. Requirements for these modules are listed as part of their documentation. If you do not have a BSD-compatible make(1) tool installed on your system, you can get a port of the NetBSD version known as bmake here. Because the Canopy distribution ships with its own .mk files, you do not need to install the .mk files that ship with bmake, unless you want to use it for other projects. Installing from sourceDownload the source codeIf you do not have a distribution tarball, you can get the most recent file in the Downloads section of this project. The Canopy distribution files follow the pattern canopy-X.x.tar.gz where X and x are the major and minor version numbers, respectively. In most cases, you will want to get the release with the highest major and minor numbers. Unpackage the archive fileOnce you have the tar archive file, you need to extract all of the files that it contains in a directory suitable for compiling. This is accomplished with the tar(1) command, which is found on most UNIX systems. For these instructions, we will put the output source tree in the /tmp directory (this is what the -C directive to tar is for). phrakt@dev:/tmp$ tar -C /tmp -xzf canopy-X.x.tar.gz Once the extraction is complete, you should have a canopy-X.x directory: phrakt@dev:/tmp$ ls -l total 0 drwxr-xr-x 2 phrakt phrakt 48 2007-04-25 18:55 canopy-0.1 phrakt@dev:/tmp$ You are now ready to compile the source tree! Compile the source treeGo into the src directory located under the root directory of the distribution and run the make command (if you installed bmake, you should run the bmake command): phrakt@dev:/tmp$ cd canopy-0.1/src phrakt@dev:src$ make You should see the commands that are executed as the source tree gets compiled. If you run into any kind of compilation error, you should first refer to the FAQ for any known issues, and report the issue if there is no entry covering that error. To make sure you have compiled everything, you can run a second pass of make and the output should look like this: phrakt@dev:src$ make ===> lib ===> lib/canopy ===> lib/http ===> modules ===> modules/mod_cgi ===> modules/mod_perl ===> sbin ===> sbin/canopyctl ===> sbin/httpd phrakt@dev:src$ You are now ready to install the compiled software on your system! Install the softwareBefore installing, you should choose where you want the software to install itself. By default, Canopy is well-behaved and will install itself under the /usr/local directory. Libraries are placed in /usr/local/lib, the configuration files are put under /usr/local/etc, etc. In the following example, I use the sudo(1) command to run the installation because my regular user does not have the privileges to install the files in the default target directories. The output below is just an idea of what to expect; the list of files actually installed on your system will depend on your version. phrakt@dev:src$ sudo make install ===> lib ===> lib/canopy install -c -o root -g bin -m 600 libcanopy.a /usr/local/lib/libcanopy.a ranlib -t /usr/local/lib/libcanopy.a chmod 444 /usr/local/lib/libcanopy.a install -c -o root -g bin -m 600 libcanopy_p.a /usr/local/lib ranlib -t /usr/local/lib/libcanopy_p.a chmod 444 /usr/local/lib/libcanopy_p.a install -c -o root -g bin -m 600 libcanopy_pic.a /usr/local/lib ranlib -t /usr/local/lib/libcanopy_pic.a chmod 444 /usr/local/lib/libcanopy_pic.a install -c -o root -g bin -m 444 libcanopy.so.1.0 /usr/local/lib ln -fs /usr/local/lib/libcanopy.so.1.0 /usr/local/lib/libcanopy.so ===> lib/http install -c -o root -g bin -m 600 libhttp.a /usr/local/lib/libhttp.a ranlib -t /usr/local/lib/libhttp.a chmod 444 /usr/local/lib/libhttp.a install -c -o root -g bin -m 600 libhttp_p.a /usr/local/lib ranlib -t /usr/local/lib/libhttp_p.a chmod 444 /usr/local/lib/libhttp_p.a install -c -o root -g bin -m 600 libhttp_pic.a /usr/local/lib ranlib -t /usr/local/lib/libhttp_pic.a chmod 444 /usr/local/lib/libhttp_pic.a install -c -o root -g bin -m 444 libhttp.so.0.1 /usr/local/lib ln -fs /usr/local/lib/libhttp.so.0.1 /usr/local/lib/libhttp.so install -c -o root -g bin -m 444 http.cat3 /usr/local/share/man/cat3/http.0 install -c -o root -g bin -m 444 http_conn.cat3 /usr/local/share/man/cat3/http_conn.0 install -c -o root -g bin -m 444 http_date.cat3 /usr/local/share/man/cat3/http_date.0 install -c -o root -g bin -m 444 http_msg.cat3 /usr/local/share/man/cat3/http_msg.0 ===> sbin ===> sbin/httpd install -c -s -o root -g bin -m 555 canopy /usr/local/sbin/canopy install -c -o root -g bin -m 444 canopy.cat8 /usr/local/share/man/cat8/canopy.0 phrakt@dev:src$ There might be a reason why you cannot install in the default directories. For example, if you do not have the required privileges to install, you may want to install the software in your home directory and run it entirely from there. Or you might want to reuse an existing filesystem layout without having to move things around too much. You can do this by specifying the base path like this: phrakt@dev:src$ make install DESTDIR=/home/phrakt/foo The Canopy Web server is now installed on your system! The next logical step would be to go read the Configuration Wiki page. It will explain how to properly configure the server for your environment and how to setup automatic startup on system initialization. Installing from a packageThere are currently no released packages. This section will be filled as Canopy becomes available in package formats such as RPM, Deb and BSDpkg for distributions. Building a packageThe package file specifications for each format are kept under the dist/ directory of the distribution tree. This allows you to build your own packages if your system is supported. |