PDA

View Full Version : configuring PGSQL --enable-syslog (howto)


gLn23
03-15-02, 22:58
i configure PostgreSQL7.2 with enable-syslog into my RedHat7.2 Machine, then i add/change some lines to postgresql.conf, /etc/syslog.conf, and /etc/logrotate/syslog

============================================
postgresql.conf:
---change---
#log_connections = false
log_connections = true

#syslog = 0
syslog = 2

============================================
/etc/syslog.conf:
---add---
local0.* /var/log/postgresql.log

============================================
/etc/logrotate/syslog
---change---
/var/log/messages /var/log/secure ... /var/log/postgresql.log

============================================



:confused:

anybody? am i changing the right files? hmmm...pls.. HELP me guys...

thanx!

MaleMan
03-19-02, 19:33
i think ur on the right files... :D

i just configured my postgreSQL with syslog enabled, just like that...

cherie
09-11-02, 07:57
Hi,

Can you please tell me how do you set enable_syslog in your system?

thx

MaleMan
09-11-02, 22:16
assuming RedHat7.x machine.

try configuring your postgresql from tar and owned the extracted folder by user postgres then as postgres use this command:
--> ./configure --enable-syslog
--> make
--> make check (for database testing)
--> make install (i suggest, use "checkinstall")
--> /~home_postgres/bin/initdb -D /database/directory/
--> cd /etc/rc.d/init.d/
--> cp /usr/local/src/postgresql7.x.x/contrib/start-scripts/linux ./postgresql
--> chmod 755 postgresql
--> chkconfig --add postgresql

add or change:
--> /data/directory/postgresql.conf (change)
--> uncomment syslog
--> syslog = 2
--> /etc/syslog.conf (add)
--> #PostgreSQL
--> local0.* /var/log/postgreSQL.log
--> /etc/logrotate.d/syslog (add)
--> /var/log/postgreSQL.log /var/log/messages .... (and so on)

start/restart service (syslog, postgresql)
thats all...
:D