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