How to install phpLDAPadmin on Ubuntu 17.04
To install phpLDAPadmin on Ubuntu 17.04
phpLDAPadmin is a free and open source web based application used for managing LDAP servers. It was written in PHP language. Phpldapadmin can be installed on any kind of linux operating systems like redhat, centos, debian, Ubuntu, fedora, openSUSE, FreeBSD, OpenBSD and Solaris. In this tutorial, you will be briefed about the method to install phpLDAPadmin on Ubuntu 17.04.
Installing phpLDAPadmin
First, you need to install the packages for LDAP using the following command.
root@linuxhelp:~# apt-get install slapd ldap-utils -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libldap-2.4-2 libldap-common libodbc1
Suggested packages:
libsasl2-modules-gssapi-mit | libsasl2-modules-gssapi-heimdal libmyodbc odbc-postgresql tdsodbc unixodbc-bin
The following NEW packages will be installed:
ldap-utils libodbc1 slapd
The following packages will be upgraded:
libldap-2.4-2 libldap-common
2 upgraded, 3 newly installed, 0 to remove and 290 not upgraded.
Need to get 1,694 kB/1,866 kB of archives.
After this operation, 17.1 MB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu zesty/main amd64 libodbc1 amd64 2.3.4-1 [183 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu zesty-updates/main amd64 slapd amd64 2.4.44+dfsg-3ubuntu2.1 [1,390 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu zesty-updates/main amd64 ldap-utils amd64 2.4.44+dfsg-3ubuntu2.1 [122 kB]
Fetched 1,694 kB in 15s (107 kB/s)
Preconfiguring packages ...
(Reading database ... 170562 files and directories currently installed.).
.
.
.
Processing triggers for man-db (2.7.6.1-2) ...
Setting up ldap-utils (2.4.44+dfsg-3ubuntu2.1) ...
Processing triggers for libc-bin (2.24-9ubuntu2) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (232-21ubuntu2) ...
Processing triggers for ufw (0.35-4) ...
While installing LDAP package, it will ask you to set administrator password, so create the password for admin. You should also open LDAP configuration and add some details as listed below. So open the conf file as follows.
root@linuxhelp:~# vim /etc/ldap/ldap.conf
And uncomment the below mentioned lines and change values according to your settings like domain name and ip address.
BASE dc=example,d=com URI ldap://192.168.7.237:389
Now, you need to reconfigure SLAPD as follows.
root@linuxhelp:~# dpkg-reconfigure slapd
Moving old database directory to /var/backups:
- directory unknown... done.
Creating initial configuration... done.
Creating LDAP directory... done.
After that, you should follow the following steps to configure settings as shown below.
You should enter domain name now and proceed further.
And then, provide the organization name and carry on with the next step.
Later you need to give your admin password.
It will ask you if you want to remove the database, give NO.
Move your old database files.
Now you shall install your phpLDAPadmin and for that, you need to run the following command.
root@linuxhelp:~# apt-get install phpldapadmin -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
apache2 apache2-bin apache2-data apache2-utils libapache2-mod-php libapache2-mod-php7.0 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.2-0 php-common
php-ldap php-xml php7.0-cli php7.0-common php7.0-json php7.0-ldap php7.0-opcache php7.0-readline php7.0-xml
Suggested packages:
apache2-doc apache2-suexec-pristine | apache2-suexec-custom php-pear
The following NEW packages will be installed:
apache2 apache2-bin apache2-data apache2-utils libapache2-mod-php libapache2-mod-php7.0 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.2-0 php-common
php-ldap php-xml php7.0-cli php7.0-common php7.0-json php7.0-ldap php7.0-opcache php7.0-readline php7.0-xml phpldapadmin
0 upgraded, 22 newly installed, 0 to remove and 290 not upgraded.
Need to get 5,921 kB of archives.
After this operation, 26.2 MB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu zesty/main amd64 libapr1 amd64 1.5.2-5 [85.8 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu zesty/main amd64 libaprutil1 amd64 1.5.4-3 [77.9 kB]
.
.
.
Setting up libapache2-mod-php (1:7.0+49) ...
Processing triggers for libc-bin (2.24-9ubuntu2) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (232-21ubuntu2) ...
Processing triggers for ufw (0.35-4) ...
After your phpLDAPadmin has been installed, you need to open its configuration file and then configure it for your domain as shown below.
root@linuxhelp:~# vim /etc/phpldapadmin/config.php
$servers-> setValue(' server' ,' host' ,' 192.168.7.222' )
$servers-> setValue(' server' ,' base' ,array(' dc=example,dc=com' ))
$servers-> setValue(' login' ,' bind_id' ,' cn=admin,dc=example,dc=com' )
Find those above lines and change the values according to your server settings.
Once it is done, you need to restart the Apache service and SLAPD service as follows.
root@linuxhelp:~# systemctl restart apache2
root@linuxhelp:~# systemctl restart slapd
Now you can access the phpLDAPadmin web console by using your IP address followed by phpLDAPadmin on your browser as shown below. Your URL must follow this syntax : http://192.168.7.237/phpldapadmin
Provide Login DN and Password and click on the Login button.
With this the installation of phpLDAPadmin on Ubuntu 17.04 comes to an end.
Comments ( 0 )
No comments available