##// END OF EJS Templates
docs: add information about extra dependencies we now need...
Andrew Shadura -
r5964:23057179 default
parent child Browse files
Show More
@@ -1,124 +1,140 b''
1 .. _installation:
1 .. _installation:
2
2
3 ==========================
3 ==========================
4 Installation on Unix/Linux
4 Installation on Unix/Linux
5 ==========================
5 ==========================
6
6
7 The following describes three different ways of installing Kallithea:
7 The following describes three different ways of installing Kallithea:
8
8
9 - :ref:`installation-source`: The simplest way to keep the installation
9 - :ref:`installation-source`: The simplest way to keep the installation
10 up-to-date and track any local customizations is to run directly from
10 up-to-date and track any local customizations is to run directly from
11 source in a Kallithea repository clone, preferably inside a virtualenv
11 source in a Kallithea repository clone, preferably inside a virtualenv
12 virtual Python environment.
12 virtual Python environment.
13
13
14 - :ref:`installation-virtualenv`: If you prefer to only use released versions
14 - :ref:`installation-virtualenv`: If you prefer to only use released versions
15 of Kallithea, the recommended method is to install Kallithea in a virtual
15 of Kallithea, the recommended method is to install Kallithea in a virtual
16 Python environment using `virtualenv`. The advantages of this method over
16 Python environment using `virtualenv`. The advantages of this method over
17 direct installation is that Kallithea and its dependencies are completely
17 direct installation is that Kallithea and its dependencies are completely
18 contained inside the virtualenv (which also means you can have multiple
18 contained inside the virtualenv (which also means you can have multiple
19 installations side by side or remove it entirely by just removing the
19 installations side by side or remove it entirely by just removing the
20 virtualenv directory) and does not require root privileges.
20 virtualenv directory) and does not require root privileges.
21
21
22 - :ref:`installation-without-virtualenv`: The alternative method of installing
22 - :ref:`installation-without-virtualenv`: The alternative method of installing
23 a Kallithea release is using standard pip. The package will be installed in
23 a Kallithea release is using standard pip. The package will be installed in
24 the same location as all other Python packages you have ever installed. As a
24 the same location as all other Python packages you have ever installed. As a
25 result, removing it is not as straightforward as with a virtualenv, as you'd
25 result, removing it is not as straightforward as with a virtualenv, as you'd
26 have to remove its dependencies manually and make sure that they are not
26 have to remove its dependencies manually and make sure that they are not
27 needed by other packages.
27 needed by other packages.
28
28
29 Regardless of the installation method you may need to make sure you have
30 appropriate development packages installed, as installation of some of the
31 Kallithea dependencies requires a working C compiler and libffi library
32 headers. Depending on your configuration, you may also need to install
33 Git and development packages for the database of your choice.
34
35 For Debian and Ubuntu, the following command will ensure that a reasonable
36 set of dependencies is installed::
37
38 sudo apt-get install build-essential git python-pip python-virtualenv libffi-dev python-dev
39
40 For Fedora and RHEL-derivatives, the following command will ensure that a
41 reasonable set of dependencies is installed::
42
43 sudo yum install gcc git python-pip python-virtualenv libffi-devel python-devel
44
29 .. _installation-source:
45 .. _installation-source:
30
46
31
47
32 Installation from repository source
48 Installation from repository source
33 -----------------------------------
49 -----------------------------------
34
50
35 To install Kallithea in a virtualenv_ using the stable branch of the development
51 To install Kallithea in a virtualenv_ using the stable branch of the development
36 repository, follow the instructions below::
52 repository, follow the instructions below::
37
53
38 hg clone https://kallithea-scm.org/repos/kallithea -u stable
54 hg clone https://kallithea-scm.org/repos/kallithea -u stable
39 cd kallithea
55 cd kallithea
40 virtualenv ../kallithea-venv
56 virtualenv ../kallithea-venv
41 source ../kallithea-venv/bin/activate
57 source ../kallithea-venv/bin/activate
42 pip install --upgrade pip setuptools
58 pip install --upgrade pip setuptools
43 pip install -e .
59 pip install -e .
44 python2 setup.py compile_catalog # for translation of the UI
60 python2 setup.py compile_catalog # for translation of the UI
45
61
46 You can now proceed to :ref:`setup`.
62 You can now proceed to :ref:`setup`.
47
63
48 .. _installation-virtualenv:
64 .. _installation-virtualenv:
49
65
50
66
51 Installing a released version in a virtualenv
67 Installing a released version in a virtualenv
52 ---------------------------------------------
68 ---------------------------------------------
53
69
54 It is highly recommended to use a separate virtualenv_ for installing Kallithea.
70 It is highly recommended to use a separate virtualenv_ for installing Kallithea.
55 This way, all libraries required by Kallithea will be installed separately from your
71 This way, all libraries required by Kallithea will be installed separately from your
56 main Python installation and other applications and things will be less
72 main Python installation and other applications and things will be less
57 problematic when upgrading the system or Kallithea.
73 problematic when upgrading the system or Kallithea.
58 An additional benefit of virtualenv_ is that it doesn't require root privileges.
74 An additional benefit of virtualenv_ is that it doesn't require root privileges.
59
75
60 - Assuming you have installed virtualenv_, create a new virtual environment
76 - Assuming you have installed virtualenv_, create a new virtual environment
61 for example, in `/srv/kallithea/venv`, using the virtualenv command::
77 for example, in `/srv/kallithea/venv`, using the virtualenv command::
62
78
63 virtualenv /srv/kallithea/venv
79 virtualenv /srv/kallithea/venv
64
80
65 - Activate the virtualenv_ in your current shell session and make sure the
81 - Activate the virtualenv_ in your current shell session and make sure the
66 basic requirements are up-to-date by running::
82 basic requirements are up-to-date by running::
67
83
68 source /srv/kallithea/venv/bin/activate
84 source /srv/kallithea/venv/bin/activate
69 pip install --upgrade pip setuptools
85 pip install --upgrade pip setuptools
70
86
71 .. note:: You can't use UNIX ``sudo`` to source the ``virtualenv`` script; it
87 .. note:: You can't use UNIX ``sudo`` to source the ``virtualenv`` script; it
72 will "activate" a shell that terminates immediately. It is also perfectly
88 will "activate" a shell that terminates immediately. It is also perfectly
73 acceptable (and desirable) to create a virtualenv as a normal user.
89 acceptable (and desirable) to create a virtualenv as a normal user.
74
90
75 .. note:: Some dependencies are optional. If you need them, install them in
91 .. note:: Some dependencies are optional. If you need them, install them in
76 the virtualenv too::
92 the virtualenv too::
77
93
78 pip install psycopg2
94 pip install psycopg2
79 pip install python-ldap
95 pip install python-ldap
80
96
81 This might require installation of development packages using your
97 This might require installation of development packages using your
82 distribution's package manager.
98 distribution's package manager.
83
99
84 - Make a folder for Kallithea data files, and configuration somewhere on the
100 - Make a folder for Kallithea data files, and configuration somewhere on the
85 filesystem. For example::
101 filesystem. For example::
86
102
87 mkdir /srv/kallithea
103 mkdir /srv/kallithea
88
104
89 - Go into the created directory and run this command to install Kallithea::
105 - Go into the created directory and run this command to install Kallithea::
90
106
91 pip install kallithea
107 pip install kallithea
92
108
93 Alternatively, download a .tar.gz from http://pypi.python.org/pypi/Kallithea,
109 Alternatively, download a .tar.gz from http://pypi.python.org/pypi/Kallithea,
94 extract it and run::
110 extract it and run::
95
111
96 pip install .
112 pip install .
97
113
98 - This will install Kallithea together with pylons_ and all other required
114 - This will install Kallithea together with pylons_ and all other required
99 python libraries into the activated virtualenv.
115 python libraries into the activated virtualenv.
100
116
101 You can now proceed to :ref:`setup`.
117 You can now proceed to :ref:`setup`.
102
118
103 .. _installation-without-virtualenv:
119 .. _installation-without-virtualenv:
104
120
105
121
106 Installing a released version without virtualenv
122 Installing a released version without virtualenv
107 ------------------------------------------------
123 ------------------------------------------------
108
124
109 For installation without virtualenv, 'just' use::
125 For installation without virtualenv, 'just' use::
110
126
111 pip install kallithea
127 pip install kallithea
112
128
113 Note that this method requires root privileges and will install packages
129 Note that this method requires root privileges and will install packages
114 globally without using the system's package manager.
130 globally without using the system's package manager.
115
131
116 To install as a regular user in ``~/.local``, you can use::
132 To install as a regular user in ``~/.local``, you can use::
117
133
118 pip install --user kallithea
134 pip install --user kallithea
119
135
120 You can now proceed to :ref:`setup`.
136 You can now proceed to :ref:`setup`.
121
137
122
138
123 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
139 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
124 .. _pylons: http://www.pylonsproject.org/
140 .. _pylons: http://www.pylonsproject.org/
General Comments 0
You need to be logged in to leave comments. Login now