个人工具

“UbuntuHelp:InstallingphpLDAPadmin”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
(新页面: {{From|https://help.ubuntu.com/community/InstallingphpLDAPadmin}} {{Languages|UbuntuHelp:InstallingphpLDAPadmin}} == Installation == <pre><nowiki> apt-get install phpldapadmin </nowiki><...)
 
 
(未显示同一用户的3个中间版本)
第2行: 第2行:
 
{{Languages|UbuntuHelp:InstallingphpLDAPadmin}}
 
{{Languages|UbuntuHelp:InstallingphpLDAPadmin}}
 
== Installation ==
 
== Installation ==
 
 
<pre><nowiki>
 
<pre><nowiki>
 
apt-get install phpldapadmin
 
apt-get install phpldapadmin
 
</nowiki></pre>
 
</nowiki></pre>
 
 
== Configuration ==
 
== Configuration ==
 
+
You've several choices when it comes to configuring phpldapadmin.  You can use the included apache script (/etc/phpldapadmin/apache.conf), or you can copy /usr/share/phpldapadmin to you webroot, in which case you can have multiple installations.
You've several choices when it comes to configuring phpldapadmin.  You can use the included apache script (/etc/phpldapadmin/apache.conf), or you can copy /usr/share/phpldapadmin to you webroot, in which case you can have multiple installations. Here I describe the latter.
+
For the former approach, just edit /etc/phpldapadmin/config.php.  You'll probably need to change the following lines:
 
+
Make a copy of the installation directory
+
 
<pre><nowiki>
 
<pre><nowiki>
cp /usr/share/phpldapadmin /var/www/myphpldapadmin
+
$ldapservers->SetValue($i,'server','name','My LDAP Server');  // The name to display
 +
$ldapservers->SetValue($i,'server','host','127.0.0.1');  // Address of the LDAP server
 +
$ldapservers->SetValue($i,'server','port','389');  // Port number
 +
$ldapservers->SetValue($i,'server','base',array('dc=example,dc=com'));  // Base dn
 +
$ldapservers->SetValue($i,'login','string','uid=<username>,ou=People,dc=example,dc=com');
 
</nowiki></pre>
 
</nowiki></pre>
 
+
For the latter approach, make a copy of the installation directory <pre><nowiki>
Since we're setting up for multiple installs, we'll give each one a different config file
+
cp -R /usr/share/phpldapadmin /var/www/myphpldapadmin
<pre><nowiki>
+
</nowiki></pre>
 +
Since we're setting up for multiple installs, we'll give each one a different config file<pre><nowiki>
 
cp /etc/phpldapadmin/config.php /etc/phpldapadmin/first.config.php
 
cp /etc/phpldapadmin/config.php /etc/phpldapadmin/first.config.php
 
rm /var/www/myphpldapadmin/config/config.php
 
rm /var/www/myphpldapadmin/config/config.php
第23行: 第24行:
 
chmod +r /etc/phpldapadmin/first.config.php
 
chmod +r /etc/phpldapadmin/first.config.php
 
</nowiki></pre>
 
</nowiki></pre>
 
+
Now customize the config file.  You'll probably need to change the following lines:<pre><nowiki>
Now customize the config file.  You'll probably need to change the following lines:
+
<pre><nowiki>
+
 
$config->custom->session['blowfish'] = '';  //Add a random string for encryption purposes
 
$config->custom->session['blowfish'] = '';  //Add a random string for encryption purposes
 
$ldapservers->SetValue($i,'server','name','My LDAP Server');  // The name to display
 
$ldapservers->SetValue($i,'server','name','My LDAP Server');  // The name to display
第32行: 第31行:
 
$ldapservers->SetValue($i,'server','base',array('dc=example,dc=com'));  // Base dn
 
$ldapservers->SetValue($i,'server','base',array('dc=example,dc=com'));  // Base dn
 
</nowiki></pre>
 
</nowiki></pre>
 
 
The config file is *very* well commented, and a little reading should get you all you need.
 
The config file is *very* well commented, and a little reading should get you all you need.
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2009年11月17日 (二) 19:33的最新版本

Installation

apt-get install phpldapadmin

Configuration

You've several choices when it comes to configuring phpldapadmin. You can use the included apache script (/etc/phpldapadmin/apache.conf), or you can copy /usr/share/phpldapadmin to you webroot, in which case you can have multiple installations. For the former approach, just edit /etc/phpldapadmin/config.php. You'll probably need to change the following lines:

$ldapservers->SetValue($i,'server','name','My LDAP Server');  // The name to display
$ldapservers->SetValue($i,'server','host','127.0.0.1');  // Address of the LDAP server
$ldapservers->SetValue($i,'server','port','389');   // Port number
$ldapservers->SetValue($i,'server','base',array('dc=example,dc=com'));  // Base dn
$ldapservers->SetValue($i,'login','string','uid=<username>,ou=People,dc=example,dc=com');
For the latter approach, make a copy of the installation directory
cp -R /usr/share/phpldapadmin /var/www/myphpldapadmin
Since we're setting up for multiple installs, we'll give each one a different config file
cp /etc/phpldapadmin/config.php /etc/phpldapadmin/first.config.php
rm /var/www/myphpldapadmin/config/config.php
ln -s /etc/phpldapadmin/first.config.php /var/www/myphpldapadmin/config/config.php
chmod +r /etc/phpldapadmin/first.config.php
Now customize the config file. You'll probably need to change the following lines:
$config->custom->session['blowfish'] = '';  //Add a random string for encryption purposes
$ldapservers->SetValue($i,'server','name','My LDAP Server');  // The name to display
$ldapservers->SetValue($i,'server','host','127.0.0.1');  // Address of the LDAP server
$ldapservers->SetValue($i,'server','port','389');   // Port number
$ldapservers->SetValue($i,'server','base',array('dc=example,dc=com'));  // Base dn

The config file is *very* well commented, and a little reading should get you all you need.