mirror of
https://github.com/lldap/lldap.git
synced 2026-04-05 14:48:10 +00:00
example_configs: correct the manual for pkg support in FreeBSD
This commit is contained in:
27
README.md
27
README.md
@@ -204,7 +204,7 @@ Depending on the distribution you use, it might be possible to install lldap
|
|||||||
from a package repository, officially supported by the distribution or
|
from a package repository, officially supported by the distribution or
|
||||||
community contributed.
|
community contributed.
|
||||||
|
|
||||||
Each package offers a [systemd service](https://wiki.archlinux.org/title/systemd#Using_units) `lldap.service` to (auto-)start and stop lldap.<br>
|
Each package offers a [systemd service](https://wiki.archlinux.org/title/systemd#Using_units) `lldap.service` or [rc.d_lldap](example_configs/freebsd/rc.d_lldap) `rc.d/lldap` to (auto-)start and stop lldap.<br>
|
||||||
When using the distributed packages, the default login is `admin/password`. You can change that from the web UI after starting the service.
|
When using the distributed packages, the default login is `admin/password`. You can change that from the web UI after starting the service.
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
@@ -419,14 +419,23 @@ LLDAP configuration file: /etc/lldap/lldap_config.toml<br>
|
|||||||
</table>
|
</table>
|
||||||
LLDAP configuration file: /etc/lldap/lldap_config.toml<br>
|
LLDAP configuration file: /etc/lldap/lldap_config.toml<br>
|
||||||
</details>
|
</details>
|
||||||
|
<details>
|
||||||
### With FreeBSD
|
<summary><b>FreeBSD</b></summary>
|
||||||
|
<br>
|
||||||
You can also install it as a rc.d service in FreeBSD, see
|
Official FreeBSD support is offered through the <a href="https://www.freshports.org/">FreeBSD Freshport Build Service</a>.<br><br>
|
||||||
[FreeBSD-install.md](example_configs/freebsd/freebsd-install.md).
|
Maintainer: <a href="https://github.com/aokblast">@aokblast</a><br>
|
||||||
|
Support: <a href="https://bugs.freebsd.org/bugzilla/">Bugzilla</a>, <a href="https://github.com/lldap/lldap/discussions">Discussions</a><br>
|
||||||
The rc.d script file
|
Package repository: <a href="https://www.freshports.org/net/lldap/">FreeBSD Freshport Build</a><br>
|
||||||
[rc.d_lldap](example_configs/freebsd/rc.d_lldap).
|
FreeBSD Setup and Migration Manual: <a href="https://github.com/lldap/lldap/blob/main/example_configs/freebsd/freebsd-install.md"> Using FreeBSD </a><br>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>Available packages:</td>
|
||||||
|
<td>lldap</td>
|
||||||
|
<td>Light LDAP server for authentication.</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
LLDAP configuration file: /usr/local/lldap_server/lldap_config.toml<br>
|
||||||
|
</details>
|
||||||
|
|
||||||
### From source
|
### From source
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,56 @@
|
|||||||
|
## Install from Port
|
||||||
|
|
||||||
|
Install from Port:
|
||||||
|
|
||||||
|
```
|
||||||
|
pkg install lldap
|
||||||
|
```
|
||||||
|
|
||||||
|
Copy the configuration and don't forget to set up:
|
||||||
|
|
||||||
|
```
|
||||||
|
`cp /usr/local/share/lldap/lldap_config.toml.example /usr/local/lldap_server/lldap_config.toml`
|
||||||
|
```
|
||||||
|
|
||||||
|
Enable lldap service in /etc/rc.conf:
|
||||||
|
|
||||||
|
`sysrc lldap_enable="YES"`
|
||||||
|
|
||||||
|
Start your service:
|
||||||
|
|
||||||
|
`service lldap start`
|
||||||
|
|
||||||
|
## Migrates from Manual Installation:
|
||||||
|
|
||||||
|
Backup the database, configuration, and user specified file (like cert):
|
||||||
|
```
|
||||||
|
cp /usr/local/lldap_server/users.db ./
|
||||||
|
cp /usr/local/lldap_server/lldap_config.toml ./
|
||||||
|
```
|
||||||
|
|
||||||
|
delete all file and install package from port:
|
||||||
|
|
||||||
|
```
|
||||||
|
rm -rf /usr/local/lldap_server
|
||||||
|
pkg install lldap
|
||||||
|
```
|
||||||
|
|
||||||
|
Move the db and config back:
|
||||||
|
|
||||||
|
```
|
||||||
|
mv ./users.db /usr/local/lldap_server/
|
||||||
|
mv ./lldap_config.toml /usr/local/lldap_server/
|
||||||
|
```
|
||||||
|
|
||||||
|
Set the file permission of the twp file to ldap:
|
||||||
|
```
|
||||||
|
chown ldap:ldap /usr/local/lldap_server/users.db
|
||||||
|
chown ldap:ldap /usr/local/lldap_server/lldap_config.toml
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Manual Installation (Deprecated)
|
||||||
|
|
||||||
Extract lldap's [FreeBSD tar.gz](https://github.com/n-connect/rustd-hbbx/blob/main/x86_64-freebsd_lldap-0.5.1.tar.gz) under /usr/local/:
|
Extract lldap's [FreeBSD tar.gz](https://github.com/n-connect/rustd-hbbx/blob/main/x86_64-freebsd_lldap-0.5.1.tar.gz) under /usr/local/:
|
||||||
|
|
||||||
`tar -xvf x86_64-freebsd_lldap-0.5.1.tar.gz -C /usr/local/`
|
`tar -xvf x86_64-freebsd_lldap-0.5.1.tar.gz -C /usr/local/`
|
||||||
@@ -5,7 +58,7 @@ Extract lldap's [FreeBSD tar.gz](https://github.com/n-connect/rustd-hbbx/blob/ma
|
|||||||
Move rc.d script into the right place:
|
Move rc.d script into the right place:
|
||||||
`mv /usr/local/lldap_server/rc.d_lldap /usr/local/etc/rc.d/lldap`
|
`mv /usr/local/lldap_server/rc.d_lldap /usr/local/etc/rc.d/lldap`
|
||||||
|
|
||||||
Make your config, if your want to enable LDAPS, copy your server key and certification files, and set the owneship (currently www):
|
Make your config, if your want to enable LDAPS, copy your server key and certification files, and set the owneship (currently ldap):
|
||||||
|
|
||||||
`cp /usr/local/lldap_server/lldap_config.docker_template.toml /usr/local/lldap_server/lldap_config..toml`
|
`cp /usr/local/lldap_server/lldap_config.docker_template.toml /usr/local/lldap_server/lldap_config..toml`
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,6 @@ logfile="/var/log/${name}.log"
|
|||||||
|
|
||||||
procname=/usr/local/lldap_server/lldap
|
procname=/usr/local/lldap_server/lldap
|
||||||
command="/usr/sbin/daemon"
|
command="/usr/sbin/daemon"
|
||||||
command_args="-u www -o ${logfile} -t ${name} /usr/local/lldap_server/lldap run"
|
command_args="-u ldap -o ${logfile} -t ${name} /usr/local/lldap_server/lldap run"
|
||||||
|
|
||||||
run_rc_command "$1"
|
run_rc_command "$1"
|
||||||
|
|||||||
Reference in New Issue
Block a user