/usr/share/doc/python-cherrypy3-doc/html/install.html is in python-cherrypy3-doc 8.9.1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Installation — CherryPy 8.9.1 documentation</title>
<link rel="stylesheet" href="_static/classic.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '8.9.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Tutorials" href="tutorials.html" />
<link rel="prev" title="Foreword" href="intro.html" />
</head>
<body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="tutorials.html" title="Tutorials"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="intro.html" title="Foreword"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">CherryPy 8.9.1 documentation</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="installation">
<h1><a class="toc-backref" href="#id1">Installation</a><a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h1>
<p>CherryPy is a pure Python library. This has various consequences:</p>
<blockquote>
<div><ul class="simple">
<li>It can run anywhere Python runs</li>
<li>It does not require a C compiler</li>
<li>It can run on various implementations of the Python language: <a class="reference external" href="http://python.org/">CPython</a>,
<a class="reference external" href="http://ironpython.net/">IronPython</a>, <a class="reference external" href="http://www.jython.org/">Jython</a> and <a class="reference external" href="http://pypy.org/">PyPy</a></li>
</ul>
</div></blockquote>
<div class="contents topic" id="contents">
<p class="topic-title first">Contents</p>
<ul class="simple">
<li><a class="reference internal" href="#installation" id="id1">Installation</a><ul>
<li><a class="reference internal" href="#requirements" id="id2">Requirements</a></li>
<li><a class="reference internal" href="#supported-python-version" id="id3">Supported python version</a></li>
<li><a class="reference internal" href="#installing" id="id4">Installing</a><ul>
<li><a class="reference internal" href="#test-your-installation" id="id5">Test your installation</a></li>
</ul>
</li>
<li><a class="reference internal" href="#run-it" id="id6">Run it</a><ul>
<li><a class="reference internal" href="#cherryd" id="id7">cherryd</a><ul>
<li><a class="reference internal" href="#command-line-options" id="id8">Command-Line Options</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="requirements">
<h2><a class="toc-backref" href="#id2">Requirements</a><a class="headerlink" href="#requirements" title="Permalink to this headline">¶</a></h2>
<p>CherryPy does not have any mandatory requirements. However certain features it comes with
will require you install certain packages. To simplify installing additional
dependencies CherryPy enables you to specify extras in your requirements (e.g.
<code class="docutils literal"><span class="pre">cherrypy[json,routes_dispatcher,ssl]</span></code>):
- doc – for documentation related stuff
- json – for custom <a class="reference external" href="https://github.com/simplejson/simplejson">JSON processing library</a>
- routes_dispatcher – <a class="reference external" href="http://routes.readthedocs.org/en/latest/">routes</a> for declarative URL mapping dispatcher
- ssl – for <a class="reference external" href="https://github.com/pyca/pyopenssl">OpenSSL bindings</a>, useful in Python environments not having the builtin <code class="xref py py-mod docutils literal"><span class="pre">ssl</span></code> module
- testing
- memcached_session – enables <a class="reference external" href="https://github.com/linsomniac/python-memcached">memcached</a> backend session
- xcgi</p>
</div>
<div class="section" id="supported-python-version">
<h2><a class="toc-backref" href="#id3">Supported python version</a><a class="headerlink" href="#supported-python-version" title="Permalink to this headline">¶</a></h2>
<p>CherryPy supports Python 2.7 through to 3.5.</p>
</div>
<div class="section" id="installing">
<h2><a class="toc-backref" href="#id4">Installing</a><a class="headerlink" href="#installing" title="Permalink to this headline">¶</a></h2>
<p>CherryPy can be easily installed via common Python package managers such as setuptools or pip.</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ easy_install cherrypy
</pre></div>
</div>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ pip install cherrypy
</pre></div>
</div>
<p>You may also get the latest CherryPy version by grabbing the source code from Github:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ git clone https://github.com/cherrypy/cherrypy
$ <span class="nb">cd</span> cherrypy
$ python setup.py install
</pre></div>
</div>
<div class="section" id="test-your-installation">
<h3><a class="toc-backref" href="#id5">Test your installation</a><a class="headerlink" href="#test-your-installation" title="Permalink to this headline">¶</a></h3>
<p>CherryPy comes with a set of simple tutorials that can be executed
once you have deployed the package.</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ python -m cherrypy.tutorial.tut01_helloworld
</pre></div>
</div>
<p>Point your browser at <a class="reference external" href="http://127.0.0.1:8080">http://127.0.0.1:8080</a> and enjoy the magic.</p>
<p>Once started the above command shows the following logs:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span><span class="o">[</span><span class="m">15</span>/Feb/2014:21:51:22<span class="o">]</span> ENGINE Listening <span class="k">for</span> SIGHUP.
<span class="o">[</span><span class="m">15</span>/Feb/2014:21:51:22<span class="o">]</span> ENGINE Listening <span class="k">for</span> SIGTERM.
<span class="o">[</span><span class="m">15</span>/Feb/2014:21:51:22<span class="o">]</span> ENGINE Listening <span class="k">for</span> SIGUSR1.
<span class="o">[</span><span class="m">15</span>/Feb/2014:21:51:22<span class="o">]</span> ENGINE Bus STARTING
<span class="o">[</span><span class="m">15</span>/Feb/2014:21:51:22<span class="o">]</span> ENGINE Started monitor thread <span class="s1">'Autoreloader'</span>.
<span class="o">[</span><span class="m">15</span>/Feb/2014:21:51:22<span class="o">]</span> ENGINE Started monitor thread <span class="s1">'_TimeoutMonitor'</span>.
<span class="o">[</span><span class="m">15</span>/Feb/2014:21:51:22<span class="o">]</span> ENGINE Serving on http://127.0.0.1:8080
<span class="o">[</span><span class="m">15</span>/Feb/2014:21:51:23<span class="o">]</span> ENGINE Bus STARTED
</pre></div>
</div>
<p>We will explain what all those lines mean later on, but suffice
to know that once you see the last two lines, your server
is listening and ready to receive requests.</p>
</div>
</div>
<div class="section" id="run-it">
<h2><a class="toc-backref" href="#id6">Run it</a><a class="headerlink" href="#run-it" title="Permalink to this headline">¶</a></h2>
<p>During development, the easiest path is to run your application as
follow:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ python myapp.py
</pre></div>
</div>
<p>As long as <cite>myapp.py</cite> defines a <cite>“__main__”</cite> section, it will
run just fine.</p>
<div class="section" id="cherryd">
<h3><a class="toc-backref" href="#id7">cherryd</a><a class="headerlink" href="#cherryd" title="Permalink to this headline">¶</a></h3>
<p>Another way to run the application is through the <code class="docutils literal"><span class="pre">cherryd</span></code> script
which is installed along side CherryPy.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">This utility command will not concern you if you embed your
application with another framework.</p>
</div>
<div class="section" id="command-line-options">
<h4><a class="toc-backref" href="#id8">Command-Line Options</a><a class="headerlink" href="#command-line-options" title="Permalink to this headline">¶</a></h4>
<dl class="cmdoption">
<dt id="cmdoption-cherryd-c">
<code class="descname">-c</code><code class="descclassname"></code><code class="descclassname">, </code><code class="descname">--config</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-cherryd-c" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify config file(s)</p>
</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-cherryd-d">
<code class="descname">-d</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-cherryd-d" title="Permalink to this definition">¶</a></dt>
<dd><p>Run the server as a daemon</p>
</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-cherryd-e">
<code class="descname">-e</code><code class="descclassname"></code><code class="descclassname">, </code><code class="descname">--environment</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-cherryd-e" title="Permalink to this definition">¶</a></dt>
<dd><p>Apply the given config environment (defaults to None)</p>
</dd></dl>
<span class="target" id="index-0"></span><dl class="cmdoption">
<dt id="cmdoption-cherryd-f">
<code class="descname">-f</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-cherryd-f" title="Permalink to this definition">¶</a></dt>
<dd><p>Start a <span class="xref std std-ref">FastCGI</span> server instead of the default HTTP server</p>
</dd></dl>
<span class="target" id="index-1"></span><dl class="cmdoption">
<dt id="cmdoption-cherryd-s">
<code class="descname">-s</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-cherryd-s" title="Permalink to this definition">¶</a></dt>
<dd><p>Start a SCGI server instead of the default HTTP server</p>
</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-cherryd-i">
<code class="descname">-i</code><code class="descclassname"></code><code class="descclassname">, </code><code class="descname">--import</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-cherryd-i" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify modules to import</p>
</dd></dl>
<span class="target" id="index-2"></span><dl class="cmdoption">
<dt id="cmdoption-cherryd-p">
<code class="descname">-p</code><code class="descclassname"></code><code class="descclassname">, </code><code class="descname">--pidfile</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-cherryd-p" title="Permalink to this definition">¶</a></dt>
<dd><p>Store the process id in the given file (defaults to None)</p>
</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-cherryd-path">
<code class="descname">-P</code><code class="descclassname"></code><code class="descclassname">, </code><code class="descname">--Path</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-cherryd-path" title="Permalink to this definition">¶</a></dt>
<dd><p>Add the given paths to sys.path</p>
</dd></dl>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Installation</a><ul>
<li><a class="reference internal" href="#requirements">Requirements</a></li>
<li><a class="reference internal" href="#supported-python-version">Supported python version</a></li>
<li><a class="reference internal" href="#installing">Installing</a><ul>
<li><a class="reference internal" href="#test-your-installation">Test your installation</a></li>
</ul>
</li>
<li><a class="reference internal" href="#run-it">Run it</a><ul>
<li><a class="reference internal" href="#cherryd">cherryd</a><ul>
<li><a class="reference internal" href="#command-line-options">Command-Line Options</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="intro.html"
title="previous chapter">Foreword</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="tutorials.html"
title="next chapter">Tutorials</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/install.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="tutorials.html" title="Tutorials"
>next</a> |</li>
<li class="right" >
<a href="intro.html" title="Foreword"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">CherryPy 8.9.1 documentation</a> »</li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2001-2018 CherryPy Team.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.6.
</div>
</body>
</html>
|