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
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...
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..
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...
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:
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
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...
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
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/"
myibay=egwdav
/sbin/e-smith/db accounts setprop $myibay ModDav enabled
/sbin/e-smith/signal-event ibay-modify $myibay
8. Apply changes
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
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=WebDavWhen 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...
#!/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...