forked from NigelCunningham/pam-MySQL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL.pam-mysql
120 lines (81 loc) · 3.87 KB
/
INSTALL.pam-mysql
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
Installation instructions.
==========================
1. Install the dependencies for building pam-MySQL
Ubuntu (from https://github.com/NigelCunningham/pam-MySQL/issues/28):
apt-get install -y autoconf automake build-essential libmysqlclient-dev libpam-dev libssl-dev libtool pkg-config
CentOS 7:
yum install autoconf libtool make gcc mariadb-devel pam-devel
If you use the MariaDB repository, you might need to also install
the MariaDB-shared package, otherwise you get a cryptic
"configure: error: unable to find the crypt() function"
error. (see https://github.com/NigelCunningham/pam-MySQL/issues/42 )
2. Run "autoreconf -f -i". You can skip this step if you are building
from a distributed tarball and thus "configure" is already present.
Nigel thinks the above should do everything necessary but there has
also been a report of a need to run:
libtoolize
aclocal
autoheader
autoreconf -f -i
Please open an issue on Github if you can confirm this and I'll
update this file.
3. Run "./configure".
You may need some of the arguments below. Eg (Ubuntu):
./configure --with-pam-mods-dir=/lib/security
The following parameters are accepted:
--with-pam=[PAM_INSTALLATION_PREFIX]
Specifies where the PAM headers required to build
the package are installed. This may help when you are
building a system in a different root. This can be
omitted to turn on auto-detection.
--with-pam-mods-dir=[MODULE_DIRECTORY]
Specifies where to install the product
(pam_mysql.so). This can be omitted also.
--with-mysql=[MYSQL_INSTALLATION_PREFIX]
Specifies where the required MySQL headers and
libraries are installed. If not given, configure search
to find them amongst the hard-coded prefixes in the
following order:
. /usr
. /usr/local
. /usr/mysql
. /opt/mysql
--with-openssl[=check|yes|no]
Specifies whether to use the MD5 and SHA1 hashing
implementations of libcrypto provided by OpenSSL.
Uses pkg-config, thus automatic detection can be
overridden by the openssl_CFLAGS and openssl_LIBS
variables.
--with-cyrus-sasl=[CYRUS_SASL_INSTALLATION_PREFIX]
--with-cyrus-sasl2=[CYRUS_SASL2_INSTALLATION_PREFIX]
Specifies where the Cyrus SASL headers and libraries, which
will be used for MD5 calculation facility, are installed.
If the option is supplied but no prefix is explicitly given,
configure tries to search them amongst the hard-coded prefixes
in the following order:
. /usr
. /usr/local
. /opt/cyrus-sasl
Note that these two options cannot be specified together, and
it is discouraged to use this feature in order to avoid cross
dependency and symbol conflict as PAM may be called from within
a SASL client library.
4. Run "make" to build the module.
5. Run "make install" as root to install the module.
6. Make proper changes to an intended configuration file in /etc/pam.d/
or /etc/pam.conf.
The following are historic instructions - I haven't checked they still work.
Via RPM commands:
1. Copy the source archive (.tar.gz / .tar.bz2) to the "SOURCES" directory
within the system dependent RPM build directory.
That is typically /usr/src/redhat in Red Hat / Fedora Core distros.
2. Copy the spec file (pam_mysql.spec), that has been generated during
configuration to the "SPECS" directory, that is also found in the same
RPM build directory as explained in the previous step.
3. Chdir to the SPECS directory
4. Run rpmbuild.
$ rpmbuild -ba pam_mysql.spec
5. Install the binary-rpm that was produced in the "RPMS" directory, ditto.
(via ordinary make install)
6. Make proper changes to an intended configuration file in /etc/pam.d/
or /etc/pam.conf.