TOTKat
 

TOTKat: (hand coded) online journal of a girl geek since April 1999.
WARNING: contains personal opinions. A sense of perspective is required when reading.

   
   
   
   
   
   
   
   
    Horde  
   
   
   
   
   
   
   
   
   
     
   
   
   
   
   
   
   
   
   
   
   
 
  


Installing and configuring MySQL for horde and horde modules

This is specifically for a Solaris 8 install.
Errors or omissions, please mail to documentation@totkat.org.

Preparation

On top of the other packages, unless you already have MySQL installed, you will need that too: MySQL v3.23.45 and a copy of ncurses.

As before, I use the base directory for MySQL of /export/mysql, if you use something different, don't copy and paste my examples and expect them to work unmodified. And, as before, optional doesn't really mean optional, it just means if you either don't already have that package installed and/or configured correctly, then you'll need to install/configure it. Finally, the line numbers are specific to the versions of the modules I was using when I wrote this documentation. Your mileage may vary. Use common sense.

Install ncurses (optional)

If you don't already have an up to date ncurses, you'll need to install this before MySQL. I was lazy and installed the package.

[top]

Installing MySQL (optional)

Unzip and untar the MySQL package, configure and install it. Making sure that LD_LIBRARY_PATH includes /usr/lib and /usr/local/lib and PATH has /usr/ccs/bin before /usr/local/bin.

  cd $STAGE/mysql-3.23.45
  CC=gcc CFLAGS="-O6"; export CC
  CXX=gcc CXXFLAGS="-O6 -felide-constructors -fno-exceptions -fno-rtti"
  export CXX CXXFLAGS
  ./configure --prefix=/export/mysql --with-low-memory
Then compile...
  
  make
  make install
Create the mysql group and user and set the relevant permissions on mysql's directories:
  groupadd mysql
  useradd -g mysql mysql
  cd /usr/local/mysql
  ./bin/mysql_install_db
  chown -R root /usr/local/mysql
  chown -R mysql /usr/local/mysql/var/data
  chgrp -R mysql /usr/local/mysql
  chown -R root /usr/local/mysql/bin
Get the mysqld running as the mysql user
  ./bin/safe_mysqld --user=mysql &
And add the mysql root user:-
  ./bin/mysqladmin -u root  password 'new-password'
  ./bin/mysqladmin -u root -h `uname -n`  password 'new-password'
[top]

Configure horde

You need to create the horde database, so firstedit the database creation script, to set a reasonable password for the user "horde". Edit $DOCROOT/horde/scripts/db/mysql_create.sql, find the line referring to the password for the horde user and edit the password field (obviously, don't use the password I have in the example!):-

  REPLACE INTO user (host, user, password)
     VALUES (
         'localhost',
         'horde',
   -- IMPORTANT: Change this password!
         password('secretsecret')
Then run the database creation script for horde:-
  cd $DOCROOT/horde/scripts/db/
  /usr/local/mysql/bin/mysql --user=root -p < mysql_create.sql
Now, edit $DOCROOT/horde/config/horde.php to enable sql support. For Horde 2.0, Set the driver to sql, in line 134 and uncomment 143 to 148:-
  $conf['prefs']['driver'] = 'sql';

$conf['prefs']['params']['phptype'] = 'mysql'; $conf['prefs']['params']['hostspec'] = 'localhost'; $conf['prefs']['params']['username'] = 'horde'; $conf['prefs']['params']['password'] = 'secretsecret'; $conf['prefs']['params']['database'] = 'horde'; $conf['prefs']['params']['table'] = 'horde_prefs';
For Horde 2.2.1, find these sections, make sure it is uncommented, and set the relevant driver ("sql"), database name (probably "horde"), hostname (probably "localhost") and password:-
$conf['prefs']['driver'] = 'sql';

$conf['prefs']['params']['phptype'] = 'mysql'; $conf['prefs']['params']['hostspec'] = 'localhost'; $conf['prefs']['params']['username'] = 'horde'; $conf['prefs']['params']['password'] = 'secretsecret'; $conf['prefs']['params']['database'] = 'horde'; $conf['prefs']['params']['table'] = 'horde_prefs';

[top]

Configure IMP

Configure IMP to use the database. Edit $DOCROOT/horde/imp/config/prefs.php

763  //  'value' => '',
764     'value' => 'localsql',

[top]

Restart apache:

  $APACHEHOME/bin/apachectl restart
You don't actually need to restart apache for any changes or additions which do not involve apache itself. Some people, however, are superstitious about this kind of thing, so restart away, it won't make a bit of difference.

[top]


Mailto:webmaster@totkat.org

Site statistics

 

     
  Horde Basics  
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
     
  Horde Extras