~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to docs/administration/drizzled.rst

  • Committer: Mark Atwood
  • Date: 2012-01-04 16:59:32 UTC
  • mfrom: (2478.2.3 real-key-use-catalog)
  • Revision ID: me@mark.atwood.name-20120104165932-cm0xqs4by0u3p4cy
mergeĀ lp:~stewart/drizzle/key-use-catalog

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.. program:: drizzled
 
2
 
 
3
.. _drizzled_process:
 
4
 
 
5
drizzled Process
 
6
================
 
7
 
 
8
.. _starting_and_stopping_drizzled:
 
9
 
 
10
Starting and Stopping
 
11
---------------------
 
12
 
 
13
Although :program:`drizzled` can be started without any command line options
 
14
or config files, you will certainly want to specify a minimal configuration
 
15
to suite your particular system.  You should be familiar with the
 
16
:ref:`drizzled_configuration` options and variables.
 
17
 
 
18
Managing the :program:`drizzled` process depends on whether Drizzle
 
19
was installed from a package or source.  Package installations can use
 
20
the operating system's service managment programs, but source installations
 
21
require simple scripts to manage Drizzle manually.
 
22
 
 
23
Ubuntu
 
24
^^^^^^
 
25
 
 
26
Ubuntu uses the :program:`service` program to manage services.  To start
 
27
and stop Drizzle from the command line:
 
28
 
 
29
.. code-block:: bash
 
30
 
 
31
   $ sudo service drizzle start
 
32
   drizzle start/running, process 1431
 
33
 
 
34
   $ sudo service drizzle stop
 
35
   drizzle stop/waiting
 
36
 
 
37
:file:`/etc/init/drizzle.conf` controls how :program:`service` starts
 
38
and stops Drizzle.
 
39
 
 
40
Manually
 
41
^^^^^^^^
 
42
 
 
43
If Drizzle was installed from source, or you want to manage
 
44
:program:`drizzled` manually, you should create a script
 
45
to start Drizzle from the command line.  For example, if Drizzle was
 
46
installed to :file:`/usr/local/drizzle`, this script will start Drizzle
 
47
with a minimal configuration:
 
48
 
 
49
.. code-block:: bash
 
50
 
 
51
   #!/bin/sh
 
52
 
 
53
   BASEDIR="/usr/local/drizzle"
 
54
 
 
55
   cd $BASEDIR
 
56
 
 
57
   ./sbin/drizzled                     \
 
58
      --basedir=$BASEDIR               \
 
59
      --datadir=$BASEDIR/data          \
 
60
      --pid-file=/var/run/drizzled.pid \
 
61
   > $BASEDIR/var/log/drizzled.log 2>&1 &
 
62
 
 
63
See :ref:`configuring_drizzle` for more information about setting additional
 
64
command line options.
 
65
 
 
66
Use the :ref:`drizzle_command_line_client` to stop Drizzle:
 
67
 
 
68
.. code-block:: bash
 
69
 
 
70
   $ drizzle --shutdown
 
71
 
 
72
Or, execute ``shtudown``:
 
73
 
 
74
.. code-block:: mysql
 
75
 
 
76
   drizzle> shutdown;
 
77
 
 
78
The ``shutdown`` command is case-sensitive.
 
79
 
 
80
Output and Logging
 
81
------------------
 
82
 
 
83
:program:`drizzled` does *not* close or redirect output to ``STDOUT`` or
 
84
``STDERR`` to a log file or logging facility like :program:`syslog`.
 
85
When starting Drizzle, you should redirect ``STDOUT`` and ``STDERR`` to a log 
 
86
file or to /dev/null, as in the above script example when starting Drizzle.
 
87
 
 
88
When running :program:`drizzled` manually from a console, just allowing the
 
89
output to be printed for you can of course be useful.
 
90
 
 
91
Note that beginning with the first ``Drizzle 7.1 Beta 2011.10.28`` drizzled
 
92
will also log messages via syslog and this is *in addition* to using ``STDOUT``
 
93
and ``STDERR``.
 
94
 
 
95
 
 
96
Signaling
 
97
---------
 
98
 
 
99
====== ========
 
100
Signal Response
 
101
====== ========
 
102
HUP    Ignore
 
103
TERM   Shutdown
 
104
====== ========
 
105