Diff: WebCalendarPostgresql

Differences between current version and predecessor to the previous major change of WebCalendarPostgresql.

Other diffs: Previous Revision, Previous Author

Newer page: version 8 Last edited on March 1, 2012 11:03 pm by PhilHollenback
Older page: version 4 Last edited on January 28, 2009 12:27 pm by PhilHollenback Revert
@@ -1,5 +1,5 @@
-The [WebCalendar System Admininstation Guide|http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/webcalendar/webcalendar/docs/WebCalendar-SysAdmin.html?rev=HEAD&content-type=text/html] does not adequately explain how to set up ~WebCalendar to use the Postgresql database. Here's some further info. 
+The [WebCalendar System Administration Guide|http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/webcalendar/webcalendar/docs/WebCalendar-SysAdmin.html?rev=HEAD&content-type=text/html] does not adequately explain how to set up ~WebCalendar to use the Postgresql database. Here's some further info. 
  
 This is on Fedora Core 1 linux with Postgresql 7.3.4 and ~WebCalendar 0.9.45. 
  
 I assume you have the postgresql rpms installed. Firs, run the following (as root) to start postgres and enable it on boot: 
@@ -61,33 +61,7 @@
 That's it, the database is now set up for webcalendar. Use the admin web interface as described in the docs to point webcalendar at your database using the database name, username, and password you created above. 
  
 Note that this is probably not the most secure way to configure postgresql. 
  
------  
+CategoryGeekStuff  
  
-<?plugin RawHtml  
-<script>  
-var idcomments_acct = '011e5665a1128cdbe79c8077f0f04353';  
-var idcomments_post_id;  
-var idcomments_post_url;  
-</script>  
-<span id="IDCommentsPostTitle" style="display:none"></span>  
-<script type='text/javascript' src='http://www.intensedebate.com/js/genericCommentWrapperV2.js'></script>  
-?>  
-  
------  
-  
-  
-<?plugin RawHtml  
-<center>  
-<script type="text/javascript"><!--  
-google_ad_client = "pub-5011581245921339";  
-google_ad_width = 728;  
-google_ad_height = 90;  
-google_ad_format = "728x90_as";  
-google_ad_channel ="";  
-//--></script>  
-<script type="text/javascript"  
- src="http://pagead2.googlesyndication.com/pagead/show_ads.js">  
-</script>  
-</center>  
-?>  
+CategoryLinuxStuff  

current version

The WebCalendar System Administration Guide does not adequately explain how to set up WebCalendar to use the Postgresql database. Here's some further info.

This is on Fedora Core 1 linux with Postgresql 7.3.4 and WebCalendar 0.9.45.

I assume you have the postgresql rpms installed. Firs, run the following (as root) to start postgres and enable it on boot:

# /sbin/chkconfig postgresql on
# /etc/init.d/postgresql start

Now su to the postgres user to edit a few configuration files and load up the database tables. Generally you need to perform database maintenance tasks as user postgres.

Edit the file /var/lib/pgsql/data/postgresql.conf and add the line

tcp_ip_socket=true

Edit /var/lib/pgsql/data/pg_hba.conf and make it look like this:

# TYPE  DATABASE    USER        IP-ADDRESS        IP-MASK           METHOD

local   all         all                                             trust
host    all         all         127.0.0.1         255.255.255.255   trust

# Using sockets credentials for improved security. Not available everywhere,
# but works on Linux, *BSD (and probably some others)

#local  all     all             ident   sameuser

(i.e. comment out the 'ident' line' and uncomment the two lines that don't use 'ident')

Reload postgresql (still as user postgres):

$ /usr/bin/pg_ctl -D /var/lib/pgsql/data/ restart

Create a postgres user for the webcalendar database, and create the webcalendar database.

$ createuser -A -D -P webcal
<type in a password for the webcal user>
$ createdb -O webcal webcal

Load the tables into the database:

$ psql -U webcal webcal
Welcome to psql 7.3.4-RH, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal slash commands
       \g or terminate with semicolon to execute query
       \q to quit

webcalendar=> \i /var/www/html/webcal/tables-postgres.sql  (actually loads the tables)
webcalendar=> \d  (will list all the tables)
webcalendar=> \q  (quit psql)

That's it, the database is now set up for webcalendar. Use the admin web interface as described in the docs to point webcalendar at your database using the database name, username, and password you created above.

Note that this is probably not the most secure way to configure postgresql.

CategoryGeekStuff

CategoryLinuxStuff



Our Founder
ToolboxClick to hide/show