| 180 | == Special Postgresql Issues == |
| 181 | |
| 182 | with postgres, you also need to specifically allow remote hosts to access the server. |
| 183 | |
| 184 | To begin with, you need to tell postgres to listen for connections from other hosts rather then just the localhost (the default). |
| 185 | |
| 186 | As the postgres user, edit postgresql.conf: |
| 187 | |
| 188 | {{{ |
| 189 | sudo vim /etc/postgresql/8.3/main/postgresql.conf |
| 190 | }}} |
| 191 | |
| 192 | Change: |
| 193 | |
| 194 | {{{ |
| 195 | #listen_addresses = ‘localhost’ |
| 196 | }}} |
| 197 | |
| 198 | to: |
| 199 | |
| 200 | {{{ |
| 201 | listen_addresses = ‘<ip address of oils server>’ |
| 202 | }}} |
| 203 | |
| 204 | Next, edit pg_hba.conf: |
| 205 | |
| 206 | {{{ |
| 207 | sudo vim /etc/postgresql/8.3/main/pg_hba.conf |
| 208 | }}} |
| 209 | |
| 210 | and in the area marked "Put your actual configuration here," enter the following: |
| 211 | |
| 212 | {{{ |
| 213 | # Put your actual configuration here |
| 214 | # ---------------------------------- |
| 215 | # |
| 216 | # If you want to allow non-local connections, you need to add more |
| 217 | # "host" records. In that case you will also need to make PostgreSQL listen |
| 218 | # on a non-local interface via the listen_addresses configuration parameter, |
| 219 | # or via the -i or -h command line switches. |
| 220 | # |
| 221 | |
| 222 | host evergreen evergreen 10.104.10.168/32 md5 |
| 223 | }}} |
| 224 | |
| 225 | ||connection type|| in this example, host is used. This means postgres should be looking for a TCP connection (rather then a Unix socket connection for example)|| |
| 226 | ||database||the name evergreen is being used in this example|| |
| 227 | ||user||again, in our hypothetical example, evergreen is the username|| |
| 228 | ||address||the ip address or host name of the machine that's allowed to make a connection. In real life, this would be the oils server address|| |
| 229 | ||authentication options||in this case md5 is used, meaning the password is encrypted|| |
| 230 | |
| 231 | After editing and saving both files, you need to restart postgres. |
| 232 | |
| 233 | |
| 234 | ---- |