|
1 | 1 | <chapter id="install">
|
2 | 2 | <title>Installation</title>
|
3 | 3 |
|
4 |
| - <sect1 id="install-download"> |
5 |
| - <title> |
6 |
| - Download |
7 |
| - </title> |
8 |
| - <para> |
9 |
| - <application>pgSphere</application> is not part of the <application>PostgreSQL</application> software. |
10 |
| - You can download the latest release sources from the |
11 |
| - <ulink url="https://github.com/postgrespro/pgsphere/releases"> |
12 |
| - <application>pgSphere</application> homepage |
13 |
| - </ulink> (the Releases page). The sources can also be downloaded by |
14 |
| - cloning the repository with the appropriate release tag (each release is |
15 |
| - marked with a tag). |
16 |
| - The master branch is intended for development use |
17 |
| - and may contain the code in a transitional state. |
18 |
| - It is not recommended for use in production. |
19 |
| - </para> |
20 |
| - </sect1> |
| 4 | + <sect1 id="install-download"> |
| 5 | + <title>Download</title> |
21 | 6 |
|
22 |
| - <sect1 id="install-sect2"> |
23 |
| - <title> |
24 |
| - Installation |
25 |
| - </title> |
26 |
| - <para> |
27 |
| - We assume that you have |
28 |
| - <application>PostgreSQL</application> already compiled and |
29 |
| - installed. Please note: Depending on your system configuration mostly you have to be logged in as the system |
30 |
| - superuser. |
31 |
| - </para> |
32 |
| - <para> |
33 |
| - There are two ways to compile <application>pgSphere</application>. |
34 |
| - The first is to copy the sources into the contribution directory of |
35 |
| - <application>PostgreSQL</application>'s source tree |
36 |
| - (<filename>POSTGRESQL_SRC/src/contrib</filename>). |
37 |
| - Then, change into <filename>POSTGRESQL_SRC/src/contrib</filename>. |
38 |
| - If the sources are not yet installed and the directory |
39 |
| - <filename>pg_sphere</filename> does not exist, take the |
40 |
| - gzipped <application>pgSphere</application> sources ( e. g., |
41 |
| - <filename>pgsphere-X.X.X.tgz</filename>, where X.X.X is the version number) |
42 |
| - and run: |
43 |
| - </para> |
44 |
| - <programlisting> |
| 7 | + <para> |
| 8 | + &pgsphere; is not the part of the &postgresql; software. You can download |
| 9 | + the latest release sources from the |
| 10 | + <ulink url="&pgsphereurl;">&pgsphere; Releases page</ulink>. |
| 11 | + The sources can also be downloaded by cloning the repository with the |
| 12 | + appropriate release tag. The master branch is intended for development |
| 13 | + use and may contain the code in a transitional state. It is not recommended |
| 14 | + for use in production. |
| 15 | + </para> |
| 16 | + </sect1> |
| 17 | + |
| 18 | + <sect1 id="install-build"> |
| 19 | + <title>Install</title> |
| 20 | + <para> |
| 21 | + It is assumed that &postgresql; is already installed. Depending on the |
| 22 | + system configuration, superuser (root) access rights may be required to |
| 23 | + complete the installation. |
| 24 | + </para> |
| 25 | + |
| 26 | + <para> |
| 27 | + The installation script uses &pg_config; utility. Make sure that the |
| 28 | + environment variable PATH includes path to &pg_config; utility. The path |
| 29 | + to &pg_config; can be also specified in make command: |
| 30 | + make PG_CONFIG=/path/to/pgconfig. |
| 31 | + </para> |
| 32 | + |
| 33 | + <para>Unpack the downloaded archive and enter the directory:</para> |
| 34 | + <programlisting> |
45 | 35 | <![CDATA[shell> tar -xzf path/to/pgsphere-X.X.X.tgz]]>
|
46 |
| - </programlisting> |
47 |
| - <para> |
48 |
| - Now, change into the <filename>pg_sphere</filename> |
49 |
| - directory and run : |
50 |
| - </para> |
51 |
| - <programlisting> |
| 36 | +<![CDATA[shell> cd pgsphere-X.X.X]]> |
| 37 | + </programlisting> |
| 38 | + |
| 39 | + <para> |
| 40 | + Compile the code. By default, &pgsphere; is compiled with the HEALPIX |
| 41 | + support. |
| 42 | + </para> |
| 43 | + <programlisting> |
52 | 44 | <![CDATA[shell> make]]>
|
53 |
| - </programlisting> |
54 |
| - <para> |
55 |
| - and to install <application>pgSphere</application> : |
56 |
| - </para> |
57 |
| - <programlisting> |
| 45 | + </programlisting> |
| 46 | + <para>or compile without HEALPIX support:</para> |
| 47 | + <programlisting> |
| 48 | +<![CDATA[shell> make USE_HEALPIX=0]]> |
| 49 | + </programlisting> |
| 50 | + |
| 51 | + <para> |
| 52 | + Run regression tests optionally. If the &pgsphere; was compiled without |
| 53 | + HEALPIX support, USE_HEALPIX=0 should be specified in make command line. |
| 54 | + </para> |
| 55 | + <programlisting> |
| 56 | +<![CDATA[shell> make test]]> |
| 57 | + </programlisting> |
| 58 | + |
| 59 | + <para> |
| 60 | + Install &pgsphere; files to the installation directories. The installation |
| 61 | + directories are defined by &pg_config; utility. Superuser (root) access |
| 62 | + rights may be required. |
| 63 | + </para> |
| 64 | + <programlisting> |
58 | 65 | <![CDATA[shell> make install]]>
|
59 |
| - </programlisting> |
60 |
| - <para> |
61 |
| - The second way does not require the <application>PostgreSQL</application> sources but |
62 |
| - the configuration tool <application>pg_config</application>. |
63 |
| - </para> |
64 |
| - <para> |
65 |
| - First unpack the <application>pgSphere</application> sources: |
66 |
| - </para> |
67 |
| - <programlisting> |
68 |
| -<![CDATA[shell> tar -xzf path/to/pgsphere-X.X.X.tgz]]> |
69 |
| - </programlisting> |
70 |
| - <para> |
71 |
| - Now, change into the <filename>pg_sphere</filename> |
72 |
| - directory and run: |
73 |
| - </para> |
74 |
| - <programlisting> |
75 |
| -<![CDATA[shell> make USE_PGXS=1 PG_CONFIG=/path/to/pg_config]]> |
76 |
| - </programlisting> |
77 |
| - <para> |
78 |
| - To install <application>pgSphere</application> you have to run : |
79 |
| - </para> |
80 |
| - <programlisting> |
81 |
| -<![CDATA[shell> make USE_PGXS=1 PG_CONFIG=/path/to/pg_config install]]> |
82 |
| - </programlisting> |
83 |
| - <para> |
84 |
| - To check the installation change into the <filename>pg_sphere</filename> source |
85 |
| - directory again and run: |
86 |
| - </para> |
87 |
| - <programlisting> |
88 |
| -<![CDATA[shell> make installcheck]]> |
89 |
| - </programlisting> |
| 66 | + </programlisting> |
| 67 | + |
| 68 | + </sect1> |
| 69 | + |
| 70 | + <sect1 id="install-sect3"> |
| 71 | + <title>Configure Extension</title> |
| 72 | + |
| 73 | + <para> |
| 74 | + We assume you have already created a database <database>userdb</database>, |
| 75 | + where <database>userdb</database> is the name of any database. Assume that |
| 76 | + the name of &postgresql;'s superuser is <parameter>postgres</parameter>. |
| 77 | + </para> |
| 78 | + <programlisting> |
| 79 | +<![CDATA[shell> psql -U postgres -c 'CREATE EXTENSION pg_sphere' userdb]]> |
| 80 | + </programlisting> |
90 | 81 |
|
91 |
| - </sect1> |
| 82 | + <para> |
| 83 | + It may be necessary to give more <command>psql</command> options, like port |
| 84 | + or host name, depending on your system configuration. Please, take a look at |
| 85 | + the psql user manual for details. The psql user manual for the latest |
| 86 | + &postgresql; version can be found at |
| 87 | + <ulink url="https://www.postgresql.org/docs/current/app-psql.html"> |
| 88 | + &postgresql; site |
| 89 | + </ulink>. |
| 90 | + </para> |
92 | 91 |
|
93 |
| - <sect1 id="install-sect3"> |
94 |
| - <title> |
95 |
| - Creating a database with <application>pgSphere</application> |
96 |
| - </title> |
97 |
| - <para> |
98 |
| - We assume you have already created a database |
99 |
| - <database>datab</database>, where <database>datab</database> |
100 |
| - is the name of any database. |
101 |
| - Presupposing the name of your |
102 |
| - <application>PostgreSQL</application>'s superuser is |
103 |
| - <parameter>postgres</parameter>, type: |
104 |
| - </para> |
105 |
| - <programlisting> |
106 |
| -<![CDATA[shell> psql -U postgres -c 'CREATE EXTENSION pg_sphere' datab]]> |
107 |
| - </programlisting> |
108 |
| - <para> |
109 |
| - It may be necessary to give more |
110 |
| - <command>psql</command> options, like port or host name, |
111 |
| - depending on your system. |
112 |
| - Please take a look at the psql user manual for details. |
113 |
| - The psql user manual for the latest postgresql version can be |
114 |
| - found at <ulink url="https://www.postgresql.org/docs/current/app-psql.html"> |
115 |
| - PostgreSQL site</ulink>. |
116 |
| - </para> |
117 |
| - <para> |
118 |
| - To get the version of installed pgSphere software, simply |
119 |
| - call: |
120 |
| - </para> |
121 |
| - <programlisting> |
| 92 | + <para>To get the version of installed pgSphere software:</para> |
| 93 | + <programlisting> |
122 | 94 | <![CDATA[pgsql> SELECT pg_sphere_version();]]>
|
123 |
| - </programlisting> |
124 |
| - </sect1> |
| 95 | + </programlisting> |
125 | 96 |
|
| 97 | + </sect1> |
126 | 98 | </chapter>
|
0 commit comments