mitmproxy/docs/install.rst

121 lines
3.8 KiB
ReStructuredText
Raw Normal View History

2015-09-04 14:17:55 +00:00
.. _install:
Installation
============
.. _install-ubuntu:
Installation On Ubuntu
----------------------
Ubuntu comes with Python but we need to install pip, python-dev and several libraries.
2016-12-10 19:44:27 +00:00
This was tested on a fully patched installation of Ubuntu 16.04.
2015-09-04 14:17:55 +00:00
.. code:: bash
2016-12-10 19:44:27 +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 pip install --user mitmproxy
2015-09-04 14:17:55 +00:00
2016-12-10 19:44:27 +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``.
2016-02-05 21:59:24 +00:00
2016-12-10 19:44:27 +00:00
Once installation is complete you can run :ref:`mitmproxy` or :ref:`mitmdump` from a terminal.
2015-09-04 14:17:55 +00:00
.. _install-fedora:
Installation On Fedora
----------------------
Fedora comes with Python but we need to install pip, python-dev and several libraries.
2016-12-10 19:44:27 +00:00
This was tested on a fully patched installation of Fedora 24.
.. code:: bash
2016-12-10 19:44:27 +00:00
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 pip install --user mitmproxy
Make sure to have an up-to-date version of pip by running ``pip3 install -U pip``.
Once installation is complete you can run :ref:`mitmproxy` or :ref:`mitmdump` from a terminal.
2015-09-04 14:17:55 +00:00
2016-12-10 19:44:27 +00:00
.. _install-arch:
Installation On Arch Linux
2016-04-30 22:25:02 +00:00
--------------------------
mitmproxy has been added into the [community] repository. Use pacman to install it:
>>> sudo pacman -S mitmproxy
2016-12-10 19:44:27 +00:00
Once installation is complete you can run :ref:`mitmproxy` or :ref:`mitmdump` from a terminal.
2016-12-10 19:44:27 +00:00
.. _install-macos:
2015-09-04 14:17:55 +00:00
2016-12-10 19:44:27 +00:00
Installation On macOS
------------------------
2015-09-04 14:17:55 +00:00
2016-12-10 19:44:27 +00:00
You can use Homebrew to install everything:
.. code:: bash
brew install mitmproxy
2015-09-04 14:17:55 +00:00
2016-12-10 19:44:27 +00:00
Or you can download the pre-built binary packages from `mitmproxy.org`_.
2015-09-04 14:17:55 +00:00
Once installation is complete you can run :ref:`mitmproxy` or :ref:`mitmdump` from a terminal.
2016-12-10 19:44:27 +00:00
.. _install-windows:
2015-09-04 14:17:55 +00:00
Installation On Windows
-----------------------
.. note::
Please note that mitmdump is the only component of mitmproxy that is supported on Windows at
the moment.
**There is no interactive user interface on Windows.**
First, install the latest version of Python 3.5 from the `Python website`_.
If you already have an older version of Python 3.5 installed, make sure to install pip_
(pip is included in Python by default). If pip aborts with an error, make sure you are using the current version of pip.
2016-12-10 19:44:27 +00:00
.. code:: powershell
python -m pip install --upgrade pip
2015-09-04 14:17:55 +00:00
Next, add Python and the Python Scripts directory to your **PATH** variable.
You can do this easily by running the following in powershell:
2016-12-10 19:44:27 +00:00
.. code:: powershell
[Environment]::SetEnvironmentVariable("Path", "$env:Path;C:\Python27;C:\Python27\Scripts", "User")
2015-09-04 14:17:55 +00:00
Now, you can install mitmproxy by running
2016-12-10 19:44:27 +00:00
.. code:: powershell
pip install mitmproxy
2015-09-04 14:17:55 +00:00
Once the installation is complete, you can run :ref:`mitmdump` from a command prompt.
2016-12-10 19:44:27 +00:00
.. _install-source:
Installation From Source
------------------------
2015-09-04 14:17:55 +00:00
If you would like to install mitmproxy directly from the master branch on GitHub or would like to
2016-12-10 19:44:27 +00:00
get set up to contribute to the project, install the dependencies as you would for a regular
mitmproxy installation. Then see the Hacking_ section of the README on GitHub.
You can check your system information by running: ``mitmproxy --sysinfo``
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
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