From fb3c622ddf8c05b4232df2396b4f8d165445c0fc Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 19 Nov 2005 20:32:00 +0000 Subject: [PATCH] - removed not working db+user creation under postgres - added "working" explenation how to create a db, user und the necesary rights under postgres - manageheader: renamed Domain --> Database instance (eGW Domain) - manageheader: added further explenation of the host-field for Postgres and ODBC/MaxDB --- setup/index.php | 20 ++++++++++++++------ setup/lang/phpgw_de.lang | 8 +++++++- setup/lang/phpgw_en.lang | 8 +++++++- setup/manageheader.php | 17 +++++++++-------- setup/templates/default/setup_db_blocks.tpl | 4 ++-- 5 files changed, 39 insertions(+), 18 deletions(-) diff --git a/setup/index.php b/setup/index.php index d3483df0c5..c6bd931d71 100644 --- a/setup/index.php +++ b/setup/index.php @@ -190,6 +190,7 @@ $setup_tpl->set_var('oncesetup',lang('Once the database is setup correctly')); $setup_tpl->set_var('createdb',''.lang('Or we can attempt to create the database for you:').''); $setup_tpl->set_var('create_database',lang('Create database')); + $setup_tpl->set_var('instr',''); $info = $GLOBALS['egw_domain'][$GLOBALS['egw_setup']->ConfigDomain]; switch ($info['db_type']) { @@ -208,14 +209,21 @@ $setup_tpl->parse('V_db_stage_1','B_db_stage_1'); break; case 'pgsql': + $ip = $info['db_host'] == 'localhsot' ? '127.0.01' : '<ip-address webserver>'; $setup_tpl->set_var('instr', ''.lang('Instructions for creating the database in %1:','PostgreSQL').'' - . '
'.lang('Start the postmaster') - . "
[user@server user]# postmaster -i -D /home/[username]/[dataDir]
" - . lang('Create the empty database -') - . "
[user@server user]# createdb " . $info['db_name'] . ""); - $setup_tpl->parse('V_db_stage_1','B_db_stage_1'); - break; + . '
'.lang('Login as user postgres, eg. by using su as root') + . "
[root@server /root]# su -l postgres
" + . lang('Create the empty database and grant user permissions -') + . "
[postgres@server /var/lib/pgsql]# createuser --no-adduser --no-createdb -P " . $info['db_user'] . "" + . "
Enter password for new user: " . $info['db_pass'] . "" + . "
[postgres@server /var/lib/pgsql]# createdb --owner " . $info['db_user'] . ' ' . $info['db_name'] . "" + . '
'.lang('to allow password authentification add the following line to your pg_hba.conf (above all others) AND restart postgres:') + . '
# TYPE DATABASE USER CIDR-ADDRESS METHOD' + .($info['db_host'] ? "
host $info[db_name] $info[db_user] $ip/32 password" : + "
local $info[db_name] $info[db_user] password")); + //$setup_tpl->parse('V_db_stage_1','B_db_stage_1'); + //break; default: $setup_tpl->parse('V_db_stage_1','B_db_stage_1a'); } diff --git a/setup/lang/phpgw_de.lang b/setup/lang/phpgw_de.lang index 3183fad472..aaf42e0d38 100644 --- a/setup/lang/phpgw_de.lang +++ b/setup/lang/phpgw_de.lang @@ -10,8 +10,8 @@ this will create 1 admin account and 3 demo accounts
the username/passwords are: demo/guest, demo2/guest and demo3/guest. setup de Dies wird 1 Admin- und 3 Demo-Benutzerkonten anlegen.
Die Benutzernamen/Passwörter sind: demo/guest, demo2/guest und demo3/guest. accounts existing setup de Benutzerkonten existieren actions setup de Aktionen -add a domain setup de Eine Domain hinzufügen add auto-created users to this group ('default' will be attempted if this is empty.) setup de Automatisch erzeugte Benutzer zu dieser Grupper hinzufügen ("Default" wird versucht wenn nichts angegeben.) +add new database instance (egw domain) setup de Neue Datenbankinstanz (eGW Domain) hinzufügen additional settings setup de Zusätzliche Einstellungen admin first name setup de Admin-Vorname admin last name setup de Admin-Nachname @@ -125,6 +125,7 @@ current system-charset setup de Aktueller Systemzeichensatz current system-charset is %1, click %2here%3 to change it. setup de Aktueller Systemzeichensatz ist %1, %2hier%3 klicken um ihn zu ändern. current version setup de Gegenwärtige Version currently installed languages: %1
setup de Gegenwärtig installierte Sprachen: %1
+database instance (egw domain) setup de Datenbankinstanz (eGW Domain) database successfully converted from '%1' to '%2' setup de Datenbank erfolgreich von "%1" nach "%2" konvertiert datebase setup de Datenbank datetime port.
if using port 13, please set firewall rules appropriately before submitting this page.
(port: 13 / host: 129.6.15.28) setup de Port für Datum/Zeitabfragen
Wenn der Port 13 verwendet wird, bitte VOR dem Absenden die Firewallregeln dementsprechend setzen.
(Port 13/Host: 129.6.15.28) @@ -238,6 +239,7 @@ install language setup de Sprachen installieren installed setup de installiert instructions for creating the database in %1: setup de Anweisungen um eine Datenbank unter %1 anzulegen: invalid ip address setup de Ungültige IP Adresse +invalid mcrypt algorithm/mode combination setup de Ungültige MCrypt Algorithmus/Modus Kombination invalid password setup de Ungültiges Passwort is broken setup de ist kaputt is disabled setup de ist nicht aktiv @@ -261,6 +263,7 @@ ldap root password setup de LDAP-Root-Passwort ldap rootdn setup de LDAP rootdn ldap search filter for accounts, default: "(uid=%user)", %domain=egw-domain setup de LDAP Suchfilter für Benutzerkonten, Vorgabe "(uid=%user)", %domain=eGW Domain limit access to setup to the following addresses, networks or hostnames (e.g. 127.0.0.1,10.1.1,myhost.dnydns.org) setup de Zugang zu Setup auf die folgenden IP Adressen, Netzwerke oder Hostnamen beschränken (z.B. 127.0.0.1,10.1.1,myhost.dnydns.org) +login as user postgres, eg. by using su as root setup de Als Benutzer postgres einlogen, zB. durch benutzen von su als root login to mysql - setup de mysql aufrufen - logout setup de Abmelden mail domain (for virtual mail manager) setup de Mail Domain (für Virtual Mail Manager) @@ -305,6 +308,7 @@ not ready for this stage yet setup de Noch nicht bereit f not set setup de nicht gesetzt note: you will be able to customize this later setup de Notiz: Sie können dies später anpassen now guessing better values for defaults... setup de Nun wird versucht bessere Werte für die Vorgaben zu finden ... +odbc / maxdb: dsn (data source name) to use setup de ODBC / MaxDB: DSN (data source name = Datenquellenname) ok setup de OK once the database is setup correctly setup de Wenn die Datenbank einmal korrekt eingerichtet ist one month setup de ein Monat @@ -341,6 +345,7 @@ pop/imap mail server hostname or ip address setup de POP/IMAP Mail Server Hostna possible reasons setup de Mögliche Gründe possible solutions setup de Mögliche Lösungen post-install dependency failure setup de Abhängigkeitsfehler nach der Installation +postgres: leave it empty to use the prefered unix domain sockets instead of a tcp/ip connection setup de Postgres: Leer lassen für die empfohlenen Unix Domain Sockets anstatt einer tcp/ip Verbindung potential problem setup de Potentielles Problem preferences setup de Einstellungen problem resolution setup de Problem Lösung @@ -454,6 +459,7 @@ this section will help you setup your ldap accounts for use with egroupware setu this should be around 30 bytes in length.
note: the default has been randomly generated. setup de Das sollte ungefähr 30 Zeichen lang sein
Hinweis: Die Vorgabe wurde zufällig erzeugt. this stage is completed
setup de Dieser Schritt ist abgeschlossen
to a version it does not know about setup de auf eine Version von der nichts bekannt ist +to allow password authentification add the following line to your pg_hba.conf (above all others) and restart postgres: setup de um Passwort Authentifizierung zu verwenden, folgende Zeile (vor allen anderen) in ihre pg_hba.conf einfügen UND postgres neu starten to setup 1 admin account and 3 demo accounts. setup de zum Anlegen von eines Administratorkontos und ggf. 3 Demo-Benutzerkonten. top setup de oben translations added setup de Übersetzungen hinzugefügt diff --git a/setup/lang/phpgw_en.lang b/setup/lang/phpgw_en.lang index c5d54058ee..72a0926757 100644 --- a/setup/lang/phpgw_en.lang +++ b/setup/lang/phpgw_en.lang @@ -10,8 +10,8 @@ this will create 1 admin account and 3 demo accounts
the username/passwords are: demo/guest, demo2/guest and demo3/guest. setup en This will create 1 admin account and 3 demo accounts
The username/passwords are: demo/guest, demo2/guest and demo3/guest. accounts existing setup en Accounts existing actions setup en Actions -add a domain setup en Add a domain add auto-created users to this group ('default' will be attempted if this is empty.) setup en Add auto-created users to this group ('Default' will be attempted if this is empty.) +add new database instance (egw domain) setup en Add new database instance (eGW domain) additional settings setup en Additional settings admin first name setup en Admin first name admin last name setup en Admin last name @@ -125,6 +125,7 @@ current system-charset setup en Current system-charset current system-charset is %1, click %2here%3 to change it. setup en Current system-charset is %1, click %2here%3 to change it. current version setup en Current Version currently installed languages: %1
setup en Currently installed languages: %1
+database instance (egw domain) setup en Database instance (eGW domain) database successfully converted from '%1' to '%2' setup en Database successfully converted from '%1' to '%2' datebase setup en Datebase datetime port.
if using port 13, please set firewall rules appropriately before submitting this page.
(port: 13 / host: 129.6.15.28) setup en Datetime port.
If using port 13, please set firewall rules appropriately before submitting this page.
(Port: 13 / Host: 129.6.15.28) @@ -238,6 +239,7 @@ install language setup en Install Language installed setup en installed instructions for creating the database in %1: setup en Instructions for creating the database in %1: invalid ip address setup en Invalid IP address +invalid mcrypt algorithm/mode combination setup en Invalid Mcrypt Algorithm/Mode combination invalid password setup en Invalid password is broken setup en is broken is disabled setup en is disabled @@ -261,6 +263,7 @@ ldap root password setup en LDAP root password ldap rootdn setup en LDAP rootdn ldap search filter for accounts, default: "(uid=%user)", %domain=egw-domain setup en LDAP search filter for accounts, default: "(uid=%user)", %domain=eGW-domain limit access to setup to the following addresses, networks or hostnames (e.g. 127.0.0.1,10.1.1,myhost.dnydns.org) setup en Limit access to setup to the following addresses, networks or hostnames (e.g. 127.0.0.1,10.1.1,myhost.dnydns.org) +login as user postgres, eg. by using su as root setup en Login as user postgres, eg. by using su as root login to mysql - setup en Login to mysql - logout setup en Logout mail domain (for virtual mail manager) setup en Mail domain (for Virtual mail manager) @@ -305,6 +308,7 @@ not ready for this stage yet setup en Not ready for this stage yet not set setup en not set note: you will be able to customize this later setup en Note: You will be able to customize this later now guessing better values for defaults... setup en Now guessing better values for defaults... +odbc / maxdb: dsn (data source name) to use setup en ODBC / MaxDB: DSN (data source name) to use ok setup en OK once the database is setup correctly setup en Once the database is setup correctly one month setup en one month @@ -341,6 +345,7 @@ pop/imap mail server hostname or ip address setup en POP/IMAP mail server hostna possible reasons setup en Possible Reasons possible solutions setup en Possible Solutions post-install dependency failure setup en Post-install Dependency Failure +postgres: leave it empty to use the prefered unix domain sockets instead of a tcp/ip connection setup en Postgres: Leave it empty to use the prefered unix domain sockets instead of a tcp/ip connection potential problem setup en Potential Problem preferences setup en Preferences problem resolution setup en Problem resolution @@ -454,6 +459,7 @@ this section will help you setup your ldap accounts for use with egroupware setu this should be around 30 bytes in length.
note: the default has been randomly generated. setup en This should be around 30 bytes in length.
Note: The default has been randomly generated. this stage is completed
setup en This stage is completed
to a version it does not know about setup en to a version it does not know about +to allow password authentification add the following line to your pg_hba.conf (above all others) and restart postgres: setup en to allow password authentification add the following line to your pg_hba.conf (above all others) AND restart postgres: to setup 1 admin account and 3 demo accounts. setup en to setup 1 admin account and 3 demo accounts. top setup en top translations added setup en Translations Added diff --git a/setup/manageheader.php b/setup/manageheader.php index 4135bb11d3..a35308ad9d 100644 --- a/setup/manageheader.php +++ b/setup/manageheader.php @@ -357,7 +357,7 @@ { $detected .= lang('You need to add some domains to your header.inc.php.') . '
' . "\n"; $GLOBALS['egw_domain']['default'] = array(); - $setup_tpl->set_var('lang_domain',lang('Domain')); + $setup_tpl->set_var('lang_domain',lang('Database instance (eGW domain)')); $setup_tpl->set_var('lang_delete',lang('Delete')); $setup_tpl->set_var('db_domain','default'); $setup_tpl->set_var('db_host','localhost'); @@ -384,8 +384,8 @@ $detected .= lang('Importing old settings into the new format....') . '
' . "\n"; } reset($GLOBALS['egw_domain']); - $default_domain = each($GLOBALS['egw_domain']); - $GLOBALS['egw_info']['server']['default_domain'] = $default_domain[0]; + list($default_domain) = each($GLOBALS['egw_domain']); + $GLOBALS['egw_info']['server']['default_domain'] = $default_domain; unset($default_domain); // we kill this for security reasons $GLOBALS['egw_info']['server']['config_passwd'] = $GLOBALS['egw_domain'][$GLOBALS['egw_info']['server']['default_domain']]['config_passwd']; $GLOBALS['egw_info']['server']['config_user'] = $GLOBALS['egw_domain'][$GLOBALS['egw_info']['server']['default_domain']]['config_user']; @@ -395,10 +395,9 @@ $GLOBALS['egw_domain'][lang('new')] = array(); } - reset($GLOBALS['egw_domain']); - while(list($key,$val) = each($GLOBALS['egw_domain'])) + foreach($GLOBALS['egw_domain'] as $key => $val) { - $setup_tpl->set_var('lang_domain',lang('Domain')); + $setup_tpl->set_var('lang_domain',lang('Database instance (eGW domain)')); $setup_tpl->set_var('lang_delete',lang('Delete')); $setup_tpl->set_var('db_domain',$key); $setup_tpl->set_var('db_host',$GLOBALS['egw_domain'][$key]['db_host']); @@ -623,13 +622,15 @@ $setup_tpl->set_var('errors',$errors); $setup_tpl->set_var('lang_settings',lang('Settings')); - $setup_tpl->set_var('lang_adddomain',lang('Add a domain')); + $setup_tpl->set_var('lang_adddomain',lang('Add new database instance (eGW domain)')); $setup_tpl->set_var('lang_serverroot',lang('Server Root')); $setup_tpl->set_var('lang_includeroot',lang('Include Root (this should be the same as Server Root unless you know what you are doing)')); $setup_tpl->set_var('lang_adminuser',lang('Admin user for header manager')); $setup_tpl->set_var('lang_adminpass',lang('Admin password to header manager')); $setup_tpl->set_var('lang_dbhost',lang('DB Host')); - $setup_tpl->set_var('lang_dbhostdescr',lang('Hostname/IP of database server')); + $setup_tpl->set_var('lang_dbhostdescr',lang('Hostname/IP of database server').'
'. + lang('Postgres: Leave it empty to use the prefered unix domain sockets instead of a tcp/ip connection').'
'. + lang('ODBC / MaxDB: DSN (data source name) to use')); $setup_tpl->set_var('lang_dbport',lang('DB Port')); $setup_tpl->set_var('lang_dbportdescr',lang('TCP port number of database server')); $setup_tpl->set_var('lang_dbname',lang('DB Name')); diff --git a/setup/templates/default/setup_db_blocks.tpl b/setup/templates/default/setup_db_blocks.tpl index 8fa2970832..9139f21827 100644 --- a/setup/templates/default/setup_db_blocks.tpl +++ b/setup/templates/default/setup_db_blocks.tpl @@ -31,8 +31,8 @@ {notcomplete} -

{dbnotexist}
- {makesure}.

+

{dbnotexist}
{makesure}.

+

{instr}