-
Notifications
You must be signed in to change notification settings - Fork 22
/
INSTALL
71 lines (58 loc) · 2.52 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
mcdb submodules
## plasma (https://github.com/gstrauss/plasma/)
$ git submodule update --init
mcdb installation
$ make PREFIX=
$ make install PREFIX=
$ make test
(Install defaults to under PREFIX=/usr/local if PREFIX= is not specified)
Using mcdb for nsswitch databases: (optional)
$ mkdir /etc/mcdb
$ nss_mcdbctl
$ vi /etc/nsswitch.conf
passwd: mcdb
shadow: mcdb
group: mcdb
hosts: mcdb dns
protocols: mcdb
services: mcdb
rpc: mcdb
networks: mcdb
# (save /etc/nsswitch.conf and test things out in another window)
$ getent passwd root
root:x:0:0:root:/root:/bin/bash
$ getent group root
root:x:0:root
On systems that can run both 32-bit and 64-bit executables, it is important
to install both 32-bit and 64-bit libnss_mcdb.so.2 libraries. This is done
by default with 'make install', but if installing RPMs on a multilib system,
then two sets of RPMs need to be installed, e.g. mcdb-libs for x86_64 and i686.
Please note that changes to any databases require re-running nss_mcdbctl.
While I have been running the above configuration on my laptop for > 1 year,
nss_mcdbctl still needs to be run for changes made by other users to passwd,
shadow, and group databases. Since I have not yet written pam code to be
triggered when those files are changed, you might leave
shadow: files
if others might change passwords and you do not automate running nss_mcdbctl
so that password changes take effect immediately.
You may choose to disable nscd and test if performance increases.
See NOTES for more technical (and probably less readable) details and features.
See Makefile for various overrides, such as alternate installation location.
Building an RPM
##(fill in correct version)
$ version=0.03
##(set up RPM build environment, if not already configured)
$ echo %_topdir $HOME/rpm >> $HOME/.rpmmacros
$ cd $HOME && mkdir -p rpm/BUILD rpm/RPMS rpm/SOURCES rpm/SPECS rpm/SRPMS
##(begin with mcdb-$version.tar.gz) or create tarball from source
$ rsync -avu --exclude=.git --delete /path/to/mcdb/ mcdb-$version
$ tar cvzf mcdb-$version.tar.gz mcdb-$version
$ rpmbuild -tb mcdb-$version.tar.gz
##(multilib platforms need both 32-bit and 64-bit mcdb-libs RPM for nss_mcdb)
#$rpmbuild -tb mcdb-$version.tar.gz --target=i686
#$rpmbuild -tb mcdb-$version.tar.gz --target=x86_64
##(RPM for binary install now located in rpm/RPMS/<arch>/mcdb-$version-*.rpm)
$ rpm -Uvh rpm/RPMS/*/mcdb-$version-*.rpm
##(some clean up)
$ rm -rf mcdb-$version
$ rm -f mcdb-$version.tar.gz