Koozali.org: home of the SME Server

Egroupware and yum

Offline pdabrowski

  • *
  • 13
  • +0/-0
Egroupware and yum
« on: May 18, 2012, 03:48:38 PM »
Hi,
SME Server 8 beta 7 and Egroupware 1.8.0.0.4

Recently upgraded egroupware to throug SME server software install and got error:

   Updating       : eGroupware
> 27/54
> chcon: couldn't compute security context from unlabeled
> /var/tmp/rpm-tmp.44007: line 2: setsebool: command not found
> rpm_post_install.php must NOT be called as web-page -->  exiting !!!
> EGroupware install log saved to /root/eGroupware-install.log
>
>    Cleanup        : eGroupware-phpfreechat

Ralf from Egroupware suggesting that it could be a sutup in SME server shell environment. His response posted bellow.
Culd I have any advise where to look?

Hi Peter,

your output from "/usr/bin/php -i" can NOT be from the same php
interpreter running the post-install script, as $_SERVER['HTTP_HOST'] is
NOT set, which is the expected behavior and would not trigger aborting
with the error message "can not be called as web-page".

Maybe for some wired reason you have HTTP_HOST set in your shell
enviroment, that would trigger the described behavior when using yum to
install egroupware.

Ralf

Thanks and best regards
Peter

Offline mmccarn

  • *
  • 2,651
  • +10/-0
Re: Egroupware and yum
« Reply #1 on: May 19, 2012, 01:59:36 PM »
I assume this is the egroupware forum thread you are referring to:
http://www.egroupware.org/forum#nabble-td3889146

Your second post in that thread says "SOLVED".  Is there a problem that still needs solving, or are you simply trying to figure out why the egroupware yum update required a subsequent, manual, database version update?

What version of egroupware were you running before the update attempt?

Is an upgrade from that version to v1.8.004 supported for egroupware (that is, what are the pre-requisites for updating to v1.8.004)?

I also notice that most of your discussion with Ralf on the egroupware forum about $_SERVER[HTTP_HOST] occurs after you made an incomplete reference to the error message, showing only the single line that says:
rpm_post_install.php must NOT be called as web-page -->  exiting !!!

Later in the thread you show the same error in context - where it occurs immediately following another error.  This leaves me wondering if the first error indicates a different problem than the second error:
  Updating       : eGroupware                                             27/54
chcon: couldn't compute security context from unlabeled
/var/tmp/rpm-tmp.44007: line 2: setsebool: command not found
rpm_post_install.php must NOT be called as web-page --> exiting !!!
EGroupware install log saved to /root/eGroupware-install.log



Offline pdabrowski

  • *
  • 13
  • +0/-0
Re: Egroupware and yum
« Reply #2 on: May 19, 2012, 02:45:40 PM »
The first issue was database error after version upgrade from 1.8.0.0.3 to 1.8.0.0.4
I managed to figure it out and resolved through egroupware setup utility.
so it looks that yum did not finish installation/upgrade properly.

second time it come to my attention with minor bug fixing upgrade when during upgrading I've put attention to yum otput
and got this massage:

chcon: couldn't compute security context from unlabeled
/var/tmp/rpm-tmp.44007: line 2: setsebool: command not found
rpm_post_install.php must NOT be called as web-page --> exiting !!!

probably this massage was shown during first major upgrade but I didn't put any attention to yum install output.
All Egroupware upgrades are official releases and installed through SME Server Software Installer panel

Best Regards
Peter

Offline damjan

  • **
  • 25
  • +0/-0
Re: Egroupware and yum
« Reply #3 on: June 13, 2012, 10:01:00 PM »
"All Egroupware upgrades are official releases and installed through SME Server Software Installer panel"

Hi Peter,

Can you be so kind and provide us with some instruction how to install eGroupware 1.8.004 on SME 8.0.
As far as I know the instructions are only for old versions ( SME 7.x or eGW 1,4x, 1.6x):

http://wiki.contribs.org/Egroupware

Thank you for your replay.

D.

Offline pdabrowski

  • *
  • 13
  • +0/-0
Re: Egroupware and yum
« Reply #4 on: June 14, 2012, 10:31:50 AM »
Hi,
I would create wiki page coming weekend with instruction how to install egroupware 1,8 on sme server

Best Regards
Peter

Offline damjan

  • **
  • 25
  • +0/-0
Re: Egroupware and yum
« Reply #5 on: June 14, 2012, 11:09:58 AM »
Hi Peter,

Thank you for your replay and willingness to do some extra effort.
Good luck with howto -wiki.

BTW :
If you will find some more time please can you check if sending emails from eGW mail client works on SME 8.0  as well.

Regards

D.

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Egroupware and yum
« Reply #6 on: June 14, 2012, 12:32:44 PM »
pdabrowski

Why reinvent the wheel ?
If you already have egroupware installed on your sme server, then comprehensive upgrade instructions are here
http://community.egroupware.org/index.php?page_name=wiki&lang=&wikipage=ManualSetupUpdate

