mitmproxy/docs/install.rst

153 lines
4.5 KiB
ReStructuredText
Raw Normal View History

2015-09-04 14:17:55 +00:00
.. _install:
Installation
============
Please follow the steps for your operating system.
2015-09-04 14:17:55 +00:00
2016-12-21 21:27:51 +00:00
Once installation is complete, you can run :ref:`mitmproxy`, :ref:`mitmdump` or
:ref:`mitmweb` from a terminal.
2015-09-04 14:17:55 +00:00
.. _install-macos:
Installation on macOS
---------------------
You can use Homebrew to install everything:
2015-09-04 14:17:55 +00:00
.. code:: bash
brew install mitmproxy
2015-09-04 14:17:55 +00:00
2017-01-22 22:50:31 +00:00
Or you can download the pre-built binary packages from our `releases`_.
2016-02-05 21:59:24 +00:00
2015-09-04 14:17:55 +00:00
.. _install-windows:
2015-09-04 14:17:55 +00:00
Installation on Windows
-----------------------
2016-12-21 21:27:51 +00:00
The recommended way to install mitmproxy on Windows is to use the installer
provided at `mitmproxy.org`_. After installation, you'll find shortcuts for
:ref:`mitmweb` (the web-based interface) and :ref:`mitmdump` in the start menu.
Both executables are added to your PATH and can be invoked from the command
line.
.. note::
2017-01-10 10:01:51 +00:00
Mitmproxy's console interface is not supported on Windows, but you can use
2016-12-21 21:27:51 +00:00
mitmweb (the web-based interface) and mitmdump.
.. _install-linux:
Installation on Linux
---------------------
2016-12-10 19:44:27 +00:00
2016-12-21 21:27:51 +00:00
The recommended way to run mitmproxy on Linux is to use the pre-built binaries
2017-01-22 22:50:31 +00:00
provided at `releases`_.
2016-12-21 21:27:51 +00:00
Our pre-built binaries provide you with the latest version of mitmproxy, a
self-contained Python 3.5 environment and a recent version of OpenSSL that
supports HTTP/2. Of course, you can also install mitmproxy from source if you
prefer that (see :ref:`install-advanced`).
2015-09-04 14:17:55 +00:00
.. _install-advanced:
2015-09-04 14:17:55 +00:00
Advanced Installation
---------------------
2016-12-10 19:44:27 +00:00
.. _install-docker:
Docker Images
^^^^^^^^^^^^^
2016-12-21 21:27:51 +00:00
You can also use the official mitmproxy images from `DockerHub`_. That being
said, our portable binaries are just as easy to install and even easier to use. 😊
.. _install-arch:
Installation on Arch Linux
^^^^^^^^^^^^^^^^^^^^^^^^^^
mitmproxy has been added into the [community] repository. Use pacman to install it:
2015-09-04 14:17:55 +00:00
>>> sudo pacman -S mitmproxy
2015-09-04 14:17:55 +00:00
2016-12-11 16:49:07 +00:00
.. _install-source-ubuntu:
2015-09-04 14:17:55 +00:00
Installation from Source on Ubuntu
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2015-09-04 14:17:55 +00:00
2016-12-21 21:27:51 +00:00
Ubuntu comes with Python but we need to install pip3, python3-dev and several
libraries. This was tested on a fully patched installation of Ubuntu 16.04.
2015-09-04 14:17:55 +00:00
.. code:: bash
2015-09-04 14:17:55 +00:00
sudo apt-get install python3-pip python3-dev libffi-dev libssl-dev libtiff5-dev libjpeg8-dev zlib1g-dev libwebp-dev
sudo pip3 install mitmproxy # or pip3 install --user mitmproxy
2015-09-04 14:17:55 +00:00
2016-12-21 21:27:51 +00:00
On older Ubuntu versions, e.g., **12.04** and **14.04**, you may need to install
a newer version of Python. mitmproxy requires Python 3.5 or higher. Please take
a look at pyenv_. Make sure to have an up-to-date version of pip by running
``pip3 install -U pip``.
2015-09-04 14:17:55 +00:00
.. _install-source-fedora:
2015-09-04 14:17:55 +00:00
Installation from Source on Fedora
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2015-09-04 14:17:55 +00:00
2016-12-21 21:27:51 +00:00
Fedora comes with Python but we need to install pip3, python3-dev and several
libraries. This was tested on a fully patched installation of Fedora 24.
2015-09-04 14:17:55 +00:00
.. code:: bash
sudo dnf install make gcc redhat-rpm-config python3-pip python3-devel libffi-devel openssl-devel libtiff-devel libjpeg-devel zlib-devel libwebp-devel openjpeg2-devel
sudo pip3 install mitmproxy # or pip3 install --user mitmproxy
2016-12-11 16:49:07 +00:00
Make sure to have an up-to-date version of pip by running ``pip3 install -U pip``.
2015-09-04 14:17:55 +00:00
2016-12-21 21:27:51 +00:00
.. _install-source-windows:
2015-09-04 14:17:55 +00:00
🐱💻 Installation from Source on Windows
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
2017-01-10 10:01:51 +00:00
Mitmproxy's console interface is not supported on Windows, but you can use
2016-12-21 21:27:51 +00:00
mitmweb (the web-based interface) and mitmdump.
2016-12-11 16:49:07 +00:00
2016-12-21 21:27:51 +00:00
First, install the latest version of Python 3.5 or later from the `Python
website`_. During installation, make sure to select `Add Python to PATH`.
2015-09-04 14:17:55 +00:00
2017-01-10 10:01:51 +00:00
Mitmproxy has no other dependencies on Windows. You can now install mitmproxy by running
2015-09-04 14:17:55 +00:00
2016-12-10 19:44:27 +00:00
.. code:: powershell
2016-12-11 16:49:07 +00:00
pip3 install mitmproxy
2016-12-10 19:44:27 +00:00
2016-12-21 21:27:51 +00:00
.. _install-dev-version:
2016-12-10 19:44:27 +00:00
Latest Development Version
^^^^^^^^^^^^^^^^^^^^^^^^^^
2015-09-04 14:17:55 +00:00
2016-12-21 21:27:51 +00:00
If you would like to install mitmproxy directly from the master branch on GitHub
or would like to get set up to contribute to the project, install the
dependencies as you would for a regular installation from source. Then see the
Hacking_ section of the README on GitHub. You can check your system information
by running: ``mitmproxy --version``
2015-09-04 14:17:55 +00:00
2015-09-16 01:59:06 +00:00
.. _Hacking: https://github.com/mitmproxy/mitmproxy/blob/master/README.rst#hacking
2017-01-22 22:50:31 +00:00
.. _releases: https://github.com/mitmproxy/mitmproxy/releases
2015-09-04 14:17:55 +00:00
.. _mitmproxy.org: https://mitmproxy.org/
.. _`Python website`: https://www.python.org/downloads/windows/
2015-09-07 08:52:18 +00:00
.. _pip: https://pip.pypa.io/en/latest/installing.html
2016-12-10 19:44:27 +00:00
.. _pyenv: https://github.com/yyuu/pyenv
.. _DockerHub: https://hub.docker.com/r/mitmproxy/mitmproxy/