6.0.0-git
2024-04-27

Diff for CentOS5InstallationNotes between 6 and 7

[[toc]]

+ ** Installing Horde Groupware Webmail Edition on CentOS 5 **



##red|** ------- NOT READY YET!! DO NOT USE UNTIL IT'S COMPLETED!! ------- **##



Horde Groupware Webmail Edition is a free, enterprise ready, browser based communication suite. Users can read, send and organize email messages and manage and share calendars, contacts, tasks and notes with the standards compliant components from the Horde Project. Horde Groupware Webmail Edition **bundles the separately available applications IMP, Ingo, Kronolith, Turba, Nag and Mnemo.**



||http://www.horde.org/webmail/||





++ Versions



* CentOS 5.0 i386 (OS)

* Horde Groupware Webmail Edition 1.0.3 (October 2 2007)

* Apache (http server)

* MySQL 5.0.22 (db server)

* Postfix (mail server)

* Dovecot (IMAP)





++ Installing prerequisites



<code>

yum install -y gettext httpd mysql mysql-server dovecot postfix system-switch-mail perl 



yum install -y php php-mysql php-xml php-imap php-mbstring php-mcrypt php-pecl-Fileinfo php-pecl-memcache php-pear-DB php-pear-File php-pear-Log php-pear-Mail-Mime php-pear-Auth-SASL php-pear-Date php-pear-HTTP-Request php-pear-Mail php-pear-Net-Sieve php-pear-Net-Socket php-pear-Net-SMTP

</code>



++ Set up your host name and address



* Edit /etc/hosts to something like this, according to your system settings:



<code>

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1         localhost.localdomain        localhost

192.168.0.100     yourhostname.yourdomain.com  yourhostname

::1               localhost6.localdomain6      localhost6

</code>





++ Configuring Postfix and Dovecot



* Turn off sendmail

<code>

service sendmail stop

chkconfig sendmail off



system-switch-mail

(select postfix)

</code>



* Configure postfix and dovecot to allow the creation of mail subfolders



<code>

postconf -e 'home_mailbox = Maildir/'

</code>



* Edit /etc/dovecot.conf and add the following to the end of the file:



<code>

mail_location = maildir:~/Maildir



namespace private {

separator = /

prefix = ""

inbox = yes

}

</code>



* Add the following to /etc/dovecot.conf to enable the IMAP protocol:



<code>

protocols = imap

</code>



* To configure the rest of postfix, take a look at this nice tutorial:



||http://fedorasolved.org/server-solutions/postfix-mail-server||



++ Start services:



<code>

service httpd start

chkconfig httpd on



service postfix start

chkconfig postfix on



service dovecot start

chkconfig dovecot on



service mysqld start

chkconfig mysqld on

</code>



* Configure mysqld root password:



<code>

/usr/bin/mysqladmin -u root password 'new-password'

/usr/bin/mysqladmin -u root -h yourhostname.yordomain.com password 'new-password'

</code>





++ Download Horde G. W. Edition and extract



* Get the latest stable version of Horde Groupware Webmail Edition:



||http://www.horde.org/download/app/?app=webmail||



* Extract and rename files



<code>

tar zxf horde-webmail-1.0.3.tar.gz -C /var/www/html/

mv /var/www/html/horde-*/ /var/www/html/horde/



cd /var/www/html/horde/config

rm -rf hooks.php.dist

for d in *.dist; do d0=`basename $d .dist`; if [ ! -f "$d0" ]; then cp -p $d $d0; fi; done

</code>





++ Creating database



cd<code>

cd /var/www/html/horde/scripts/

./setup.php



Press 1; choose mysql; Persistent connection 0; Username horde; Choose a password for mysql user horde; Unix sockets; Locatio null; DB name horde; 

Press 2; yes; root; root mysql password; 

Press 3; specify an existing IMAP user to have horde administration permissions (i.e. your current linux user)

</code>



++ Add a "horde.conf" file to /etc/httpd/cond.d:



<code>

++ Add horde.conf to /#

# Horde

#

install -D -p -m 0644 %{name}.conf %{buildroot}%{_sysconfdir}/httpd/conf.d/%{name}.conf


<Directory /var/www/html/horde>

	# Comment out the following 3 lines to make Horde accessible from anywhere

	#Order Deny,Allow

	#Deny from all

<Directory %{_datadir}/%{name}>

	# Comment out the following 3 lines to make Horde accessible from anywhere

	Order Deny,Allow

	Deny from all

	Allow	#Allow from 127.0.0.1



	Options +FollowSymLinks



	# horde.org's recommended PHP settings:

	php_admin_flag safe_mode off

	php_admin_flag magic_quotes_runtime off

	php_flag session.use_trans_sid off

	php_flag session.auto_start off

	php_admin_flag file_uploads on

	# Optional - required for weather block in Horde to function

	#php_admin_flag allow_url_fopen on



	# If horde dies while trying to handle large email file attachments,

	#  you are probably hitting PHP's memory limit.  Raise that limit here,

	#  but use caution

	# Set to your preference - memory_limit should be at least 32M

	#  and be greater than the value set for post_max_size

	#php_value memory_limit 32M

	#php_value post_max_size 20M

	#php_value upload_max_filesize 10M

	# TODO: Set an appropriate include_path, too. Might even increase speed a bit.

	php_admin_value open_basedir "%{_datadir}/%{name}:%{_sysconfdir}/%{name}:/usr/share/pear:/tmp""/var/www/html/horde:/var/www/html/horde/config:/usr/share/pear:/tmp"

	php_admin_flag register_globals off



</Directory>



# Deny access to files that are not served directly by the webserver

<DirectoryMatch "^%{_datadir}/%{name}/(.*/)?(config|lib|locale|po|scripts|templates)/(.*)?">"^/var/www/html/horde/(.*/)?(config|lib|locale|po|scripts|templates)/(.*)?">

	Order Deny,Allow

	Deny from all

</DirectoryMatch>



# Deny access to the test.php files except from localhost

<LocationMatch "^/horde/(.*/)?test.php">

	Order Deny,Allow

	Deny from all

	Allow from 127.0.0.1

</LocationMatch>

</code>



* Change horde.conf permission:



<code>

chmod 0644 -v /etc/httpd/conf.d/horde.conf 

</code>



* Restart httpd:



<code>

service httpd restart

</code>





++ Security configuration



* For horde framework

<code>



chown root:apache -Rv /var/www/html/horde/

chmod 0770 -Rv /var/www/html/horde

chmod 0640 -v /var/www/html/horde/config/*.dist

chmod 0640 -v /var/www/html/horde/config/.htaccess







chmod go-rwx /var/www/html/horde/test.php





chown -R root:apache /var/www/html/horde/config

chmod -R 750 /var/www/html/horde/config

chown -R root:apache /var/www/html/horde/config/.htaccess

chmod -R 640 /var/www/html/horde/config/.htaccess

chown -R root:apache /var/www/html/horde/config/*.dist

chmod -R 640 /var/www/html/horde/config/*.dist

</code>



* For IMP



...





... (Later I'll continue this howto)