If you are after install instructions then see here
http://community.egroupware.org/wiki?wikipage=ManualSetup

Quote
I would create wiki page coming weekend with instruction how to install egroupware 1,8 on sme server

Perhaps just add links to the information above, to the existing egroupware wiki page at
http://wiki.contribs.org/Egroupware
Maybe add any sme server specific steps.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline pdabrowski

  • *
  • 13
  • +0/-0
Re: Egroupware and yum
« Reply #7 on: June 17, 2012, 10:14:38 AM »
Install eGroupWare from opensuse repositories.

## CREATE YUM REPOSITORY
/sbin/e-smith/db yum_repositories set server_eGroupWare repository \
Name 'server_eGroupWare' \
BaseUrl ''http://download.opensuse.org/repositories/server:/eGroupWare/CentOS_5/  \
EnableGroups no \
GPGCheck yes \
GPGKey http://download.opensuse.org/repositories/server:/eGroupWare/CentOS_5/repodata/repomd.xml.key \
Visible no \
status disabled

signal-event yum-modify

yum install eGroupware –enablerepo=*

## CREATE MySQL DB & USER
mysqladmin -u root create egroupware
mysql -e " grant all privileges on egroupware.* to 'egroupware'@'localhost' "
mysql -u root -e " SET PASSWORD FOR egroupware@localhost = PASSWORD( 'egroupware_db_password' ) "
mysqladmin flush-privileges

## FIXING SECURITY
chmod 666 /usr/share/egroupware/header.inc.php
chmod 777 /var/lib/egroupware/default/backup/
chmod 777 /var/lib/egroupware/default/files/

## APACHE CONFIG
rm /etc/httpd/conf.d/egroupware.conf
cat > /etc/e-smith/templates/etc/httpd/conf/httpd.conf/98eGroupWare << EOF
####################################
#  eGroupWare
####################################
Alias /egroupware /usr/share/egroupware
<Directory /usr/share/egroupware/>
  AddType application/x-httpd-php .php .php3 .phtml
  AddType text/xml .xml
  Options FollowSymLinks ExecCGI
  AllowOverride None
  Order allow,deny
  Allow from all
  DirectoryIndex index.html index.php
  AddHandler cgi-script .cgi
  AddDefaultCharset Off
  php_flag file_uploads on
  php_flag log_errors on
  php_flag magic_quotes_gpc off
  php_flag magic_quotes_runtime off
  php_flag register_globals off
  php_flag short_open_tag on
  php_flag track_vars on
  php_flag display_errors off
  php_value error_reporting 'E_ALL & ~E_NOTICE'
  php_value max_execution_time 90
  php_admin_value mbstring.func_overload 7
  php_value memory_limit 48M
  php_value session.gc_maxlifetime 14400
  php_value include_path .:/usr/share/pear
  php_value open_basedir /usr/share/egroupware:/var/lib/egroupware:/tmp:/usr/share/pear
  php_value upload_max_filesize 8M
  <Files ~ "\.inc\.php$">
    Order allow,deny
    Deny from all
  </Files>
</Directory>
<Directory /usr/share/egroupware/phpsysinfo/>
  php_value open_basedir /
</Directory>
<Location /egroupware/icalsrv/icalsrv.php>
    Script PUT /usr/share/egroupware/icalsrv/icalsrv.php
    AddHandler ical/ics .ics
    Action ical/ics /usr/share/egroupware/icalsrv/icalsrv.php
    Order allow,deny
    Allow from all
</Location>
<Location /egroupware/rpc.php>
    php_admin_value mbstring.func_overload 0
    Order allow,deny
    Allow from all
</Location>
EOF

## APPLY CHANGES
expand-template /etc/httpd/conf/httpd.conf
/etc/rc7.d/S86httpd-e-smith sigusr1

## SETUP EGROUPWARE
http://yourdomain.com/egroupware/setup

## ONCE INSTALLED, PUT SECURITY BACK
chmod 644 /usr/share/egroupware/header.inc.php

## TO UPGRADE
yum update eGroupware –enablerepo=*
before upgrade copy header.inc.php and put it back after upgrade

Offline pdabrowski

  • *
  • 13
  • +0/-0
Re: Egroupware and yum
« Reply #8 on: June 17, 2012, 10:31:53 AM »
damjan,

If you encounter any problems just let us know,
make sure that repository is disabled by default.
Initially I left it enabled and end up with some problems,
I just run upgrade and went through without any issues.

mary,
Yes , I agree there is plenty of info on wiki and forums but it took me many hours to find what I want.
Above instructions would allow to nstall latest eGroupware releases and upgrades directly from their opensuse repository on SME server with easy.
Maybe I should add this to this wiki page, as there are many relevant instructions.
http://wiki.contribs.org/Egroupware

Best regards
Peter

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Egroupware and yum
« Reply #9 on: June 17, 2012, 12:23:42 PM »
pdabrowski

 Your installation howto is great, and it's good that egroupware is maintained in the opensuse repo. Please do add it to the current wiki article.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline damjan

  • **
  • 25
  • +0/-0
