Fix programming typo
[manu/libnss-mysql-bg.git] / README
1 Official website: http://libnss-mysql.sourceforge.net/
2
3 MySQL for NSS systems
4 =====================
5 Supported Operating Systems:
6     o Linux
7     o Solaris (Sparc or Intel) (2.6, 7, 8. 9 without PAM)
8     o FreeBSD (5.1+)
9
10 Supported MySQL Versions:
11     o MySQL 3.23.9 - 4.1.x
12
13 Supported Compilers:
14     o GCC (2.95.2, 3.x)
15     o Sun Forte Developer 7 C 5.4
16
17 NOTE: Solaris 9 is not fully unsupported.  Sun's PAM modules have become
18       so restrictive that you can't even properly authenticate via PAM
19       anymore if there's a "mysql" in /etc/nsswitch.conf.  System routines
20       like getpwnam will still work, so you can work around it some by
21       compiling your apps with PAM turned *off* - however logging in via
22       system programs such as telnet will fail.  I'll be addressing this
23       when I can; unfortunately it requires a PAM module that I'd need to
24       write.  It's on my TODO list ...
25
26 Prerequisites
27 =============
28     o Installing from source:
29       o A functional compile environment (system headers, C compiler, ...)
30       o MySQL client library & header files (local)
31       o MySQL server (local or remote)
32
33     o Installing from RPM:
34       o MySQL server (local or remote)
35
36     o Installing from Solaris Package
37       o MySQL server (local or remote)
38
39     o Installing from FreeBSD Port
40       o MySQL client library (local)
41       o MySQL server (local or remote)
42
43 The details
44 ===========
45     o If installing from source:
46       o ./configure
47       o make
48       o make install
49       If your MySQL installation is based in strange directory, use
50       the --with-mysql=DIR option of ./configure to specify.  For example,
51       "./configure --with-mysql=/usr2"
52
53     o Edit /etc/libnss-mysql.cfg and /etc/libnss-mysql-root.cfg.
54
55     o Add data to MySQL. The default configs will work well with the sample
56       sql database in sample/sample_database.sql.  Read that file for more
57       details on the sample database.
58
59     o Edit (or create) /etc/nsswitch.conf such that it contains at least the
60       following:
61         passwd: files mysql
62         shadow: files mysql
63         group:  files mysql
64
65       Do not enter the 'shadow' line on any system except Linux.
66       If you don't want groups from MySQL, simply don't include 'mysql' in 
67       in the 'group' line.
68
69 64-bit Support (SPARC V9/Solaris 7+)
70 ====================================
71 You need to produce BOTH a 32-bit and 64-bit library, so get the 32-bit
72 one working first.  32-bit programs (most still are) will use the 32-bit
73 library, and 64-bit programs will use the 64-bit version.
74
75 You must have a set of 32-bit libraries, and another set of 64-bit
76 libraries: MySQL, libc, libm, etc ... Solaris tends to put 64-bit
77 libraries (and binaries) in a subdirectory named 'sparcv9' - so 64-bit
78 versions of libc, libm, etc, can be found in /usr/lib/sparcv9.
79
80     o Build a 64-bit MySQL library and install it in a DIFFERENT place than
81       your 32-bit MySQL library - IE /usr/local/lib/sparcv9/mysql
82     o Build a 64-bit libnss-mysql:
83       o Set CFLAGS settings in your environment to:
84             gcc:      "-m64"
85             Sun's CC: "-xarch=v9"
86       o Re-run 'configure', pointing it at your 64-bit MySQL library
87         (using --with-mysql=...)
88       o Edit Makefile and change 'libdir' to be '/usr/lib/sparcv9'
89       o Compile and install
90     o Test it by using programs such as 'ls' and 'ps' from the /usr/bin/sparcv9
91       directory.
92
93 At some point in the future, 64-bit support will be integrated.
94
95 Debugging
96 =========
97     See the file DEBUGGING
98
99 $Id: README,v 1.27 2004/03/28 15:50:18 cinergi Exp $