Changeset 08254fc for content/databases
- Timestamp:
- 06/12/2004 11:57:50 PM (20 years ago)
- Branches:
- 10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 6.0, 6.1, 6.2, 6.2.0, 6.2.0-rc1, 6.2.0-rc2, 6.3, 6.3-rc1, 6.3-rc2, 6.3-rc3, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
- Children:
- 0931098
- Parents:
- d3edf27
- Location:
- content/databases
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
content/databases/databases.xml
rd3edf27 r08254fc 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" 3 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ 4 <!ENTITY % general-entities SYSTEM "../../general.ent"> 5 %general-entities; 6 ]> 7 1 8 <chapter id="content-databases"> 2 9 <?dbhtml filename="databases.html"?> … … 9 16 <acronym>LFS</acronym> system is entirely possible.</para> 10 17 11 &db; 12 &db-3.3; 13 &mysql; 14 &postgresql; 18 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="db.xml"/> 19 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="db-3.3.xml"/> 20 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="mysql.xml"/> 21 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="postgresql.xml"/> 15 22 16 23 </chapter> -
content/databases/db-3.3.xml
rd3edf27 r08254fc 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" 3 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ 4 <!ENTITY % general-entities SYSTEM "../../general.ent"> 5 %general-entities; 6 7 <!ENTITY db-3.3-download-http " "> 8 <!ENTITY db-3.3-download-ftp "ftp://ftp.pu.edu.tw/Unix/Database/BerkeleyDB/db-&db-3.3-version;.tar.gz"> 9 <!ENTITY db-3.3-size "2.3 MB"> 10 <!ENTITY db-3.3-buildsize "20.3 MB"> 11 <!ENTITY db-3.3-time "0.80 SBU"> 12 ]> 13 1 14 <sect1 id="db-3.3" xreflabel="Berkeley DB-&db-3.3-version;"> 2 15 <?dbhtml filename="db-3.3.html"?> 3 16 <title>Berkeley DB-&db-3.3-version;</title> 4 17 5 &db-3.3-intro; 6 &db-3.3-inst; 7 &db-3.3-exp; 8 &db-3.3-desc; 18 <sect2> 19 <title>Introduction to <application>Berkeley DB</application>-&db-3.3-version;</title> 20 21 <para>The <application>Berkeley DB</application> package contains version 22 &db-3.3-version; of the Berkeley Database.</para> 23 24 <sect3><title>Package information</title> 25 <itemizedlist spacing='compact'> 26 <listitem><para>Download (HTTP): <ulink 27 url="&db-3.3-download-http;"/></para></listitem> 28 <listitem><para>Download (FTP): <ulink 29 url="&db-3.3-download-ftp;"/></para></listitem> 30 <listitem><para>Download size: &db-3.3-size;</para></listitem> 31 <listitem><para>Estimated Disk space required: 32 &db-3.3-buildsize;</para></listitem> 33 <listitem><para>Estimated build time: 34 &db-3.3-time;</para></listitem></itemizedlist> 35 </sect3> 36 37 <sect3><title>Additional downloads</title> 38 <itemizedlist spacing='compact'> 39 <listitem><para>Required Patch: <ulink 40 url="http://www.sleepycat.com/webforms/patchdl.php?src=patch.3.3.11.1"/></para></listitem> 41 <listitem><para>Recommended Patch: <ulink 42 url="http://www.sleepycat.com/webforms/patchdl.php?src=patch.3.3.11.2"/></para></listitem> 43 </itemizedlist></sect3> 44 45 46 </sect2> 47 48 <sect2> 49 <title>Installation of <application>Berkeley DB</application></title> 50 51 <para>See: <ulink url="http://www.sleepycat.com/download/patching.shtml"/> 52 for instructions on installing the patches. 53 </para> 54 55 <para>Install <application>Berkeley DB</application> by running the following commands: 56 </para> 57 58 <screen><userinput><command>cd build_unix && 59 ../dist/configure --prefix=/opt/db-3.3 --enable-compat185 && 60 make && 61 make docdir=/opt/db-3.3/doc/Berkeley-DB install && 62 cd /opt/db-3.3/lib/ && 63 rm -f libdb.so && 64 for i in $(ls); do mv $i /usr/lib; ln -sf /usr/lib/$i; done && 65 cd /opt/db-3.3/include/ && 66 sed -i 's/^DB185/DB/' db_185.h && 67 ln -nsf /opt/db-3.3/include /usr/include/db3</command></userinput></screen> 68 69 </sect2> 70 71 <sect2> 72 <title>Command explanations</title> 73 74 <para><command>sed 's/^DB185/DB/' /usr/include/db_185.h > /usr/include/db_185.h.new</command>: Change the DB185 database pointer to DB.</para> 75 76 </sect2> 77 78 <sect2> 79 <title>Contents</title> 80 81 <para>The <application>Berkeley DB</application> package contains 82 <command>db_archive</command>, 83 <command>db_checkpoint</command>, 84 <command>db_deadlock</command>, 85 <command>db_dump</command>, 86 <command>db_load</command>, 87 <command>db_printlog</command>, 88 <command>db_recover</command>, 89 <command>db_stat</command>, 90 <command>db_upgrade</command> and 91 <command>db_verify</command>. 92 93 </para> 94 95 </sect2> 96 97 <sect2><title>Description</title> 98 99 <sect3><title>db_archive</title> 100 <para><command>db_archive</command> prints the pathnames of log files that are 101 no longer in use.</para></sect3> 102 103 104 <sect3><title>db_checkpoint</title> 105 <para><command>db_checkpoint</command> is a daemon process used to monitor and 106 checkpoint database logs.</para></sect3> 107 108 <sect3><title>db_deadlock</title> 109 <para><command>db_deadlock</command> is used to abort lock requests when 110 deadlocks are detected.</para></sect3> 111 112 <sect3><title>db_dump</title> 113 <para><command>db_dump</command> converts database files to a flat file format 114 readable by <command>db_load</command>.</para></sect3> 115 116 <sect3><title>db_load</title> 117 <para><command>db_load</command> is used to create database files from flat 118 files created with <command>db_dump</command>.</para></sect3> 119 120 <sect3><title>db_printlog</title> 121 <para><command>db_printlog</command> converts database log files to human 122 readable text.</para></sect3> 123 124 125 <sect3><title>db_recover</title> 126 <para><command>db_recover</command> is used to restore a database to a 127 consistent state after a failure.</para></sect3> 128 129 <sect3><title>db_stat</title> 130 <para><command>db_stat</command> displays database environment statistics. 131 </para></sect3> 132 133 <sect3><title>db_upgrade</title> 134 <para><command>db_upgrade</command> is used to upgrade database files to a 135 newer version of <application>Berkeley DB</application>.</para></sect3> 136 137 <sect3><title>db_verify</title> 138 <para><command>db_verify</command> is used to run consistency checks on 139 database files.</para></sect3> 140 141 </sect2> 9 142 10 143 </sect1> -
content/databases/db.xml
rd3edf27 r08254fc 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" 3 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ 4 <!ENTITY % general-entities SYSTEM "../../general.ent"> 5 %general-entities; 6 7 <!ENTITY db-download-http "http://www.sleepycat.com/update/snapshot/db-4.2.52.tar.gz"> 8 <!ENTITY db-download-ftp " "> 9 <!ENTITY db-size "4 MB"> 10 <!ENTITY db-buildsize "43 MB"> 11 <!ENTITY db-time "1.22 SBU"> 12 ]> 13 1 14 <sect1 id="db" xreflabel="Berkeley DB-&db-version;"> 2 15 <?dbhtml filename="db.html"?> 3 16 <title>Berkeley DB-&db-version;</title> 4 17 5 &db-intro; 6 &db-inst; 7 &db-exp; 8 &db-desc; 18 <sect2> 19 <title>Introduction to <application>Berkeley DB</application></title> 20 21 <para>The <application>Berkeley DB</application> package contains programs and 22 utilities used by many other applications for database related 23 functions.</para> 24 25 <sect3><title>Package information</title> 26 <itemizedlist spacing='compact'> 27 <listitem><para>Download (HTTP): <ulink 28 url="&db-download-http;"/></para></listitem> 29 <listitem><para>Download (FTP): <ulink 30 url="&db-download-ftp;"/></para></listitem> 31 <listitem><para>Download size: &db-size;</para></listitem> 32 <listitem><para>Estimated Disk space required: 33 &db-buildsize;</para></listitem> 34 <listitem><para>Estimated build time: 35 &db-time;</para></listitem></itemizedlist> 36 </sect3> 37 38 <sect3><title>Additional downloads</title> 39 <itemizedlist spacing='compact'> 40 <listitem><para>Required Patch: <ulink 41 url="http://www.sleepycat.com/update/4.2.52/patch.4.2.52.1"/></para></listitem> 42 <listitem><para>Required Patch: <ulink 43 url="http://www.sleepycat.com/update/4.2.52/patch.&db-version;"/></para></listitem> 44 </itemizedlist></sect3> 45 46 <sect3><title><application>Berkeley DB</application> dependencies</title> 47 <sect4><title>Optional</title> 48 <para><xref linkend="tcl"/> and <xref linkend="j2sdk"/> 49 </para></sect4> 50 </sect3> 51 52 </sect2> 53 54 <sect2> 55 <title>Installation of <application>Berkeley DB</application></title> 56 57 <para>Install <application>Berkeley DB</application> by running the following commands:</para> 58 59 <screen><userinput><command>patch -Np0 -i ../patch.4.2.52.1 && 60 patch -Np0 -i ../patch.&db-version; && 61 cd build_unix && 62 ../dist/configure --prefix=/usr \ 63 --enable-compat185 \ 64 --enable-cxx && 65 make && 66 make docdir=/usr/share/doc/db-&db-version; install</command></userinput></screen> 67 68 <note><para>If you wish to enable <application>Java</application> 69 support in <application>Berkeley DB</application>-&db-version;, add 70 <parameter>--enable-java</parameter> to the configure options. This requires a 71 Java compiler. 72 <application>Java</application> support is needed 73 if you plan to use system installed <application>Berkeley DB</application> when 74 compiling <xref linkend="openoffice"/>.</para></note> 75 76 </sect2> 77 78 <sect2> 79 <title>Command explanations</title> 80 81 <para><command>cd build_unix && ../dist/configure --prefix=/usr 82 --enable-compat185</command>: 83 This replaces the normal <command>./configure</command> command, as 84 <application>Berkeley DB</application> comes with various 85 build directories for different platforms.</para> 86 87 <para><command>make docdir=/usr/share/doc/db-&db-version; 88 install</command>: This installs the documentation in 89 the correct place.</para> 90 91 </sect2> 92 93 <sect2> 94 <title>Contents</title> 95 96 <para>The <application>Berkeley DB</application> package contains 97 <command>db_archive</command>, 98 <command>db_checkpoint</command>, 99 <command>db_deadlock</command>, 100 <command>db_dump</command>, 101 <command>db_load</command>, 102 <command>db_printlog</command>, 103 <command>db_recover</command>, 104 <command>db_stat</command>, 105 <command>db_upgrade</command> and 106 <command>db_verify</command>. 107 108 </para> 109 110 </sect2> 111 112 <sect2><title>Description</title> 113 114 <sect3><title>db_archive</title> 115 <para><command>db_archive</command> prints the pathnames of log files that are 116 no longer in use.</para></sect3> 117 118 119 <sect3><title>db_checkpoint</title> 120 <para><command>db_checkpoint</command> is a daemon process used to monitor and 121 checkpoint database logs.</para></sect3> 122 123 <sect3><title>db_deadlock</title> 124 <para><command>db_deadlock</command> is used to abort lock requests when 125 deadlocks are detected.</para></sect3> 126 127 <sect3><title>db_dump</title> 128 <para><command>db_dump</command> converts database files to a flat file format 129 readable by <command>db_load</command>.</para></sect3> 130 131 <sect3><title>db_load</title> 132 <para><command>db_load</command> is used to create database files from flat 133 files created with <command>db_dump</command>.</para></sect3> 134 135 <sect3><title>db_printlog</title> 136 <para><command>db_printlog</command> converts database log files to human 137 readable text.</para></sect3> 138 139 140 <sect3><title>db_recover</title> 141 <para><command>db_recover</command> is used to restore a database to a 142 consistent state after a failure.</para></sect3> 143 144 <sect3><title>db_stat</title> 145 <para><command>db_stat</command> displays database environment statistics. 146 </para></sect3> 147 148 <sect3><title>db_upgrade</title> 149 <para><command>db_upgrade</command> is used to upgrade database files to a 150 newer version of <application>Berkeley DB</application>.</para></sect3> 151 152 <sect3><title>db_verify</title> 153 <para><command>db_verify</command> is used to run consistency checks on 154 database files.</para></sect3> 155 156 </sect2> 9 157 10 158 </sect1> -
content/databases/mysql.xml
rd3edf27 r08254fc 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" 3 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ 4 <!ENTITY % general-entities SYSTEM "../../general.ent"> 5 %general-entities; 6 7 <!ENTITY mysql-download-http "http://mysql.he.net/Downloads/MySQL-4.0/mysql-&mysql-version;.tar.gz"> 8 <!ENTITY mysql-download-ftp "ftp://mirror.mcs.anl.gov/pub/mysql/Downloads/MySQL-4.0/mysql-&mysql-version;.tar.gz"> 9 <!ENTITY mysql-size "13.5 MB"> 10 <!ENTITY mysql-buildsize "98.7 MB"> 11 <!ENTITY mysql-time "3.43 SBU"> 12 ]> 13 1 14 <sect1 id="mysql" xreflabel="MySQL-&mysql-version;"> 2 15 <?dbhtml filename="mysql.html"?> 3 16 <title>MySQL-&mysql-version;</title> 4 17 5 &mysql-intro; 6 &mysql-inst; 18 <sect2> 19 <title>Introduction to <application>My<acronym>SQL</acronym></application></title> 20 21 <para><application>My<acronym>SQL</acronym></application> is a widely used and fast 22 <acronym>SQL</acronym> database server. It is a client/server 23 implementation that consists of a server daemon and many different 24 client programs and libraries.</para> 25 26 <sect3><title>Package information</title> 27 <itemizedlist spacing='compact'> 28 <listitem><para>Download (HTTP): <ulink url="&mysql-download-http;"/></para></listitem> 29 <listitem><para>Download (FTP): <ulink url="&mysql-download-ftp;"/></para></listitem> 30 <listitem><para>Download size: &mysql-size;</para></listitem> 31 <listitem><para>Estimated Disk space required: &mysql-buildsize;</para></listitem> 32 <listitem><para>Estimated build time: &mysql-time;</para></listitem></itemizedlist> 33 </sect3> 34 35 <sect3><title><application>My<acronym>SQL</acronym></application> dependencies</title> 36 <sect4><title>Optional</title> 37 <para><xref linkend="readline"/>, <xref linkend="openssl"/> and 38 <xref linkend="tcpwrappers"/> 39 </para></sect4> 40 </sect3> 41 42 </sect2> 43 44 <sect2> 45 <title>Installation of <application>My<acronym>SQL</acronym></application></title> 46 47 <para>For security reasons, running the server as an unprivileged user 48 and group is strongly encouraged:</para> 49 50 <screen><userinput><command>groupadd mysql && 51 useradd -c mysql -d /dev/null -g mysql -s /bin/false mysql</command></userinput></screen> 52 53 <para>Build and install <application>My<acronym>SQL</acronym></application> by running the following commands:</para> 54 55 <screen><userinput><command>./configure --prefix=/usr --sysconfdir=/etc \ 56 --libexecdir=/usr/sbin --localstatedir=/var/lib/mysql \ 57 --enable-thread-safe-client --enable-local-infile \ 58 --enable-assembler --without-debug --without-bench && 59 make testdir=/usr/lib/mysql/mysql-test && 60 make testdir=/usr/lib/mysql/mysql-test install</command></userinput></screen> 61 62 <para>Packages that depend on <application>MySQL</application> need the shared 63 libraries available at run-time:</para> 64 65 <screen><userinput><command>cd /usr/lib && 66 ln -sf mysql/libmysqlclient{,_r}.so* .</command></userinput></screen> 67 68 </sect2> 69 70 <sect2> 71 <title>Configuring <application>My<acronym>SQL</acronym></application></title> 72 73 <sect3> 74 <title>Config files</title> 75 76 <para><filename>/etc/my.cnf</filename>, <filename>~/.my.cnf</filename></para> 77 78 </sect3> 79 80 <sect3> 81 <title>Configuration Information</title> 82 83 <para>There are several default configuration files available in 84 <filename class="directory">/usr/share/mysql</filename> which you can 85 use. Create <filename>/etc/my.cnf</filename> using the following 86 command:</para> 87 88 <screen><userinput><command>cp /usr/share/mysql/my-medium.cnf /etc/my.cnf</command></userinput></screen> 89 90 <para>You can now install a database and change the ownership to the 91 unprivileged user and group.</para> 92 93 <screen><userinput><command>mysql_install_db && 94 chown -R mysql:mysql /var/lib/mysql</command></userinput></screen> 95 96 <para>Further configuration requires that the mysql server be running:</para> 97 98 <screen><userinput><command>mysqld_safe --user=mysql 2>&1 >/dev/null &</command></userinput></screen> 99 100 <para>A default installation does not setup a password for the 101 administrator, so use the following command to set one. Replace <replaceable>[new-password]</replaceable> 102 with your own.</para> 103 7 104 <!-- 8 &mysql-exp; 105 <screen><userinput><command>mysql -uroot mysql</command></userinput> 106 Welcome to the MySQL monitor. Commands end with ; or \g. 107 Your MySQL connection id is 2 to server version: 3.23.51-log 108 109 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. 110 111 <prompt>mysql></prompt> <userinput><command>UPDATE user SET password=password('<replaceable>new-password</replaceable>') WHERE user='root';</command></userinput> 112 Query OK, 2 rows affected (0.00 sec) 113 Rows matched: 2 Changed: 2 Warnings: 0 114 115 <prompt>mysql></prompt> <userinput><command>FLUSH PRIVILEGES;</command></userinput> 116 Query OK, 0 rows affected (0.00 sec) 117 118 <prompt>mysql></prompt> <userinput><command>EXIT;</command></userinput> 119 bye 120 </screen> 9 121 --> 10 &mysql-config; 11 &mysql-desc; 122 123 <screen><userinput><command>mysqladmin -u root password <replaceable>[new-password]</replaceable></command></userinput></screen> 124 125 <para>Configuration of the server is now finished. Shut the server down 126 using the following command:</para> 127 128 <screen><userinput><command>mysqladmin -p shutdown</command></userinput></screen> 129 130 <para>Install the <filename>/etc/rc.d/init.d/mysql</filename> 131 init script included in the <xref linkend="intro-important-bootscripts"/> package.</para> 132 133 <screen><userinput><command>make install-mysql</command></userinput></screen> 134 135 </sect3> 136 137 </sect2> 138 139 <sect2> 140 <title>Contents</title> 141 142 <para>The <application>My<acronym>SQL</acronym></application> package contains <command> 143 comp_err</command>, <command> 144 isamchk</command>, <command> 145 isamlog</command>, <command> 146 make_win_src_distribution</command>, <command> 147 msql2mysql</command>, <command> 148 my_print_defaults</command>, <command> 149 myisamchk</command>, <command> 150 myisamlog</command>, <command> 151 myisampack</command>, <command> 152 mysql</command>, <command> 153 mysql_config</command>, <command> 154 mysql_convert_table_format</command>, <command> 155 mysql_explain_log</command>, <command> 156 mysql_find_rows</command>, <command> 157 mysql_fix_extensions</command>, <command> 158 mysql_fix_privilege_tables</command>, <command> 159 mysql_install</command>, <command> 160 mysql_install_db</command>, <command> 161 mysql_secure_installation</command>, <command> 162 mysql_setpermission</command>, <command> 163 mysql_tableinfo</command>, <command> 164 mysql_waitpid</command>, <command> 165 mysql_zap</command>, <command> 166 mysqlacess</command>,<command> 167 mysqladmin</command>, <command> 168 mysqlbinlog</command>, <command> 169 mysqlbug</command>, <command> 170 mysqlcheck</command>, <command> 171 mysqld</command>, <command> 172 mysqld_multi</command>, <command> 173 mysqld_safe</command>, <command> 174 mysqldump</command>, <command> 175 mysqldumpslow</command>, <command> 176 mysqlhotcopy</command>, <command> 177 mysqlimport</command>, <command> 178 mysqlmanager</command>, <command> 179 mysqlmanager-pwgen</command>, <command> 180 mysqlmanagerc</command>, <command> 181 mysqlshow</command>, <command> 182 mysqltest</command>, <command> 183 pack_isam</command>, <command> 184 perror</command>, <command> 185 replace</command>, <command> 186 resolve_stack_dump</command>, <command> 187 resolveip</command>, <filename class="libraryfile"> 188 libdbug</filename>, <filename class="libraryfile"> 189 libheap</filename>, <filename class="libraryfile"> 190 libmerge</filename>, <filename class="libraryfile"> 191 libmyisam</filename>, <filename class="libraryfile"> 192 libmyisammrg</filename>, <filename class="libraryfile"> 193 libmysqlclient</filename>, <filename class="libraryfile"> 194 libmystrings</filename>, <filename class="libraryfile"> 195 libmysys</filename>, <filename class="libraryfile"> 196 libnisam</filename> and <filename class="libraryfile"> 197 libvio</filename>.</para> 198 199 </sect2> 200 201 <sect2><title>Description</title> 202 203 <para>A package listing would be several pages long, we suggest 204 consulting the <application>My<acronym>SQL</acronym></application> documentation for full details, instead.</para> 205 206 <para>Certain <application>My<acronym>SQL</acronym></application> 207 support programs may require the <application>Perl</application> DBI modules to be installed to function properly.</para> 208 209 </sect2> 12 210 13 211 </sect1> -
content/databases/postgresql.xml
rd3edf27 r08254fc 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" 3 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ 4 <!ENTITY % general-entities SYSTEM "../../general.ent"> 5 %general-entities; 6 7 <!ENTITY postgresql-download-http "http://gd.tuwien.ac.at/db/postgresql/v&postgresql-version;/postgresql-&postgresql-version;.tar.bz2"> 8 <!ENTITY postgresql-download-ftp "ftp://ftp.fr.postgresql.org/v&postgresql-version;/postgresql-&postgresql-version;.tar.bz2"> 9 <!ENTITY postgresql-size "9.7 MB"> 10 <!ENTITY postgresql-buildsize "80 MB"> 11 <!ENTITY postgresql-time "1.21 SBU"> 12 ]> 13 1 14 <sect1 id="postgresql" xreflabel="PostgreSQL-&postgresql-version;"> 2 15 <?dbhtml filename="postgresql.html"?> 3 16 <title>Postgre<acronym>SQL</acronym>-&postgresql-version;</title> 4 17 5 &postgresql-intro; 6 &postgresql-inst; 7 &postgresql-exp; 8 &postgresql-config; 9 &postgresql-desc; 18 <sect2> 19 <title>Introduction to <application>Postgre<acronym>SQL</acronym></application></title> 20 21 <para><application>Postgre<acronym>SQL</acronym></application> is an advanced object-relational 22 database management system (<acronym>ORDBMS</acronym>), derived from the 23 Berkeley Postgres database management system.</para> 24 25 <sect3><title>Package information</title> 26 <itemizedlist spacing='compact'> 27 <listitem><para>Download (HTTP): <ulink url="&postgresql-download-http;"/></para></listitem> 28 <listitem><para>Download (FTP): <ulink url="&postgresql-download-ftp;"/></para></listitem> 29 <listitem><para>Download size: &postgresql-size;</para></listitem> 30 <listitem><para>Estimated Disk space required: &postgresql-buildsize;</para></listitem> 31 <listitem><para>Estimated build time: &postgresql-time;</para></listitem></itemizedlist> 32 </sect3> 33 34 <!-- 35 <note><para>The C++ and ODBC bindings have been removed from the main 36 source distribution. They can be found at the 37 <application>Postgre<acronym>SQL</acronym></application> Projects Web 38 Site at: <ulink url="http://gborg.postgresql.org" />.</para></note> 39 --> 40 41 <sect3><title><application>Postgre<acronym>SQL</acronym></application> dependencies</title> 42 <sect4><title>Optional</title> 43 <para> 44 <xref linkend="readline"/>, 45 <xref linkend="Python"/>, 46 <xref linkend="tcl"/>, 47 <xref linkend="tk"/>, 48 <xref linkend="openssl"/>, 49 <xref linkend="Linux_PAM"/>, 50 <ulink url="http://www.pdc.kth.se/kth-krb/">krb4</ulink>, 51 <xref linkend="mitkrb"/> or <xref linkend="heimdal"/>, 52 <ulink url="http://ant.apache.org/">Ant</ulink> and 53 <ulink url="http://rendezvous.sourceforge.net/">Rendezvous</ulink> 54 </para></sect4> 55 </sect3> 56 57 </sect2> 58 59 <sect2> 60 <title>Installation of <application>Postgre<acronym>SQL</acronym></application></title> 61 62 <para>Install <application>Postgre<acronym>SQL</acronym></application> with the following commands: </para> 63 64 <screen><userinput><command>./configure --prefix=/usr && 65 make && 66 make install</command></userinput></screen> 67 68 <note><para>If you are upgrading an existing system and are going to 69 install the new files over the old ones, then you should 70 back up your data, shut down the old server and follow the 71 instructions in <ulink 72 url="http://www.postgresql.org/docs/7.4/static/install-upgrading.html">the 73 official <application>Postgre<acronym>SQL</acronym></application> 74 documentation</ulink>.</para></note> 75 76 <para>Initialize a database cluster with the following commands:</para> 77 78 <screen><userinput><command>mkdir -p /var/pgsql/data && 79 useradd -d /var/pgsql/data postgres && 80 chown postgres /var/pgsql/data && 81 su - postgres -c '/usr/bin/initdb -D /var/pgsql/data'</command></userinput></screen> 82 83 <para>Start the database server with the following command:</para> 84 85 <screen><userinput><command>su - postgres -c '/usr/bin/postmaster -D /var/pgsql/data > \ 86 /var/pgsql/data/logfile 2>&1 &'</command></userinput></screen> 87 88 <para>Create a database and verify the installation:</para> 89 90 <screen><userinput><command>su - postgres -c '/usr/bin/createdb test' && 91 echo "create table t1 ( name varchar(20), state_province varchar(20) );" \ 92 | (su - postgres -c '/usr/bin/psql test ') && 93 echo "insert into t1 values ('Billy', 'NewYork');" \ 94 | (su - postgres -c '/usr/bin/psql test ') && 95 echo "insert into t1 values ('Evanidus', 'Quebec');" \ 96 | (su - postgres -c '/usr/bin/psql test ') && 97 echo "insert into t1 values ('Jesse', 'Ontario');" \ 98 | (su - postgres -c '/usr/bin/psql test ') && 99 echo "select * from t1;" | (su - postgres -c '/usr/bin/psql test')</command></userinput></screen> 100 101 </sect2> 102 103 <sect2> 104 <title>Command explanations</title> 105 106 <para><command>useradd -d /var/pgsql/data postgres</command>: Add an unprivileged user to run the database server.</para> 107 108 <para><command>createdb test, create table t1 , insert into t1 values..., select * 109 from t1</command>: Create a database, add a table to it, insert some rows into the table 110 and select them to verify that the installation is working 111 properly.</para> 112 113 </sect2> 114 115 <sect2> 116 <title>Configuring <application>Postgre<acronym>SQL</acronym></application></title> 117 118 <sect3> 119 <title>Config files</title> 120 121 <para><filename>$PGDATA/pg_ident.con</filename>, <filename>$PGDATA/pg_hba.conf</filename>, <filename>$PGDATA/postgresql.conf</filename></para> 122 123 <para>The <envar>PGDATA</envar> environment variable is used to distinguish database 124 clusters from one another by setting it to the value of the directory 125 which contains the cluster desired. The three configuration files 126 exist in every <filename class="directory">PGDATA/</filename> directory. 127 Details on the format of the files and the options that can be set in 128 each can be found in <ulink 129 url="file:///usr/share/doc/postgresql/html/index.html"/>.</para> 130 131 <para>Install the <filename>/etc/rc.d/init.d/postgresql</filename> 132 init script included in the <xref linkend="intro-important-bootscripts"/> package.</para> 133 134 <screen><userinput><command>make install-postgresql</command></userinput></screen> 135 136 </sect3> 137 138 </sect2> 139 140 <sect2> 141 <title>Contents</title> 142 143 <para>The <application>Postgre<acronym>SQL</acronym></application> package contains 144 <command>clusterdb</command>, 145 <command>createdb</command>, 146 <command>createlang</command>, 147 <command>createuser</command>, 148 <command>dropdb</command>, 149 <command>droplang</command>, 150 <command>dropuser</command>, 151 <command>ecpg</command>, 152 <command>initdb</command>, 153 <command>initlocation</command>, 154 <command>ipcclean</command>, 155 <command>pg_config</command>, 156 <command>pg_controldata</command>, 157 <command>pg_ctl</command>, 158 <command>pg_dump</command>, 159 <command>pg_dumpall</command>, 160 <command>pg_encoding</command>, 161 <command>pg_id</command>, 162 <command>pg_resetxlog</command>, 163 <command>pg_restore</command>, 164 <command>pgtclsh</command>, 165 <command>pgtksh</command>, 166 <command>pltcl_delmod</command>, 167 <command>pltcl_listmod</command>, 168 <command>pltcl_loadmod</command>, 169 <command>postgres</command>, 170 <command>postmaster</command>, 171 <command>psql</command>, 172 <command>vacuumdb</command>, 173 <filename class="libraryfile">libecpg</filename>, 174 <filename class="libraryfile">libpgtcl</filename>, 175 <filename class="libraryfile">libpgtypes</filename>, 176 <filename class="libraryfile">libpq</filename> and various charset 177 modules.</para> 178 179 </sect2> 180 181 <sect2><title>Description</title> 182 183 <sect3><title>clusterdb</title> 184 <para><command>clusterdb</command> is a utility for reclustering tables 185 in a <application>Postgre<acronym>SQL</acronym></application> 186 database.</para></sect3> 187 188 <sect3><title>createdb</title> 189 <para><command>createdb</command> creates a new 190 <application>Postgre<acronym>SQL</acronym></application> database.</para></sect3> 191 192 <sect3><title>createlang</title> 193 <para><command>createlang</command> defines a new 194 <application>Postgre<acronym>SQL</acronym></application> procedural 195 language.</para></sect3> 196 197 <sect3><title>createuser</title> 198 <para><command>createuser</command> defines a new 199 <application>Postgre<acronym>SQL</acronym></application> user account.</para></sect3> 200 201 <sect3><title>dropdb</title> 202 <para><command>dropdb</command> removes a 203 <application>Postgre<acronym>SQL</acronym></application> database.</para></sect3> 204 205 <sect3><title>droplang</title> 206 <para><command>droplang</command> removes a 207 <application>Postgre<acronym>SQL</acronym></application> procedural 208 language.</para></sect3> 209 210 <sect3><title>dropuser</title> 211 <para><command>dropuser</command> removes a 212 <application>Postgre<acronym>SQL</acronym></application> user account.</para></sect3> 213 214 <sect3><title>ecpg</title> 215 <para><command>ecpg</command> is the embedded <acronym>SQL</acronym> preprocessor.</para></sect3> 216 217 <sect3><title>initdb</title> 218 <para><command>initdb</command> create a new database cluster.</para></sect3> 219 220 <sect3><title>initlocation</title> 221 <para><command>initlocation</command> creates a secondary database storage 222 area.</para></sect3> 223 224 <sect3><title>ipcclean</title> 225 <para><command>ipcclean</command> removes shared memory and semaphores left over by an 226 aborted database server.</para></sect3> 227 228 <sect3><title>pg_config</title> 229 <para><command>pg_config</command> retrieves 230 <application>Postgre<acronym>SQL</acronym></application> version 231 information.</para></sect3> 232 233 <sect3><title>pg_controldata</title> 234 <para><command>pg_controldata</command> returns information initialized during 235 <command>initdb</command>, such as the catalog version and server 236 locale.</para></sect3> 237 238 <sect3><title>pg_ctl</title> 239 <para><command>pg_ctl</command> controls stopping and starting the database 240 server.</para></sect3> 241 242 <sect3><title>pg_dump</title> 243 <para><command>pg_dump</command> dumps database data and metadata into scripts which are 244 used to recreate the database.</para></sect3> 245 246 <sect3><title>pg_dumpall</title> 247 <para><command>pg_dumpall</command> recursively calls 248 <command>pg_dump</command> for each database in a 249 cluster.</para></sect3> 250 251 <sect3><title>pg_resetxlog</title> 252 <para><command>pg_resetxlog</command> clears the write-ahead log and optionally resets some 253 fields in the <filename>pg_control</filename> file.</para></sect3> 254 255 <sect3><title>pg_restore</title> 256 <para><command>pg_restore</command> creates databases from dump files created by 257 <command>pg_dump</command>.</para></sect3> 258 259 <sect3><title>pgtclsh</title> 260 <para><command>pgtclsh</command> is a <application>Tcl</application> 261 shell interface extended with 262 <application>Postgre<acronym>SQL</acronym></application> database access 263 functions.</para></sect3> 264 265 <sect3><title>pgtksh</title> 266 <para><command>pgtksh</command> is a 267 <application>Tcl</application>/<application>Tk</application> shell 268 interface extended with 269 <application>Postgre<acronym>SQL</acronym></application> database access 270 functions.</para></sect3> 271 272 <sect3><title>postgres</title> 273 <para><command>postgres</command> is a single user database server, generally used for 274 debugging.</para></sect3> 275 276 <sect3><title>postmaster</title> 277 <para><command>postmaster</command> is the multi-user database daemon.</para></sect3> 278 279 <sect3><title>psql</title> 280 <para><command>psql</command> is a console based database shell.</para></sect3> 281 282 <sect3><title>vacuumdb</title> 283 <para><command>vacuumdb</command> compacts databases and generates statistics for the 284 query analyzer.</para></sect3> 285 286 </sect2> 10 287 11 288 </sect1>
Note:
See TracChangeset
for help on using the changeset viewer.