From c32ed779e69e61e10caf8c1871a5da823cc4c4b0 Mon Sep 17 00:00:00 2001 From: "mozilla%colinogilvie.co.uk" <> Date: Mon, 1 Aug 2005 06:35:40 +0000 Subject: Bug 297475: Add docs about how to install and configure Bugzilla using PostgreSQL Patch by Colin Ogilvie (with info from mkanat) r=mkanat --- docs/xml/installation.xml | 336 ++++++++++++++++++++++++++++------------------ 1 file changed, 205 insertions(+), 131 deletions(-) (limited to 'docs/xml/installation.xml') diff --git a/docs/xml/installation.xml b/docs/xml/installation.xml index 9b3bcc5ba..07291f607 100644 --- a/docs/xml/installation.xml +++ b/docs/xml/installation.xml @@ -1,5 +1,5 @@ - + Installing Bugzilla @@ -95,7 +95,7 @@ If you don't have it and your OS doesn't provide official packages, visit . Although Bugzilla runs with Perl &min-perl-ver;, - it's a good idea to be using the latest stable version. + it's a good idea to be using the latest stable version. @@ -611,174 +611,248 @@ -
- MySQL +
+ Database Server + This section deals with configuring your database server for use + with Bugzilla. Currently and + are available. + +
+ MySQL - - - MySQL's default configuration is very insecure. - has some good information for - improving your installation's security. - - - -
- Allow large attachments + + + MySQL's default configuration is very insecure. + has some good information for + improving your installation's security. + + - - By default, MySQL will only accept packets up to 64Kb in size. - If you want to have attachments larger than this, you will need - to modify your /etc/my.cnf as below. - +
+ Allow large attachments + + + By default, MySQL will only accept packets up to 64Kb in size. + If you want to have attachments larger than this, you will need + to modify your /etc/my.cnf as below. + - - If you are using MySQL 4.0 or newer, enter: - - [mysqld] + + If you are using MySQL 4.0 or newer, enter: + + [mysqld] # Allow packets up to 1M max_allowed_packet=1M - - If you are using an older version of MySQL, enter: - - [mysqld] + + If you are using an older version of MySQL, enter: + + [mysqld] # Allow packets up to 1M set-variable = max_allowed_packet=1M - - There is also a parameter in Bugzilla called 'maxattachmentsize' - (default = 1000 Kb) that controls the maximum allowable attachment - size. Attachments larger than either the - 'max_allowed_packet' or 'maxattachmentsize' value will not be - accepted by Bugzilla. - - - - This does not affect Big Files, attachments that are stored directly - on disk instead of in the database. Their maximum size is - controlled using the 'maxlocalattachment' parameter. + There is also a parameter in Bugzilla called 'maxattachmentsize' + (default = 1000 Kb) that controls the maximum allowable attachment + size. Attachments larger than either the + 'max_allowed_packet' or 'maxattachmentsize' value will not be + accepted by Bugzilla. - -
+ + + This does not affect Big Files, attachments that are stored directly + on disk instead of in the database. Their maximum size is + controlled using the 'maxlocalattachment' parameter. + + +
+ +
+ Allow small words in full-text indexes + By default, words must be at least four characters in length + in order to be indexed by MySQL's full-text indexes. This causes + a lot of Bugzilla specific words to be missed, including "cc", + "ftp" and "uri". -
- Allow small words in full-text indexes - - By default, words must be at least four characters in length - in order to be indexed by MySQL's full-text indexes. This causes - a lot of Bugzilla specific words to be missed, including "cc", - "ftp" and "uri". - - MySQL can be configured to index those words by setting the - ft_min_word_len param to the minimum size of the words to index. - This can be done by modifying the /etc/my.cnf - according to the example below: + MySQL can be configured to index those words by setting the + ft_min_word_len param to the minimum size of the words to index. + This can be done by modifying the /etc/my.cnf + according to the example below: - [mysqld] + [mysqld] # Allow small words in full-text indexes ft_min_word_len=2 - Rebuilding the indexes can be done based on documentation found at - . - + Rebuilding the indexes can be done based on documentation found at + . + + + + + The ft_min_word_len parameter is only suported in MySQL v4 or higher. + + +
+ +
+ Permit attachments table to grow beyond 4GB - - The ft_min_word_len parameter is only suported in MySQL v4 or higher. + By default, MySQL will limit the size of a table to 4GB. + This limit is present even if the underlying filesystem + has no such limit. To set a higher limit, follow these + instructions. - -
-
- Permit attachments table to grow beyond 4GB + + Run the MySQL command-line client and + enter: + - - By default, MySQL will limit the size of a table to 4GB. - This limit is present even if the underlying filesystem - has no such limit. To set a higher limit, follow these - instructions. - + mysql> ALTER TABLE attachments + AVG_ROW_LENGTH=1000000, MAX_ROWS=20000; + - - Run the MySQL command-line client and - enter: - + + The above command will change the limit to 20GB. Mysql will have + to make a temporary copy of your entire table to do this. Ideally, + you should do this when your attachments table is still small. + - mysql> ALTER TABLE attachments - AVG_ROW_LENGTH=1000000, MAX_ROWS=20000; - + + + This does not affect Big Files, attachments that are stored directly + on disk instead of in the database. + + +
+ +
+ Add a user to MySQL - - The above command will change the limit to 20GB. Mysql will have - to make a temporary copy of your entire table to do this. Ideally, - you should do this when your attachments table is still small. - + + You need to add a new MySQL user for Bugzilla to use. + (It's not safe to have Bugzilla use the MySQL root account.) + The following instructions assume the defaults in + localconfig; if you changed those, + you need to modify the SQL command appropriately. You will + need the $db_pass password you + set in localconfig in + . + - - This does not affect Big Files, attachments that are stored directly - on disk instead of in the database. + We use an SQL GRANT command to create + a bugs user. This also restricts the + bugsuser to operations within a database + called bugs, and only allows the account + to connect from localhost. Modify it to + reflect your setup if you will be connecting from another + machine or as a different user. - + + + Run the mysql command-line client. + + + + If you are using MySQL 4.0 or newer, enter: + + + mysql> GRANT SELECT, INSERT, + UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK TABLES, + CREATE TEMPORARY TABLES, DROP, REFERENCES ON bugs.* + TO bugs@localhost IDENTIFIED BY '$db_pass'; + mysql> FLUSH PRIVILEGES; + + + If you are using an older version of MySQL,the + LOCK TABLES and + CREATE TEMPORARY TABLES + permissions will be unavailable and should be removed from + the permissions list. In this case, the following command + line can be used: + + + mysql> GRANT SELECT, INSERT, + UPDATE, DELETE, INDEX, ALTER, CREATE, DROP, + REFERENCES ON bugs.* TO bugs@localhost IDENTIFIED BY + '$db_pass'; + mysql> FLUSH PRIVILEGES; +
- -
- Add a user to MySQL + +
+ PostgreSQL + + Note if you are using PostgreSQL 8.0.1 or higher, then you + will require to use a version of DBD::Pg which is equal to or + greater than version 1.41 + + + +
+ Add a User to PostgreSQL - - You need to add a new MySQL user for Bugzilla to use. - (It's not safe to have Bugzilla use the MySQL root account.) - The following instructions assume the defaults in - localconfig; if you changed those, - you need to modify the SQL command appropriately. You will + You need to add a new user to PostgreSQL for the Bugzilla + application to use when accessing the database. The following instructions + assume the defaults in localconfig; if you + changed those, you need to modify the commands appropriately. You will need the $db_pass password you set in localconfig in - . - + . - - We use an SQL GRANT command to create - a bugs user. This also restricts the - bugsuser to operations within a database - called bugs, and only allows the account - to connect from localhost. Modify it to - reflect your setup if you will be connecting from another - machine or as a different user. - + On most systems, to create the user in PostgreSQL, you will need to + login as the root user, and then + + bash# su - postgres + + As the postgres user, you then need to create a new user: + + bash$ createuser -U postgres -dAP bugs + + When asked for a password, provide the password which will be set as + $db_pass in localconfig. + The created user will have the ability to create databases and will not be + able to create new users. +
- - Run the mysql command-line client. - +
+ Configure PostgreSQL - - If you are using MySQL 4.0 or newer, enter: - + Now, you will need to edit pg_hba.conf which is + usually located in /var/lib/pgsql/data/. In this file, + you will need to add a new line to it as follows: - mysql> GRANT SELECT, INSERT, - UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK TABLES, - CREATE TEMPORARY TABLES, DROP, REFERENCES ON bugs.* - TO bugs@localhost IDENTIFIED BY '$db_pass'; - mysql> FLUSH PRIVILEGES; + host all bugs 127.0.0.1 255.255.255.255 md5 - - If you are using an older version of MySQL,the - LOCK TABLES and - CREATE TEMPORARY TABLES - permissions will be unavailable and should be removed from - the permissions list. In this case, the following command - line can be used: - + This means that for TCP/IP (host) connections, allow connections from + '127.0.0.1' to 'all' databases on this server from the 'bugs' user, and use + password authentication (md5) for that user. - mysql> GRANT SELECT, INSERT, - UPDATE, DELETE, INDEX, ALTER, CREATE, DROP, - REFERENCES ON bugs.* TO bugs@localhost IDENTIFIED BY - '$db_pass'; - mysql> FLUSH PRIVILEGES; -
-
+ If you are using versions of PostgreSQL + before version 8, you may also need to edit postgresql.conf + , also usually found in the /var/lib/pgsql/data/ folder. + You will need to make a single line change, changing + + # tcpip_socket = false + + to + + tcpip_socket = true + + Now, you will need to restart PostgreSQL, but you will need to fully + stop and start the server rather than just restarting due to the possibility + of a change to postgresql.conf. After the server has + restarted, you will need to edit localconfig, finding + the $db_driver variable and setting it to + Pg and changing the password in $db_pass + to the one you picked previously, while setting up the account. +
+
+
checksetup.pl -- cgit v1.2.3-24-g4f1b