]> matita.cs.unibo.it Git - helm.git/blob - matita/dist/INSTALL
matita 0.5.1 tagged
[helm.git] / matita / dist / INSTALL
1  
2 Tiny Matita logoMatita Home
3
4                            Chapter 2. Installation
5 Prev                                                                      Next
6
7 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
8
9 Chapter 2. Installation
10
11 Table of Contents
12
13 Installing from sources
14
15     Getting the source code
16     Requirements
17     (optional) MySQL setup
18     Compiling and installing
19
20 Configuring Matita
21
22 Installing from sources
23
24 Currently, the only intended way to install Matita is starting from its source
25 code.
26
27 Getting the source code
28
29 You can get the Matita source code in two ways:
30
31  1. go to the download page and get the latest released source tarball;
32
33  2. get the development sources from our SVN repository. You will need the
34     components/ and matita/ directories from the trunk/helm/software/
35     directory, plus the configure and Makefile* stuff from the same directory.
36
37     In this case you will need to run autoconf before proceding with the
38     building instructions below.
39
40 Requirements
41
42 In order to build Matita from sources you will need some tools and libraries.
43 They are listed below.
44
45 Note for Debian (and derivatives) users
46
47 If you are running a Debian GNU/Linux distribution, or any of its derivative
48 like Ubuntu, you can use APT to install all the required tools and libraries
49 since they are all part of the Debian archive.
50
51 apt-get install ocaml ocaml-findlib libgdome2-ocaml-dev liblablgtk2-ocaml-dev
52 liblablgtkmathview-ocaml-dev liblablgtksourceview-ocaml-dev
53 libsqlite3-ocaml-dev libocamlnet-ocaml-dev libzip-ocaml-dev libhttp-ocaml-dev
54 ocaml-ulex08 libexpat-ocaml-dev libmysql-ocaml-dev camlp5
55
56 An official debian package is going to be added to the archive too.
57
58 Required tools and libraries
59
60 OCaml
61
62     the Objective Caml compiler, version 3.09 or above
63
64 Findlib
65
66     OCaml package manager, version 1.1.1 or above
67
68 OCaml Expat
69
70     OCaml bindings for the expat library
71
72 GMetaDOM
73
74     OCaml bindings for the Gdome 2 library
75
76 OCaml HTTP
77
78     OCaml library to write HTTP daemons (and clients)
79
80 LablGTK
81
82     OCaml bindings for the GTK+ library , version 2.6.0 or above
83
84 GtkMathView , LablGtkMathView
85
86     GTK+ widget to render MathML documents and its OCaml bindings
87
88 GtkSourceView , LablGtkSourceView
89
90     extension for the GTK+ text widget (adding the typical features of source
91     code editors) and its OCaml bindings
92
93 MySQL , OCaml MySQL
94
95     SQL database and OCaml bindings for its client-side library
96
97     The SQL database itself is not strictly needed to run Matita, but the
98     client libraries are.
99
100 Sqlite , OCaml Sqlite3
101
102     Sqlite database and OCaml bindings
103
104 Ocamlnet
105
106     collection of OCaml libraries to deal with application-level Internet
107     protocols and conventions
108
109 ulex
110
111     Unicode lexer generator for OCaml
112
113 CamlZip
114
115     OCaml library to access .gz files
116
117 (optional) MySQL setup
118
119 To fully exploit Matita indexing and search capabilities on a huge metadata set
120 you may need a working MySQL database. Detalied instructions on how to do it
121 can be found in the MySQL documentation. Here you can find a quick howto.
122
123 In order to create a database you need administrator permissions on your MySQL
124 installation, usually the root account has them. Once you have the permissions,
125 a new database can be created executing mysqladmin create matita (matita is the
126 default database name, you can change it using the db.user key of the
127 configuration file).
128
129 Then you need to grant the necessary access permissions to the database user of
130 Matita, typing echo "grant all privileges on matita.* to helm;" | mysql matita
131 should do the trick (helm is the default user name used by Matita to access the
132 database, you can change it using the db.user key of the configuration file).
133
134 Note
135
136 This way you create a database named matita on which anyone claiming to be the
137 helm user can do everything (like adding dummy data or destroying the contained
138 one). It is strongly suggested to apply more fine grained permissions, how to
139 do it is out of the scope of this manual.
140
141 Compiling and installing
142
143 Once you get the source code the installations steps should be quite familiar.
144
145 First of all you need to configure the build process executing ./configure.
146 This will check that all needed tools and library are installed and prepare the
147 sources for compilation and installation.
148
149 Quite a few (optional) arguments may be passed to the configure command line to
150 change build time parameters. They are listed below, together with their
151 default values:
152
153 configure command line arguments
154
155 --with-runtime-dir=dir
156
157     (Default: /usr/local/matita) Runtime base directory where all Matita stuff
158     (executables, configuration files, standard library, ...) will be installed
159
160 --with-dbhost=host
161
162     (Default: localhost) Default SQL server hostname. Will be used while
163     building the standard library during the installation and to create the
164     default Matita configuration. May be changed later in configuration file.
165
166 --enable-debug
167
168     (Default: disabled) Enable debugging code. Not for the casual user.
169
170 Then you will manage the build and install process using make as usual. Below
171 are reported the targets you have to invoke in sequence to build and install:
172
173 make targets
174
175 world
176
177     builds components needed by Matita and Matita itself (in bytecode or native
178     code depending on the availability of the OCaml native code compiler)
179
180 install
181
182     installs Matita related tools, standard library and the needed runtime
183     stuff in the proper places on the filesystem.
184
185     As a part of the installation process the Matita standard library will be
186     compiled, thus testing that the just built matitac compiler works properly.
187
188     For this step you will need a working SQL database (for indexing the
189     standard library while you are compiling it). See Database setup for
190     instructions on how to set it up.
191
192 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
193
194 Prev                                                                       Next
195 Matita vs Coq                        Home                    Configuring Matita
196