Changes between Version 6 and Version 7 of sysadminPostgreSQLConfiguration
- Timestamp:
- Jun 23, 2009, 5:46:24 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
sysadminPostgreSQLConfiguration
v6 v7 59 59 Postgres uses the term "database cluster" to describe the directory it uses to store data. During the apt install, a default directory is created, usually at: /var/lib/postgresql/8.3/main. 60 60 61 '''NOTE: ''' our servers have been partitioned to best serve the needs of Evergreen. The default location is not usually on a partition that has been sized appropriately for the Evergreen db. Generally, you will ''' not ''' be using the default install directory for your database cluster.61 || '''NOTE: ''' our servers have been partitioned to best serve the needs of Evergreen. The default location is not usually on a partition that has been sized appropriately for the Evergreen db. Generally, you will ''' not ''' be using the default install directory for your database cluster. || 62 62 63 63 You will need to determine the appropriate partition to install the cluster on. Usually, this is /data. To be sure, you can use the disk free command to see: … … 83 83 84 84 Looking at the above, clearly the /data patition is the largest (84G) compared to the others. 85 ''' NOTE: ''' Having located the largest partition, you will need to create directory for the data cluster, and give the postgres user full access to it. In the spirit of keeping things standardized, we have been using the /postgresql/<version>/main format. 85 86 ||''' NOTE: ''' Having located the largest partition, you will need to create directory for the data cluster, and give the postgres user full access to it. In the spirit of keeping things standardized, we have been using the /postgresql/<version>/main format. || 86 87 87 88 {{{ … … 141 142 == Installing the Evergreen Schema == 142 143 144 All of the follwing commands should be executed as the postgres user, so start with: 145 146 {{{ 147 su postgres 148 }}} 149 150 First you need to create a new db user which can be used to run manage the Evergreen database: 151 152 {{{ 153 createuser -P -s evergreen 154 }}} 155 156 Next, you need to: 1) create the db, 2) add a few programming languages used by Evergreen and 3) add some contributed modules to postgresql that provide extra functionality used by Evergreen like the ability to do cross-tab queries and full text searching. 157 158 {{{ 159 createdb -E UNICODE evergreen 160 createlang plperl evergreen 161 createlang plperlu evergreen 162 createlang plpgsql evergreen 163 psql -f /usr/share/postgresql/8.3/contrib/tablefunc.sql evergreen 164 psql -f /usr/share/postgresql/8.3/contrib/tsearch2.sql evergreen 165 psql -f /usr/share/postgresql/8.3/contrib/pgxml.sql evergreen 166 }}} 167 168 || ''' NOTE: ''' the location of the contrib directory will change depending on how you installed postgres. If you can't find one of the contrib modules listed above, use a find command to locate them ie find / -name pgxml.sql || 169 143 170 144 171