Re: Egroupware and yum
« Reply #10 on: June 19, 2012, 01:29:06 PM »
damjan,

If you encounter any problems just let us know,
make sure that repository is disabled by default.


Hi Peter.

I can not get repo in order:


[root@sme8demo ~]# /sbin/e-smith/db yum_repositories set server_eGroupWare repository \
> Name 'server_eGroupWare' \
> BaseUrl ''http://download.opensuse.org/repositories/server:/eGroupWare/CentOS_5/  \
> EnableGroups no \
> GPGCheck yes \
> GPGKey http://download.opensuse.org/repositories/server:/eGroupWare/CentOS_5/repodata/repomd.xml.key \
> Visible no \
> status disabled
[root@sme8demo ~]# signal-event yum-modify
[root@sme8demo ~]# yum install eGroupware enablerepo=*
Loaded plugins: fastestmirror, protect-packages, smeserver
Loading mirror speeds from cached hostfile
 * base: ftp.arnes.si
 * smeaddons: smeserver.mirror.garr.it
 * smeextras: smeserver.mirror.garr.it
 * smeos: smeserver.mirror.garr.it
 * smeupdates: smeserver.mirror.garr.it
 * updates: ftp.arnes.si
Excluding Packages from CentOS - os
Finished
Excluding Packages from CentOS - updates
Finished
Setting up Install Process
No package eGroupware available.
No package enablerepo=* available.
Nothing to do


Installation stops at step 3.

Thank you for your feedback

Damjan


Offline pdabrowski

  • *
  • 13
  • +0/-0
Re: Egroupware and yum
« Reply #11 on: June 19, 2012, 01:52:26 PM »
[root@sme8demo ~]# yum install eGroupware enablerepo=*

command should be:

yum install eGroupware --enablerepo=*

check for repository too

/sbin/e-smith/auditools/repositories
it should list all yum repositories

Offline damjan

  • **
  • 25
  • +0/-0
Re: Egroupware and yum
« Reply #12 on: June 19, 2012, 02:20:20 PM »
Hi Peter,

Yes it should be :
yum install eGroupware --enablerepo=*

but there is no base url added into the repo :
[server_eGroupWare]
enabled=0
baseurl=
name=server_eGroupWare
gpgcheck=1
enablegroups=0
gpgkey=http://download.opensuse.org/repositories/server:/eGroupWare/CentOS_5/repodata/repomd.xml.key

Maybe because of " ?
BaseUrl ''http://download.opensuse.org/repositories/server:/eGroupWare/CentOS_5/  \


Thank you for your feedback

Damjan

Offline pdabrowski

  • *
  • 13
  • +0/-0
Re: Egroupware and yum
« Reply #13 on: June 19, 2012, 02:27:02 PM »

Offline damjan

  • **
  • 25
  • +0/-0
Re: Egroupware and yum
« Reply #14 on: June 19, 2012, 09:55:13 PM »
Hi,

Some progress has been made.

1. eGroupware was installed on SME 8.0 , but during the installation it replayed with this error (in log):

(chcon: couldn't compute security context from unlabeled
/var/tmp/rpm-tmp.35581: line 2: setsebool: command not found
/usr/bin/php -d memory_limit=256M /usr/share/egroupware/setup/setup-cli.php --setup-cmd-database sub_command=create_db 'domain=default' 'db_type=mysql' 'db_host=localhost' 'db_port=3306' 'db_name=egroupware' 'db_user=egroupware' 'db_pass=Gmm7xrBE|jnCrkMZ' 'db_root=root' 'db_root_pw=' 'db_grant_host=localhost'
Can not connect to mysql database mysql on host localhost:3306 using user root! (ADOdb::Connect(localhost:3306, root, $Password, mysql) failed.:
Access denied for user 'root'@'localhost' (using password: NO))

Installation failed --> exiting!

2. On the setup page :
## SETUP EGROUPWARE
http://yourdomain.com/egroupware/setup

Setup - Domain: default(mysql)

the connection with mysql could not be established:
Database error: ADOdb::PConnect(localhost:3306, root, $Password, mysql) failed.
mysql Error: 1045 (Access denied for user 'root'@'localhost' (using password: NO))

Function: egw_db->query / egw_db->create_database

Database error: ADOdb::PConnect(localhost:3306, root, $Password, egroupware) failed.
mysql Error: 1045 (Access denied for user 'root'@'localhost' (using password: YES))

Function: egw_db->create_database

I assume that the steps:
## CREATE MySQL DB & USER
mysqladmin -u root create egroupware
mysql -e " grant all privileges on egroupware.* to 'egroupware'@'localhost' "
mysql -u root -e " SET PASSWORD FOR egroupware@localhost = PASSWORD( 'egroupware_db_password' ) "
mysqladmin flush-privileges

misses some explanation.

IIRC in SME root password for mysql can not be changed in easy way and do so it is not recommended.  What is then function of user egroupware?

Br

Damjan