Koozali.org: home of the SME Server

Install eGroupWare 1.0.0.005 on 6.0.1-01 with Postgres 7.4.2

dave_d

Install eGroupWare 1.0.0.005 on 6.0.1-01 with Postgres 7.4.2
« on: September 10, 2004, 06:01:57 PM »
If anyone's interested in trying out eGroupWare on an SME server, this is how I set about getting things to work (E&OE):


1. Upgrade php to version 4.3.8.  Do this as described in various places in contribs.org.  Look at:

 http://www.ibiblio.org/pub/linux/distributions/e-smith/contrib/DanBrown/RPMS/i386/  
or
http://ergin.dyndns.org/download/

2. Install Postgres 7.4.2 as described in contribs.org.  Look at a very clear description about how to do this at:

http://no.longer.valid/phpwiki/index.php/PostgreSQL

3. Create a template file for modifying php.ini to include the postgres extension..  Create /etc/e-smith/template-custom/etc/php.ini/70PgsqlExtension.  This file should contain a single line:

extension=pgsql.so

4.  Before expanding the template check that a file called libpq.so.2 exists.  Probably the easiest way to do this is to issue the command:

# ldd /usr/lib/php4/pgsql.so

and see if a missing libpq.so.2 is reported.  If the file is missing, do the following (BEWARE!!  I don’t know anything about libpq and in particular I don’t know about the differences between version 2 and 3.  However, this fix seems to work and I’ve found no adverse effects so far!)

# ln –s /usr/lib/libpq.so.3 /usr/lib/libpq.so.2

Check again.  If all is well expand the php.ini template.

# /sbin/e-smith/expand-template /etc/php.ini

and restart the httpd service.

# service httpd restart

Check for any errors.

5. Create an ibay to hold the eGroupWare stuff.  Do this using the standard server interface.  I called mine egroupware (very original).

6.  Download the eGroupWare tarball from sourceforge.  Visit www.egroupware.org to get a link to the latest download.  Create a temporary directory /downloads on the server, move the tarball into this new directory and expand it.  As I had done the download via a Windoze box and stored it into my home directory on the server the following worked for me:

# mv /home/e-smith/files/users/<username>/home/eGroupWare-1.0.00.005-1.tar.gz /downloads
# tar –zxvf eGroupWare-1.0.00.005-1.tar.gz

Now move the resultant structure to the target iBay and change the file ownerships:
# cd /downloads/egroupware
# cp –R * /home/e-smith/files/ibays/egroupware/html
# chown –R www:shared /home/e-smith/files/ibays/egroupware/html

7.  Create a directory description section for httpd.conf.  To do this create the file /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/ 97egroupware and insert the following content:

Alias /egw /home/e-smith/files/ibays/egroupware/html
<Directory /home/e-smith/files/ibays/egroupware/html>
AddType application/x-httpd-php .php .php3 .phtml
Options Indexes +Includes FollowSymLinks
order deny,allow
deny from all
allow from all
php_flag register_globals off
php_value mbstring.func_overload 7
DirectoryIndex index.html index.htm index.php
</Directory>

Expand the template and restart httpd.

# /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
# service httpd restart

8.  Now set up the postgres access and create the required database. (Note: As this is a test installation, the security on the Postgres database is quite lax.  However, it’s easy to tighten it up later.)  Modify the file   /etc/e-smith/templates-custom/var/lib/pgsql/data/pg_hba.conf so that the last lines read:

local  all    all             trust
host   all    all <this server ip>  255.255.255.0    trust
host   all    all 127.0.0.1      255.255.255.0    trust
host   all    all 0.0.0.0        255.255.255.255  reject

(This file will have been created during installation of Postgres).  Now expand the template and restart Postgres:

# /sbin/e-smith/expand-template /var/lib/pgsql/data/pg_hba.conf
# /etc/init.d/postgresql stop
Stopping postgresql service: [OK]
# /etc/init.d/postgresql start
Starting postgresql service: [OK]

9.  Create the database user and database required for eGroupWare.  Do this as follows:

# su postgres
bash-2.05a$  createuser egw –P
<type the password>
bash-2.05a$ Shall the new user be allowed to create databases (y/n) y
bash-2.05a$ Shall the new user be allowed to create new users (y/n) n

bash-2.05a$ createdb –U egw egw

10.  Finally we can start the actual installation of eGroupWare.  From a connected PC point a browser at https://<your server>/egw/setup and click on the ‘Check installation’ button.  Fix any errors that occur and follow instructions!!  It all worked for me!

11.   :pint:  :pint:  :pint:

Offline markehle

  • ****
  • 125
  • +0/-0
Install eGroupWare 1.0.0.005 on 6.0.1-01 with Postgres 7.4.2
« Reply #1 on: November 06, 2004, 05:29:30 PM »
Hi -

I followed this howto and substituted mysql for postgre and it worked fine, but I can't get the file manager app to allow me to upload anything. If I set my config to use SQL to store/retrieve file contents, it works, but I would rather keep the files on the disk instead of in the database.

My setup includes this:
temp path:
/tmp

full path for users and group files:
/home/e-smith/files/ibays/egroupware/files

eGroupWare's URL:
http://(my domain)/egroupware

What do I need to do?

Thanks!

Mark

Offline markehle

  • ****
  • 125
  • +0/-0
Install eGroupWare 1.0.0.005 on 6.0.1-01 with Postgres 7.4.2
« Reply #2 on: November 06, 2004, 05:31:00 PM »
Hi -

I followed this howto and substituted mysql for postgre and it worked fine, but I can't get the file manager app to allow me to upload anything. If I set my config to use SQL to store/retrieve file contents, it works, but I would rather keep the files on the disk instead of in the database.

My setup includes this:
temp path:
/tmp

full path for users and group files:
/home/e-smith/files/ibays/egroupware/files

eGroupWare's URL:
http://(my domain)/egroupware

What do I need to do?

Thanks!

Mark

Offline markehle

  • ****
  • 125
  • +0/-0
Install eGroupWare 1.0.0.005 on 6.0.1-01 with Postgres 7.4.2
« Reply #3 on: November 06, 2004, 05:44:49 PM »
I lied - when I use SQL for file storage, the file names are saved, but the documents are blank!

Help!

kangkc

Install eGroupWare 1.0.0.005 on 6.0.1-01 with Postgres 7.4.2
« Reply #4 on: November 16, 2004, 07:30:26 AM »
This may be a late reply but for those who has problem with eGroupware.

Just installed eGroupware and everything works fine except for file upload which is used in Filemanager, Mail attachment and other modules. No error is generated except that the file is not uploaded.

I found out the cause for this problem:

By default, php use /tmp as a temporary directory and in the <Directroy> derivatives of httpd.conf, open_basedir is used to restrict to the specific ibays directory for egroupware. Hence all uploadusing PHP failed.

What I did is to code a custom template with the following:

<Directory /home/e-smith/files/ibays/egroupware/html>
    AddType application/x-httpd-php .php .php3 .phtml
    AddType application/x-httpd-php-source .phps
    php_admin_value open_basedir "/home/e-smith/files/ibays/egroupware:/tmp"
</Directory>

This custom template changed the default httpd.conf generated by ibays to include /tmp in the open_basedir.

It's now working.

I suspect for all PHP related upload problem can be resolved using this custom templates. Only thing I'm not too sure is th implication on security. Any security expert can share their view?