[ Index ] |
|
Code source de Horde 3.1.3 |
1 =================================== 2 Horde Database Installation Guide 3 =================================== 4 5 :Last update: $Date: 2005/10/18 11:34:00 $ 6 :Revision: $Revision: 1.2.10.3 $ 7 :Contact: horde@lists.horde.org 8 9 10 Purpose of this file 11 ~~~~~~~~~~~~~~~~~~~~ 12 13 This file will hopefully ease the installation and configuration of your 14 database for use with Horde. The scope of the document deals primarily with 15 using your database with Horde and should not be considered a resource for 16 general database tasks. 17 18 19 Requirements for Horde 20 ~~~~~~~~~~~~~~~~~~~~~~ 21 22 Horde currently supports at least 7 databases: 23 24 - MySQL http://www.mysql.com/ 25 - PostgreSQL http://www.postgresql.org/ 26 - Oracle http://www.oracle.com/ 27 - Sybase http://www.sybase.com/ 28 - SQLite http://www.sqlite.org/ 29 - MS SQL http://www.microsoft.com/sql/ 30 - MSDE http://www.microsoft.com/sql/msde/ 31 32 MySQL and PostgreSQL are regularly used by the development team, and will work 33 with no problems. Oracle and SQLite support has been much improved recently 34 and works fine too. Sybase were reported working in the previous version of 35 Horde/IMP by some of our users, and are assumed to still work... but that 36 hasn't been verified recently. 37 38 39 Before You Begin 40 ~~~~~~~~~~~~~~~~ 41 42 You will need to have your database preconfigured and working on your system 43 before you even get to this stage. For help with this, please consult your 44 database specific help files. 45 46 Before using any of the scripts listed below, please look over them to ensure 47 that any system-specific settings (or personal choices) are set to your 48 desired settings (eg. ``username``, etc.). 49 50 **PLEASE NOTE** that the database configuration steps listed below **MUST** 51 match what is configured within Horde. 52 53 Specifically, if you change the database name, user, or password while 54 configuring the database (below), you will need to make the same changes to 55 your Horde configuration files as well. 56 57 58 MySQL 59 ~~~~~ 60 61 The mysql_create.sql script will create a database called ``horde``, and a 62 user called ``horde`` (with password ``horde``) that has full rights to the 63 database. *Note that with MySQL, PEAR DB emulates sequences by automatically 64 creating extra tables ending in _seq, so the MySQL ``horde`` user must have 65 ``CREATE`` privilege on the ``horde`` database. 66 67 This script needs to be run as the MySQL root user (which is *NOT* the same as 68 the UNIX/Linux root user):: 69 70 $ mysql --user=root --password=<MySQL-root-passwd> < create.mysql.sql 71 72 After running this script, it's a good idea to restart your MySQL server:: 73 74 $ mysqladmin --user=root --password=<MySQL-root-passwd> reload 75 76 To check that this is working, the following command should connect without 77 errors:: 78 79 $ mysql --user=horde --password=horde horde 80 81 Type ``quit`` to quit MySQL. 82 83 84 PostgreSQL 85 ~~~~~~~~~~ 86 87 # su - postgres (or whatever your database runs as... usually postgres) 88 $ psql -d template1 -f create.pgsql.sql 89 90 This script will create a ``horde`` database and a ``horde`` user. You should 91 set a password for this user with this command (if you didn't uncomment the 92 one in pgsql_create.sql):: 93 94 $ psql -qc "ALTER USER horde WITH PASSWORD 'pass';" template1 postgres 95 96 Then create the tables within the ``horde`` database:: 97 98 $ psql -d horde -f horde_users.sql 99 $ psql -d horde -f horde_prefs.sql 100 $ psql -d horde -f horde_datatree.sql 101 102 These scripts will also grant the ``horde`` user the necessary privileges to 103 each of the tables. 104 105 106 Oracle 107 ~~~~~~ 108 109 Run ``sqlplus``. Login, then [we need instructions for creating the database 110 and user here]. 111 112 That should be it. Restart Oracle just to be sure, and try it. Then create 113 the tables within the ``horde`` database:: 114 115 [Also need those instructions here.] 116 117 118 Sybase 119 ~~~~~~ 120 121 To create the database, from ``isql`` run:: 122 123 create database horde 124 125 Next, you should (recommended) create a login to use with this database. The 126 ``isql`` command for this is:: 127 128 sp_addlogin <username> <password> 129 130 Next you need to change the ownership of the database to this new user. The 131 ``isql`` command for this is:: 132 133 sp_changedbowner <username> 134 135 After that, you just need to set up your tables within the database. To do 136 that, just run this command from the command line:: 137 138 isql -i horde_users.sql -U<username> -P<password> 139 isql -i horde_prefs.sql -U<username> -P<password> 140 141 142 MSDE 2000 (and possibly MS SQL Server) 143 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 144 145 To create user and database, use the osql command:: 146 147 C:\>osql -U sa -P admin_password -S localhost -i create.msde.sql 148 149 Be sure to change the password for the horde user in the script file. To 150 specify a particular instance of the SQL server use the 151 <servername>/<instance> for the -S flag. If you aren't using mixed SQL 152 authentication, then you'll need to modify the script to associate the horde 153 user with a windows user account and run the script in the following manner as 154 the Administrator:: 155 156 C:\>osql -E -S localhost -i create.msde.sql 157 158 If you're having problems running this script on a SQL server on the network, 159 be sure the server is set up to allow network access. 160 161 162 Additional Notes 163 ~~~~~~~~~~~~~~~~ 164 165 This is by far not a complete HOWTO. This is just a compiled list of what 166 people have contributed so far. If you have tips, ideas, suggestions or 167 anything else that you think could help others in setting up their database 168 for use with Horde, please let us know. 169 170 <dev@lists.horde.org>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 18:01:28 2007 | par Balluche grâce à PHPXref 0.7 |