old-www/HOWTO/Caudium-HOWTO/starting.html

367 lines
7.0 KiB
HTML

<HTML
><HEAD
><TITLE
>Starting</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
"><LINK
REL="HOME"
TITLE="Caudium HOWTO"
HREF="index.html"><LINK
REL="UP"
TITLE="Creating your first server"
HREF="creating.html"><LINK
REL="PREVIOUS"
TITLE="Installing Caudium from sources"
HREF="installing.html"><LINK
REL="NEXT"
TITLE="Stopping from command line"
HREF="stopping.html"></HEAD
><BODY
CLASS="sect1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Caudium HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="installing.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 4. Creating your first server</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="stopping.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="starting">4.2. Starting</H1
><P
>&#13; The first time you install Caudium from the sources, you will need to type the following commands:
</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
><TT
CLASS="computeroutput"
>&#13;# su -
# cd /usr/local/caudium
# ./install
</TT
></PRE
></FONT
></TD
></TR
></TABLE
><P
>&#13; This script will allow you to give login information for the Configuration InterFace (<SPAN
CLASS="abbrev"
>CIF.</SPAN
>), the web based configuration interface, and the port address for the <SPAN
CLASS="abbrev"
>CIF.</SPAN
>. But if you want to start Caudium manually, you don't need to use install, just use the <B
CLASS="command"
>start</B
> script. This script will fork Caudium once and restart it automatically if it dies. A consequence is that if you kill <B
CLASS="command"
>start</B
>, the server will always be running but it will not restart if it dies.
</P
><P
>&#13; There are many useful options to <B
CLASS="command"
>start</B
>. The first is <TT
CLASS="option"
>--help</TT
>. Here is a non-exhaustive list of options:
</P
><P
></P
><UL
><LI
><P
>&#13; <TT
CLASS="option"
>--once</TT
>: Do not fork Caudium and output debug to stdout (screen). If you hit <B
CLASS="keycap"
>CTRL</B
>-<B
CLASS="keycap"
>C</B
>, Caudium will be killed
</P
></LI
><LI
><P
>&#13; <TT
CLASS="option"
>-t</TT
>: Display all Pike calls
</P
></LI
><LI
><P
>&#13; <TT
CLASS="option"
>--gdb</TT
>: Run Caudium inside gdb, useful only for developers.
</P
></LI
><LI
><P
>&#13; <TT
CLASS="option"
>--with-threads</TT
>: Run Caudium with threads (run better on *BSD and Solaris)
</P
></LI
><LI
><P
>&#13; <TT
CLASS="option"
>--without-threads</TT
>: The opposite of <TT
CLASS="option"
>--with-threads</TT
>. It doesn't mean that the Pike scripts/modules aren't able to use threads. It merely means that the Caudium core server will not use threaded handler backend.
</P
></LI
><LI
><P
>&#13; <TT
CLASS="option"
>--with-keep-alive</TT
>: Enable keep-alive in HTTP. In the
old days of the web, the HTTP protocol was simple but not efficient:
one connection was made for each objects requested by a client. That
means a web browser made 20 connections to the webserver if there was
19 images on a webpage and the HTML page itself. This result in
a lot of overhead and response time delay. With keep alive, the server
don't close the connection for each objects so the browser can request
several objects with one HTTP connection and does not need to
reconnect each time. As a result, the website seems to be faster for
the client and the webserver can handle more users.
<DIV
CLASS="note"
><P
></P
><TABLE
CLASS="note"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/note.gif"
HSPACE="5"
ALT="Note"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>&#13; Currently, the keep-alive option doesn't work with CAMAS (I use CAMAS-1.1.7-DEV, Caudium 1.2RC1). Generally speaking, it is also not ready for production use. Here is a comment from Xavier Beaudouin: <A
NAME="AEN301"><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
>keep-alive is somewhat buggy on Caudium. My test shows that high number of connections on keep-alived Caudium show some random dropped returns. I do not recommend using keep-alive. If you'd like keep-alive a "black box" like redline seems the best solution... but expensive.</P
></BLOCKQUOTE
>
</P
></TD
></TR
></TABLE
></DIV
>
</P
></LI
><LI
><P
>&#13; <TT
CLASS="option"
>--config-dir=DIR</TT
>: Allows you to specify where your configuration
files are, where <SPAN
CLASS="QUOTE"
>"DIR"</SPAN
> is the name of the directory holding the configuration
files (typically <TT
CLASS="computeroutput"
>/usr/local/caudium/configurations/</TT
>).
This is a very useful option. For example you can start several Caudium instances
with different configurations by using different configuration
directories. This is also useful if you put the configuration files in a non-standard
directory:
<TT
CLASS="computeroutput"
>&#13;/usr/local/caudium/server/start --config-dir=/home/david/etc/my_caudium_configuration/
</TT
>
For Apache users, this is the equivalent of the <TT
CLASS="option"
>-f</TT
> option but points to
the directory that contains the files.
</P
></LI
></UL
><P
>&#13; Finally, the most important thing is debug log files. These files are stored in <TT
CLASS="filename"
>../logs/debug</TT
> (relative to <TT
CLASS="filename"
>/usr/local/caudium/server</TT
> in our example). The current log file is named <TT
CLASS="filename"
>default.1</TT
>. The log file from the last Caudium start is <TT
CLASS="filename"
>default.2</TT
> and so on. If you didn't enable debug, these files are always used but contain very few messages.
</P
><DIV
CLASS="note"
><P
></P
><TABLE
CLASS="note"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/note.gif"
HSPACE="5"
ALT="Note"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>&#13; The location of files may be different on your system if you are
using a prepackaged version of the software.
</P
></TD
></TR
></TABLE
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="installing.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="stopping.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Installing Caudium from sources</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="creating.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Stopping from command line</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>