-
-
Notifications
You must be signed in to change notification settings - Fork 176
Installation Instructions
There are 3 ways to install PLA:
- Run the docker container at phpldapadmin/phpldapadmin [recommended]
- Install the package from your distribution (if there is a package)
- Install from the source code at Github
The above is listed in priority, in terms of ease of installation and ease of supporting
While there may be some steps you need to take to install docker on your host (if it isnt already there) - this is by far the best approach to running PLA. The docker container is a pre-installed version of PLA with all the require dependancies, including a http/https server.
The https server is using FrankenPHP (based on Caddy) - which will also take care of ACME certificates for you. Refer to the FrankenPHP site for details.
The demo's of PLA are running the released docker containers, with nginx (soon to be replaced with caddy) in front.
(You can skip this step if docker is already installed - if docker info
doesnt return an error, then you have docker installed.)
Follow your OS instructions for installing docker, or install it yourself it's easy:
curl -sSL https://get.docker.com | sudo sh
Once installed, confirm it's there:
# docker info
Client: Docker Engine - Community
Version: 27.3.1
Context: default
Debug Mode: false
Plugins:
...
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 7.504GiB
Name: rl9-dev.dege.lan
ID: f84c5b8d-63a0-45d6-8213-ea284d2d3e69
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: false
Insecure Registries:
127.0.0.0/8
Registry Mirrors:
http://127.0.0.1:5000/
Live Restore Enabled: false
To run PLA, you can use a syntax like this (customise as appopriate):
docker run -itd -e LDAP_HOST=10.10.10.10 -p 80:8080 phpldapadmin/phpldapadmin
(Where 10.10.10.10
is replaced with the hostname/IP address of your LDAP server.)
And point your browser at your host. Information on what other configuration variables are available see Configuration-Variables
Refer to your operating system package manager for instructions.
PLA is available from these distributions aready (there may be others):
Distribution |
---|
ArchLinux |
AltLinux |
(If it is available elsewhere, let me know and I'll add it here.)
Its likely after it's installed that you'll need to configure the .env
file - use the same instructions from below.
Installing from source is by far the most complex. These instructions will help you get PLA installed, but wont cover how to configure or install: your HTTP server, SSL Certificates, composer, php, npm, git - you'll need to refer to your OS on how to install those components.
- php-cli 8.4+
- php-fpm 8.4+
- composer
- npm
- git (or tar and the release tar if you intend to use the release from github)
- a web server (caddy, nginx or apache)
-
Make a directory to hold PLA, in these instructions I'll assume its
/var/www/html
-
If using
git
, clone PLAgit clone https://github.com/leenooks/phpLDAPadmin.git .
Once the clone completes, checkout a v2 release, eg:git checkout 2.0.3
.6c6d03dce5a6:/var/www/html$ git clone https://github.com/leenooks/phpLDAPadmin.git . Cloning into '.'... remote: Enumerating objects: 9604, done. remote: Counting objects: 100% (1819/1819), done. remote: Compressing objects: 100% (602/602), done. remote: Total 9604 (delta 1313), reused 1466 (delta 1134), pack-reused 7785 (from 2) Receiving objects: 100% (9604/9604), 9.05 MiB | 6.02 MiB/s, done. Resolving deltas: 100% (5580/5580), done. 6c6d03dce5a6:/var/www/html$ git checkout 2.0.3 Note: switching to '2.0.3'. ...
If using a tar and a release tar file, extract the tar file
tar xf <name of tar file>
.Your directory should look something like this:
6c6d03dce5a6:/var/www/html$ ls LICENSE app composer.json database package.json resources tests README.md artisan composer.lock docker phpunit.xml routes webpack.mix.js VERSION bootstrap config package-lock.json public storage
-
Run
npm i
, followed bynpm run prod
6c6d03dce5a6:/var/www/html$ npm i [maybe some warnings] added 790 packages, and audited 791 packages in 7s 105 packages are looking for funding run `npm fund` for details found 0 vulnerabilities 6c6d03dce5a6:/var/www/html$ npm run prod > prod > npm run production > production > mix --production ● Mix █████████████████████████ sealing (88%) ... Laravel Mix v6.0.49 ✔ Compiled Successfully in 11387ms ┌─── ────────────────────────────────────────────────────────────────────────────────────────────────┐ │ File │ Size │ ├────────────────────────────────────────────────────────────────────────────────────────┼───────────┤ │ /js/app.js │ 16.1 KiB │ │ /js/manifest.js │ 1.47 KiB │ │ /js/vendor.js │ 484 KiB │ │ /js/vendor.js.LICENSE.txt │ 4.53 KiB │ │ css/app.css │ 520 KiB │ ... │ images/vendor/jquery.fancytree/dist/skin-xp/vline.gif?96c6eb3cb6e4b07ed7e9b7b3edb75652 │ 844 bytes │ └────────────────────────────────────────────────────────────────────────────────────────┴───────────┘ 24 WARNINGS in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details) webpack compiled with 24 warnings
-
Run
composer i --no-dev
6c6d03dce5a6:/var/www/html$ composer i --no-dev Installing dependencies from lock file Verifying lock file contents can be installed on current platform. Package operations: 76 installs, 0 updates, 0 removals - Downloading ramsey/collection (2.1.0) - Downloading brick/math (0.12.3) - Downloading ramsey/uuid (4.7.6) - Downloading voku/portable-ascii (2.0.3) ... Generating optimized autoload files > Illuminate\Foundation\ComposerScripts::postAutoloadDump > @php artisan package:discover --ansi INFO Discovering packages. directorytree/ldaprecord-laravel .................................... DONE laravel/sanctum ..................................................... DONE laravel/ui .......................................................... DONE nesbot/carbon ....................................................... DONE nunomaduro/termwind ................................................. DONE 54 packages you are using are looking for funding. Use the `composer fund` command to find out more!
-
Copy
.env.example
to.env
and make necessary changes, specifically settingAPP_KEY
,LDAP_HOST
andAPP_URL
Refer to Configuration-Variables to see what variables you can set. -
Optionally run
./artisan ldap:test
to test that you can connect to your LDAP server.6c6d03dce5a6:/var/www/html$ ./artisan ldap:test Testing LDAP connection [ldap]... Testing LDAP connection [ldaps]... Testing LDAP connection [starttls]... +------------+------------+------------------+-------------------------+---------------+ | Connection | Successful | Username | Message | Response Time | +------------+------------+------------------+-------------------------+---------------+ | ldap | ✔ Yes | cn=Admin,dc=Test | Successfully connected. | 652.69ms | | ldaps | ✔ Yes | cn=Admin,dc=Test | Successfully connected. | 697.39ms | | starttls | ✔ Yes | cn=Admin,dc=Test | Successfully connected. | 704.03ms | +------------+------------+------------------+-------------------------+---------------+
-
Configure your webserver root, using
/var/www/html/public
as the root directory. -
Point your browser at your server, and you should get either a login or the home page (depending on the setting of
LDAP_ALLOW_GUEST
)