##// END OF EJS Templates
docs: drop documentation for installing without virtualenv...
Mads Kiilerich -
r8454:7982eac0 default
parent child Browse files
Show More
@@ -1,163 +1,142 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 - Kallithea can also be installed with plain pip - globally or with ``--user``
23 a Kallithea release is using standard pip. The package will be installed in
23 or similar. The package will be installed in the same location as all other
24 the same location as all other Python packages you have ever installed. As a
24 Python packages you have ever installed. As a result, removing it is not as
25 result, removing it is not as straightforward as with a virtualenv, as you'd
25 straightforward as with a virtualenv, as you'd have to remove its
26 have to remove its dependencies manually and make sure that they are not
26 dependencies manually and make sure that they are not needed by other
27 needed by other packages.
27 packages. We recommend using virtualenv.
28
28
29 Regardless of the installation method you may need to make sure you have
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
30 appropriate development packages installed, as installation of some of the
31 Kallithea dependencies requires a working C compiler and libffi library
31 Kallithea dependencies requires a working C compiler and libffi library
32 headers. Depending on your configuration, you may also need to install
32 headers. Depending on your configuration, you may also need to install
33 Git and development packages for the database of your choice.
33 Git and development packages for the database of your choice.
34
34
35 For Debian and Ubuntu, the following command will ensure that a reasonable
35 For Debian and Ubuntu, the following command will ensure that a reasonable
36 set of dependencies is installed::
36 set of dependencies is installed::
37
37
38 sudo apt-get install build-essential git libffi-dev python3-dev
38 sudo apt-get install build-essential git libffi-dev python3-dev
39
39
40 For Fedora and RHEL-derivatives, the following command will ensure that a
40 For Fedora and RHEL-derivatives, the following command will ensure that a
41 reasonable set of dependencies is installed::
41 reasonable set of dependencies is installed::
42
42
43 sudo yum install gcc git libffi-devel python3-devel
43 sudo yum install gcc git libffi-devel python3-devel
44
44
45 .. _installation-source:
45 .. _installation-source:
46
46
47
47
48 Installation from repository source
48 Installation from repository source
49 -----------------------------------
49 -----------------------------------
50
50
51 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
52 repository, use the following commands in your bash shell::
52 repository, use the following commands in your bash shell::
53
53
54 hg clone https://kallithea-scm.org/repos/kallithea -u stable
54 hg clone https://kallithea-scm.org/repos/kallithea -u stable
55 cd kallithea
55 cd kallithea
56 python3 -m venv venv
56 python3 -m venv venv
57 . venv/bin/activate
57 . venv/bin/activate
58 pip install --upgrade pip setuptools
58 pip install --upgrade pip setuptools
59 pip install --upgrade -e .
59 pip install --upgrade -e .
60 python3 setup.py compile_catalog # for translation of the UI
60 python3 setup.py compile_catalog # for translation of the UI
61
61
62 .. note::
62 .. note::
63 This will install all Python dependencies into the virtualenv. Kallithea
63 This will install all Python dependencies into the virtualenv. Kallithea
64 itself will however only be installed as a pointer to the source location.
64 itself will however only be installed as a pointer to the source location.
65 The source clone must thus be kept in the same location, and it shouldn't be
65 The source clone must thus be kept in the same location, and it shouldn't be
66 updated to other revisions unless you want to upgrade. Edits in the source
66 updated to other revisions unless you want to upgrade. Edits in the source
67 tree will have immediate impact (possibly after a restart of the service).
67 tree will have immediate impact (possibly after a restart of the service).
68
68
69 You can now proceed to :ref:`install-front-end`.
69 You can now proceed to :ref:`install-front-end`.
70
70
71 .. _installation-virtualenv:
71 .. _installation-virtualenv:
72
72
73
73
74 Installing a released version in a virtualenv
74 Installing a released version in a virtualenv
75 ---------------------------------------------
75 ---------------------------------------------
76
76
77 It is highly recommended to use a separate virtualenv for installing Kallithea.
77 It is highly recommended to use a separate virtualenv for installing Kallithea.
78 This way, all libraries required by Kallithea will be installed separately from your
78 This way, all libraries required by Kallithea will be installed separately from your
79 main Python installation and other applications and things will be less
79 main Python installation and other applications and things will be less
80 problematic when upgrading the system or Kallithea.
80 problematic when upgrading the system or Kallithea.
81 An additional benefit of virtualenv is that it doesn't require root privileges.
81 An additional benefit of virtualenv is that it doesn't require root privileges.
82
82
83 - Don't install as root - install as a dedicated user like ``kallithea``.
83 - Don't install as root - install as a dedicated user like ``kallithea``.
84 If necessary, create the top directory for the virtualenv (like
84 If necessary, create the top directory for the virtualenv (like
85 ``/srv/kallithea/venv``) as root and assign ownership to the user.
85 ``/srv/kallithea/venv``) as root and assign ownership to the user.
86
86
87 Make a parent folder for the virtualenv (and perhaps also Kallithea
87 Make a parent folder for the virtualenv (and perhaps also Kallithea
88 configuration and data files) such as ``/srv/kallithea``. Create the
88 configuration and data files) such as ``/srv/kallithea``. Create the
89 directory as root if necessary and grant ownership to the ``kallithea`` user.
89 directory as root if necessary and grant ownership to the ``kallithea`` user.
90
90
91 - Create a new virtual environment, for example in ``/srv/kallithea/venv``,
91 - Create a new virtual environment, for example in ``/srv/kallithea/venv``,
92 specifying the right Python binary::
92 specifying the right Python binary::
93
93
94 python3 -m venv /srv/kallithea/venv
94 python3 -m venv /srv/kallithea/venv
95
95
96 - Activate the virtualenv in your current shell session and make sure the
96 - Activate the virtualenv in your current shell session and make sure the
97 basic requirements are up-to-date by running the following commands in your
97 basic requirements are up-to-date by running the following commands in your
98 bash shell::
98 bash shell::
99
99
100 . /srv/kallithea/venv/bin/activate
100 . /srv/kallithea/venv/bin/activate
101 pip install --upgrade pip setuptools
101 pip install --upgrade pip setuptools
102
102
103 .. note:: You can't use UNIX ``sudo`` to source the ``activate`` script; it
103 .. note:: You can't use UNIX ``sudo`` to source the ``activate`` script; it
104 will "activate" a shell that terminates immediately.
104 will "activate" a shell that terminates immediately.
105
105
106 - Install Kallithea in the activated virtualenv::
106 - Install Kallithea in the activated virtualenv::
107
107
108 pip install --upgrade kallithea
108 pip install --upgrade kallithea
109
109
110 .. note:: Some dependencies are optional. If you need them, install them in
110 .. note:: Some dependencies are optional. If you need them, install them in
111 the virtualenv too::
111 the virtualenv too::
112
112
113 pip install --upgrade kallithea python-ldap python-pam psycopg2
113 pip install --upgrade kallithea python-ldap python-pam psycopg2
114
114
115 This might require installation of development packages using your
115 This might require installation of development packages using your
116 distribution's package manager.
116 distribution's package manager.
117
117
118 Alternatively, download a .tar.gz from http://pypi.python.org/pypi/Kallithea,
118 Alternatively, download a .tar.gz from http://pypi.python.org/pypi/Kallithea,
119 extract it and install from source by running::
119 extract it and install from source by running::
120
120
121 pip install --upgrade .
121 pip install --upgrade .
122
122
123 - This will install Kallithea together with all other required
123 - This will install Kallithea together with all other required
124 Python libraries into the activated virtualenv.
124 Python libraries into the activated virtualenv.
125
125
126 You can now proceed to :ref:`install-front-end`.
126 You can now proceed to :ref:`install-front-end`.
127
127
128 .. _installation-without-virtualenv:
129
130
131 Installing a released version without virtualenv
132 ------------------------------------------------
133
134 For installation without virtualenv, 'just' use::
135
136 pip install kallithea
137
138 Note that this method requires root privileges and will install packages
139 globally without using the system's package manager.
140
141 To install as a regular user in ``~/.local``, you can use::
142
143 pip install --user kallithea
144
145 You can now proceed to :ref:`install-front-end`.
146
147 .. _install-front-end:
148
149
128
150 Prepare front-end files
129 Prepare front-end files
151 -----------------------
130 -----------------------
152
131
153 Finally, the front-end files with CSS and JavaScript must be prepared. This
132 Finally, the front-end files with CSS and JavaScript must be prepared. This
154 depends on having some commands available in the shell search path: ``npm``
133 depends on having some commands available in the shell search path: ``npm``
155 version 6 or later, and ``node.js`` (version 12 or later) available as
134 version 6 or later, and ``node.js`` (version 12 or later) available as
156 ``node``. The installation method for these dependencies varies between
135 ``node``. The installation method for these dependencies varies between
157 operating systems and distributions.
136 operating systems and distributions.
158
137
159 Prepare the front-end by running::
138 Prepare the front-end by running::
160
139
161 kallithea-cli front-end-build
140 kallithea-cli front-end-build
162
141
163 You can now proceed to :ref:`setup`.
142 You can now proceed to :ref:`setup`.
General Comments 0
You need to be logged in to leave comments. Login now