Koozali.org: home of the SME Server

Egroupware on SMe8

Offline soprom

  • *
  • 589
  • +0/-0
    • www.logiciel-libre.org
Egroupware on SMe8
« on: March 18, 2010, 12:09:38 AM »
As I want to apply updates on EGW when needed, the rpm install is not my preferred one.  Here is the method I use, and I would like to submit it for comments.  For example, it would be cool to create an ibay with the script, etc..

With this method, I also want to...

    * access EGW by calling a subdomain like "egroupware.mydomain.com",
    * use either EGW 1.6 or 1.7,
    * store files on a webdav drive

So here is how I do it...

1. Create folders:

Folders used for EGW, httpd.conf and php

Code: [Select]
mkdir -p /opt/egw/1.6/userdata{tmp,files,backup}
mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts
mkdir -p /etc/e-smith/templates-custom/etc/php.ini

2. Create database

Watch out for your password here...

Code: [Select]
mypasswd='!very-$-strong-$-password!not-.-like-.-123456!'
mysql -e "CREATE DATABASE egroupware;"
mysql -e "GRANT ALL ON egroupware.* TO egroupware@localhost IDENTIFIED BY $mypasswd;"
mysql -e "FLUSH PRIVILEGES"

3. Copy files to folders and set permissions

Download attached files to your system and place them on the server.  Then set rigths for them.
..edited..
Code: [Select]
mkdir /root/egroupware
cd /root/egroupware
wget http://logicielslibres.sophieromano.com/system/files/20IbayContent.txt
wget http://logicielslibres.sophieromano.com/system/files/98egroupware.txt
wget http://logicielslibres.sophieromano.com/system/files/egwupdate.txt
wget http://logicielslibres.sophieromano.com/system/files/svnupdateperms.txt
wget http://logicielslibres.sophieromano.com/system/files/81timez.txt

Review those files and edit the timezone, 98egroupware as needed.  Beware! 20IbayContent is modified and does not handle basedir the same way as stated on the Wiki.  Then, move files to folders:
...edited...
Code: [Select]
cp 20IbayContent.txt /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts/20IbayContent
cp 98egroupware.txt /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/98egroupware
cp 81timez.txt /etc/e-smith/templates-custom/etc/php.ini/81timez
cp egwupdate.txt /opt/egw/1.6/egwupdate
cp svnupdateperms.txt /opt/egw/1.6/svnupdateperms

and edit permissions:
Code: [Select]
chmod u+x /opt/egw/1.6/egwupdate
chmod u+x /opt/egw/1.6/svnupdateperms
chown -R www:www /opt/egw/1.6/userdata
chmod -R 770 /opt/egw/1.6/userdata/files
chmod -R 770 /opt/egw/1.6/userdata/backup
chmod -R 770 /opt/egw/1.6/userdata/tmp

