I take advantage of the release of a new version of eGroupWare (v1.2.106-2) to provide a howto to script its installation.
First of all, download necessary files
here and
hereCreate a folder in /root nammed 'egroupware'
Copy the 2 downloaded files into /root/egroupware
Create a file /root/egroupware/98egroupware with :
# eGroupWare
Alias /egroupware /opt/egroupware/html
<Directory /opt/egroupware/html>
SSLRequireSSL on
AddType application/x-httpd-php .php .php3 .phtml
Options Indexes +Includes FollowSymLinks
AllowOverride all
order deny,allow
deny from all
allow from all
php_flag magic_quotes_gpc on
php_flag track_vars on
php_flag register_globals off
php_admin_value phpa on
php_admin_value eaccelerator.enable 1
php_admin_value display_errors 0
php_admin_value mbstring.func_overload 7
</Directory>
This template allows access from anywhere (global). https mode is enabled.
Create a file /root/egroupware/60redir-egroupware with :
{
if ($port ne "443")
{
$OUT .= <<'HERE';
## Redirect Web Address to Secure Address
RewriteEngine on
RewriteRule ^/egroupware https://%{HTTP_HOST}/egroupware
## End Of Redirect
HERE
}
}
This template redirect automatically http to https for access to eGroupWare
Create a file /root/egroupware.sh with :
#!/bin/sh
echo "-------------------------------------------------------------------"
echo "Installation of eGroupWare (public access, automatic https mode)..."
echo "-------------------------------------------------------------------"
DOMAINE=$(db configuration get DomainName)
echo "Generating password..."
passok=0
while [ "$passok" != "1" ] ; do
openssl genrsa 32 > /root/pass.txt
pass=$(grep -v "PRIVATE KEY" < /root/pass.txt)
echo test > /root/pass.txt
sed -e "s/test/$pass/" /root/pass.txt >/root/pass.new
passok=$(grep -c $pass < /root/pass.new)
done
egwpass=$pass
echo "Password is : $egwpass"
rm -f /root/pass.txt
rm -f /root/pass.new
echo "Creating Data bases..."
mysqladmin -u root create egroupware
echo "Creating mysql user..."
mysql -e " grant select, insert, update, delete, create, drop, index, alter on egroupware.* \
to 'egroupware'@'localhost' \
identified by '$egwpass' "
mysqladmin flush-privileges
echo "Decompressing files..."
mkdir -p /opt/egroupware/backup
mkdir -p /opt/egroupware/files
mkdir -p /opt/egroupware/tmp
unzip -q /root/egroupware/eGroupWare-1.2.106-2.zip -d /opt/egroupware
unzip -qo /root/egroupware/eGroupWare-contrib-1.2.106-2.zip -d /opt/egroupware
mv -f /opt/egroupware/egroupware /opt/egroupware/html
mv -f /opt/egroupware/html/sitemgr/sitemgr-link /opt/egroupware/html/
echo "Cleaning installed modules..."
rm -rf /opt/egroupware/html/phpsysinfo
rm -rf /opt/egroupware/html/phpldapadmin
echo "Setting file access rules :"
cd /opt
echo " - Changing owner recursivly..."
chown -R root:www /opt/egroupware
echo " - Recursive CHMOD 550 on folders..."
find egroupware -type d -exec chmod 550 {} \;
echo " - Recursive CHMOD 440 on files..."
find egroupware -type f -exec chmod 440 {} \;
echo " - Customization of CHMOD for a few folders..."
chmod -R 770 /opt/egroupware/files
chmod -R 770 /opt/egroupware/backup
chmod -R 770 /opt/egroupware/tmp
chmod -R 770 /opt/egroupware/html/fudforum
chmod 770 /opt/egroupware/html/phpgwapi/images
touch /opt/egroupware/html/header.inc.php
chown www /opt/egroupware/html/header.inc.php
chmod 600 /opt/egroupware/html/header.inc.php
echo "Adding templates..."
mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts
cp /root/egroupware/60redir-egroupware /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts/
cp /root/egroupware/98egroupware /etc/e-smith/templates/etc/httpd/conf/httpd.conf/
expand-template /etc/httpd/conf/httpd.conf
service httpd-e-smith restart
echo
echo "-------------------------------------------------------------------------------"
echo "Installation completed, you must finish the installation of eGroupWare website."
echo "Please go to https://$DOMAINE/egroupware"
echo "-------------------------------------------------------------------------------"
echo
echo
echo "Reminder :"
echo " - Website open globally"
echo " - https mode enabled with automatic redirection"
echo
echo " - eGroupware is installed in the folder : /opt/egroupware/html"
echo " - tmp folder path is : /opt/egroupware/tmp"
echo " - backup folder path is : /opt/egroupware/backup"
echo " - files folder path is : /opt/egroupware/files"
echo
echo " - MySQL database name is : egroupware"
echo " - MySQL username is : egroupware"
echo " - MySQL user password is : $egwpass"
echo "-------------------------------------------------------------------------------"
Now the only thing you have to do is
# sh egroupware.sh
and eGroupWare installs automatically.
A random password is generated for MySQL user, please note the informations given by the script and finish eGroupWare installation.
edit : added setup howtoyou should be able to go to
https://yourdomain.com/egroupwareHere what I do set at header admin stage :
Server root : /opt/egroupware/html
Include root : /opt/egroupware/html
Admin user for header manager : admin
Admin password to header manager : my_password
Limit access to setup to the following addresses, networks or hostnames (e.g. 127.0.0.1,10.1.1,myhost.dnydns.org) :
Persistent connections : yes
Sessions Type : php
Enable MCrypt : no
MCrypt version :
MCrypt initialization vector :
Domain select box on login : no
Database instance (eGW domain) : mydomain.com
DB Type : MySQL
DB Host : localhost
DB Port : 3306
DB Name : egroupware
DB User : egroupware
DB Password : my_db_password <-- the one given by the script !
Configuration User : admin
Configuration Password : my_password
Then write config and continue and login at Setup/Config Admin
Click on Install all applications
When done, click on Re-Check the installation
Then click on Edit current configuration
Enter the full path for temporary files : /opt/egroupware/tmp
Enter the full path for users and group files : /opt/egroupware/files
Enter the full path to the backup directory: /opt/egroupware/backup
Enter the location of eGroupWare's URL : /egroupware
Image type selection order : PNG->JPG->GIF
Enter the hostname of the machine on which this server is running : mydomain.com
Enter your default FTP server : localhost
Attempt to use correct mimetype for FTP instead of default 'application/octet-stream' : No
Enter your HTTP proxy server :
Enter your HTTP proxy server port :
Enter your HTTP proxy server username :
Enter your HTTP proxy server password :
POP/IMAP mail server hostname or IP address : localhost
Mail server protocol : IMAP
Mail server login type : standard
Mail domain (for Virtual mail manager) :
SMTP server hostname or IP address : localhost
SMTP server port : 25
User for SMTP-authentication (leave it empty if no auth required) :
Password for SMTP-authentication :
Select which type of authentication you are using : SQL/SSL
Select where you want to store/retrieve user accounts : SQL
SQL encryption type for passwords (default - md5) : MD5
Allow authentication via cookie : Yes
Auto login anonymous user : No
Allow password migration : No
Allowed migration types (comma-separated) :
Minimum account id (e.g. 500 or 100, etc.) :
Maximum account id (e.g. 65535 or 1000000) :
User account prefix :
Usernames are casesensitive : No
Auto create account records for authenticated users : No
Auto-created user accounts expire : never
Add auto-created users to this group ('Default' will be attempted if this is empty.) :
If no ACL records for user or any group the user is a member of : Deny Access
Do you want to manage homedirectory and loginshell attributes? : No
LDAP Default homedirectory prefix (e.g. /home for /home/username) :
LDAP Default shell (e.g. /bin/bash) :
LDAP host :
LDAP accounts context :
LDAP search filter for accounts, default: "(uid=%user)", %domain=eGW-domain :
LDAP groups context :
LDAP rootdn (searching accounts and changing passwords) :
LDAP root password :
LDAP encryption type : DES
Enable LDAP Version 3 : No
Host/IP Domain controler :
Domain name :
Enter some random text for app session encryption :
Mcrypt algorithm (default TRIPLEDES) : TRIPLEDES
Mcrypt mode (default CBC) : CBC
Select where you want to store/retrieve filesystem information : SQL version 2 (EXPERIMENTAL, required and works only with FilesCenter)
Select where you want to store/retrieve file contents : Filesystem
And then click on save
Finally, create the admin account... Installation is finished !
Click on Back to user login and login with the admin account you've created !!!
I've tested many modules and I have to say that all worked for me !
Work well in collaboration !!!
The french version of this howto can be seen
here