4. Create a domain and an iBay for a DAV file system for EGW from the server-manager

    * Create ibay egwdav (and a group) without script handling, with Read/Write only for group.
    * Create subdomain (like http://davegw.mydomain.com) using ibay egwdav.
    * Create domain like egroupware.yourdomain.com (and edit DNS if requiered) using internet dns.


5. Add repositories

If not done already, add contribs to repositories

Code: [Select]
db yum_repositories \
setprop smecontribs \
MirrorList http://distro.ibiblio.org/pub/linux/distributions/smeserver/mirrorlist/s...
signal-event yum-modify


6. Install packages

Add packages and install EGW using subversion...

Code: [Select]
yum install subversion
yum install smeserver-mod_dav --enablerepo=smecontribs
pear install XML_Feed_Parser

/opt/egw/1.6/egwupdate
/opt/egw/1.6/svnupdateperms

7. Configuration

Map egroupware to subdomain

Code: [Select]
mydomain=egroupware.yourdomain.com
db domains setprop $mydomain Content egw/1.6/egroupware
db domains setprop $mydomain WebApp yes

Make ibay DAV

This will be used as a filesystem when installing EGW. So instead of the standard VFS "/opt/egw/1.6/userdata/files", we would be able to use something like "http://davegw.mydomain.com/"

Code: [Select]
myibay=egwdav
/sbin/e-smith/db accounts setprop $myibay ModDav enabled
/sbin/e-smith/signal-event ibay-modify $myibay


8. Apply changes

Code: [Select]
expand-template /etc/httpd/conf/httpd.conf
sv t httpd-e-smith

When done with egroupware's setup, protect config.
See http://wiki.contribs.org/Egroupware#Starting_with_eGroupWare for initial setup

Code: [Select]
mv /opt/egw/1.6/egroupware/header.inc.php /opt/egw/1.6
ln -s /opt/egw/1.6/header.inc.php /opt/egw/1.6/egroupware/header.inc.php
chmod 644 /opt/egw/1.6/header.inc.php

 

Notes and links

    * http://wiki.contribs.org/DAV
    * http://www.egroupware.org/index.php?page_name=wiki&wikipage=WebDav

When doing an update, backup database.

Som people say that updating Egroupware in the same folder is not safe since it can bring a broken or buggy version.  This is mainly true for dev version like 1.7.

 

Subversion: how it is used here...

Code: [Select]
#!/bin/sh
# yum install subversion

echo "Egroupware 1.6 SVN update"
myegw="/opt/egw/1.6"
echo "in folder $myegw"
cd $myegw
echo "...checking"

# 1.7 = svn checkout http://svn.egroupware.org/egroupware/trunk/aliases/default .
# 1.6 = svn checkout http://svn.egroupware.org/egroupware/branches/1.6/aliases/default .

svn checkout http://svn.egroupware.org/egroupware/branches/1.6/aliases/default . | tee $myegw/svnupdate.txt
cat $myegw/svnupdate.txt|grep "^U" > $myegw/svnupdate_u.txt

echo "Remove htaccess to let httpd.conf handle parameters"
#rm -f $myegw/egroupware/.htaccess

if [[ -s $myegw/svnupdate_u.txt ]]
then
    echo "...apply changes"
    cat $myegw/svnupdate_u.txt
    $myegw/svnupdateperms
else
    echo "...No updates."
fi
echo "Done"
rm -f $myegw/svnupdate.txt

Thanks for comments and recommendations...
« Last Edit: March 21, 2010, 03:26:12 AM by soprom »
Sophie from Montréal

Offline newburns

  • *
  • 345
  • +0/-0
  • A good plumber, noob developer
    • Mt. Rose MEdia
Re: Egroupware on SMe8
« Reply #1 on: March 19, 2010, 01:34:57 AM »
I love this, so straightforward, but I have just one question, and please be gentle, I do not understand code fully just yet. I googled SVn to see what that means and came up with the idea that it is a way to keep something up to date from the source's website. Whether that is true or not, I just want to install eGroupware stable version, 1.6, without the dev version 1.7 --> What should I not do in your instructions because it seems to me that every line of your code is relative to the 1.6 version. I would like the DAV option and don't mind putting that folder into it's own Ibay, or the default location. Thankyou for your understanding.  :o
SME 8.0
Quad 6600
8gb DDR2 800
8 TB RAID 5
Dual Gigabit NIC
I Still Don't KNOW WHAT I AM DOING. Please, don't assume I know anything about Linux or Centos, I just know hardware

Offline mmccarn

  • *
  • 2,651
  • +10/-0
Re: Egroupware on SMe8
« Reply #2 on: March 19, 2010, 02:14:58 PM »
Quote from: soprom's update script
# 1.7 = svn checkout http://svn.egroupware.org/egroupware/trunk/aliases/default .
# 1.6 = svn checkout http://svn.egroupware.org/egroupware/branches/1.6/aliases/default .

svn checkout http://svn.egroupware.org/egroupware/branches/1.6/aliases/default . | tee $myegw/svnupdate.txt
soprom is using SVN to install patches and updates for v1.6.  The command is given for either 1.7 or 1.6, but only the 1.6 version is "active" (the other two are commented out).

Offline newburns

  • *
  • 345
  • +0/-0
  • A good plumber, noob developer
    • Mt. Rose MEdia
Re: Egroupware on SMe8
« Reply #3 on: March 19, 2010, 02:59:02 PM »
Thankyou. So, if I am not mistaken, the # is similiar to <!-- --> in HTML Coding. Thanks again
One Last problem, the wget links are not found. http error 404
« Last Edit: March 19, 2010, 03:19:23 PM by newburns »
SME 8.0
Quad 6600
8gb DDR2 800
8 TB RAID 5
Dual Gigabit NIC
I Still Don't KNOW WHAT I AM DOING. Please, don't assume I know anything about Linux or Centos, I just know hardware

Offline soprom

  • *
  • 589
  • +0/-0
    • www.logiciel-libre.org
Re: Egroupware on SMe8
« Reply #4 on: March 19, 2010, 03:17:30 PM »
i edited the script to correct download paths and copying.
Sophie from Montréal

Offline newburns

  • *
  • 345
  • +0/-0
  • A good plumber, noob developer
    • Mt. Rose MEdia
Re: Egroupware on SMe8
« Reply #5 on: March 19, 2010, 03:21:48 PM »
i edited the script to correct download paths and copying.
Now its error 403 Forbidden. I put the link in with my Windows IE, and it says "Accès refusé
Vous n'êtes pas autorisé(e) à accéder à cette page."
--edited--
One more, EGWupdate and 98egroupware
« Last Edit: March 19, 2010, 03:42:35 PM by newburns »
SME 8.0
Quad 6600
8gb DDR2 800
8 TB RAID 5
Dual Gigabit NIC
I Still Don't KNOW WHAT I AM DOING. Please, don't assume I know anything about Linux or Centos, I just know hardware

Offline soprom

  • *
  • 589
  • +0/-0
    • www.logiciel-libre.org
Re: Egroupware on SMe8
« Reply #6 on: March 19, 2010, 03:53:23 PM »
please retry...
it should read http://logicielslibres.sophieromano.com/system/files/20IbayContent. with a dot at the end
Sophie from Montréal

Offline newburns

  • *
  • 345
  • +0/-0
  • A good plumber, noob developer
    • Mt. Rose MEdia
SME 8.0
Quad 6600
8gb DDR2 800
8 TB RAID 5
Dual Gigabit NIC
I Still Don't KNOW WHAT I AM DOING. Please, don't assume I know anything about Linux or Centos, I just know hardware

Offline newburns

  • *
  • 345
  • +0/-0
  • A good plumber, noob developer
    • Mt. Rose MEdia
Re: Egroupware on SMe8
« Reply #8 on: March 20, 2010, 12:26:51 AM »
Or, tell me where you got these files and I'll go right to the source. It's an awesome tutorial, however, I am not able to go through it without those two files.
Yea, I was able to get
mkdir /root/egroupware
cd /root/egroupware
wget http://logicielslibres.sophieromano.com/system/files/20IbayContent.
wget http://logicielslibres.sophieromano.com/system/files/svnupdateperms.
wget http://logicielslibres.sophieromano.com/system/files/81timez.

but not
wget http://logicielslibres.sophieromano.com/system/files/98egroupware.
wget http://logicielslibres.sophieromano.com/system/files/egwupdate.

SME 8.0
Quad 6600
8gb DDR2 800
8 TB RAID 5
Dual Gigabit NIC
I Still Don't KNOW WHAT I AM DOING. Please, don't assume I know anything about Linux or Centos, I just know hardware

Offline soprom

  • *
  • 589
  • +0/-0
    • www.logiciel-libre.org
Re: Egroupware on SMe8
« Reply #9 on: March 20, 2010, 01:33:14 AM »
I edited the script and the url are now ok
Sophie from Montréal

Offline newburns

  • *
  • 345
  • +0/-0
  • A good plumber, noob developer
    • Mt. Rose MEdia
Re: Egroupware on SMe8
« Reply #10 on: March 20, 2010, 04:45:32 AM »
Alright, did some searching, but couldn't come up with the answers after a few hours so I figured I would just ask.
One, I made ibay 'egwdav' but I did not know if I needed another IBAY like this one
Quote
Make ibay DAV
which is after step number 7.

Secondly, the subdomain and new domain. I went into server manager and added a Domain egroupware.rburnsplumbing.com using my new ibay 'egwdav' in which everyone is a member of the group associated with it, but I didn't know if I still needed another subdomain
Quote
* Create subdomain (like http://davegw.mydomain.com) using ibay egwdav.
, since the one I created closely resembled
Quote
* Create domain like egroupware.yourdomain.com (and edit DNS if requiered) using internet dns.
After that, I went to my sitelution account, and added a nameserver with the same IP address as my website, not really sure if that was correct.

Lastly, I came up with an error during the update
Code: [Select]
# /opt/egw/1.6/svnupdateperms
in folder /opt/egw/1.6
...Setting file access rules :
   - Changing owner recursivly...
   - Recursive CHMOD 550 on folders...
   - Recursive CHMOD 440 on files...
   - Customization of CHMOD for a few folders...
chown: cannot access `/opt/egw/1.6/egroupware/header.inc.php': No such file or directory
chmod: cannot access `/opt/egw/1.6/egroupware/header.inc.php': No such file or directory
...Permissions Ok
At what step were the files installed. Maybe I can repeat a step and get back on track
« Last Edit: March 20, 2010, 04:49:03 AM by newburns »
SME 8.0
Quad 6600
8gb DDR2 800
8 TB RAID 5
Dual Gigabit NIC
I Still Don't KNOW WHAT I AM DOING. Please, don't assume I know anything about Linux or Centos, I just know hardware

Offline soprom

  • *
  • 589
  • +0/-0
    • www.logiciel-libre.org
Re: Egroupware on SMe8
« Reply #11 on: March 20, 2010, 03:38:21 PM »
Quote
egroupware.rburnsplumbing.com using my new ibay 'egwdav'
egroupware.rburnsplumbing.com is a subdomain not associated to an ibay.
davegw.mydomain.com is a subdomain associated to an ibay named egwdav

Quote
/opt/egw/1.6/egroupware/header.inc.php
make sure that step 6 downloaded egroupware in /opt/egw/1.6/egroupware

you should be able to open http://egroupware.rburnsplumbing.com/setup
Sophie from Montréal

Offline newburns

  • *
  • 345
  • +0/-0
  • A good plumber, noob developer
    • Mt. Rose MEdia
Re: Egroupware on SMe8
« Reply #12 on: March 21, 2010, 09:14:01 AM »
Sorry, still having problems. I reinstalled my beta 5, reinstalled all contribs and users, and did these steps right after.
Step two returned an error to me:
Code: [Select]
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(seCret PassWoRd)' at line 1
...right after
Quote
mysql -e "GRANT ALL ON egroupware.* TO egroupware@localhost IDENTIFIED BY $mypasswd;"

I would just go to phpmyadmin and create te user, but I did tat during my previous trial runs, and egroupware did not install. So what should I really be doing?

Secondly, I don't fully understand the two subdomains. When in server manager to create a "domain", it doesn't say anything about a subdomain. Also,
Quote
egroupware.rburnsplumbing.com is a subdomain not associated to an ibay.
davegw.mydomain.com is a subdomain associated to an ibay named egwdav
...how is that, when all domains in server manager are default to Primary for an ibay?

In addition, should there be any users in the group associated to egwdav, guessing that attributes the 'no script handling'.

Lastly, should I just update from ver 1.4, or is this the useful way to do it? I want version 1.6 because of the WebDAV file sharing, but I'm not really interested in it being under a subdomain allocated to an ibay (if that's what this tutorial is all about).
SME 8.0
Quad 6600
8gb DDR2 800
8 TB RAID 5
Dual Gigabit NIC
I Still Don't KNOW WHAT I AM DOING. Please, don't assume I know anything about Linux or Centos, I just know hardware

Offline soprom

  • *
  • 589
  • +0/-0
    • www.logiciel-libre.org
Re: Egroupware on SMe8
« Reply #13 on: March 21, 2010, 03:16:35 PM »
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(seCret PassWoRd)' at line 1
there is a space in the password which is not allowed I think

Quote
I would just go to phpmyadmin and create te user, but I did tat during my previous trial runs, and egroupware did not install.
phpmyadmin is a good way to go

Quote
how is that, when all domains in server manager are default to Primary for an ibay?
You are correct, leave subdomain (ordomain if your like) set to primary.

egroupware.rburnsplumbing.com is a subdomain associated to ibay primary
davegw.rburnsplumbing.com is a subdomain associated to an ibay named egwdav

Quote
In addition, should there be any users in the group associated to egwdav, guessing that attributes the 'no script handling'.
You are correct, users must be associated to the group.
But it is not related to "no script".

Quote
WebDAV file sharing
To use the standard file system, simply define folder in egroupware setup:
/opt/egw/1.6/userdata/tmp
/opt/egw/1.6/userdata/files
/opt/egw/1.6/userdata/backup
Sophie from Montréal

Offline newburns

  • *
  • 345
  • +0/-0
  • A good plumber, noob developer
    • Mt. Rose MEdia
Re: Egroupware on SMe8
« Reply #14 on: March 22, 2010, 01:03:04 AM »
ok, still trying.
I did the user and password through phpMyAdmin. Set the 'egroupware@localhost' priveleges specific to the egroupware database. I got that squared away, even though there wasn't a space in my password. I don't know what that error was for unless it was the ' '.

Also, I changed all the "1.7" in the "98egroupware.txt" file, as well as the domain name, and locations to /opt/egw/1.6/

Now my issue is the header.inc.php file. I have a header.inc.php.template, but not the first one.

Quote
make sure that step 6 downloaded egroupware in /opt/egw/1.6/egroupware
Now this confuses me a little. /opt/egw/1.6/egwupdate installs an egroupware folder after processing. But should I be installing it like /opt/egw/1.6/egroupware/egwupdate? Should there be two egroupware folders meaning, /opt/egw/1.6/egroupware/egroupware/...
I seen something like that in one of the text files. Still doesn't explain the 'no header.inc.php file'.

***edit***
It seems the installation location is correct because the egourpware.rburnsplumbing.com ibay location is /egw/1.6/egroupware, but http://egroupware.rburnsplumbing.com/setup does not ccome up.
1) Should the location be /opt/egww/1.6/egroupware?
2) Should there be some type of port or something that I need to open? Both domain and subdomain uses internet DNS
3) I should still be able to access the ibay based on the domain name, was I supposed to do something with my account that I have for my domain name. Such as setup a nameserver associated to my static ip.
« Last Edit: March 22, 2010, 01:37:46 AM by newburns »
SME 8.0
Quad 6600
8gb DDR2 800
8 TB RAID 5
Dual Gigabit NIC
I Still Don't KNOW WHAT I AM DOING. Please, don't assume I know anything about Linux or Centos, I just know hardware