PDA

View Full Version : Building and installing pure-ftpd with mysql



spewperb
11th August 2008, 10:34 AM
Hi everyone I'm trying to build and install pure-ftpd with mysql support on a fedora server. However I get an error message when I try and configure the build.

Error message:
configure: error: libmysqlclient is needed for MySQL support

Here are the configure tags I'm using

./configure --with-ftpwho --with-paranoidmsg --with-puredb --with-privsep --with-quotas --without-banner --with-mysql=/usr/lib/mysql

Any ideas

oneofmany
11th August 2008, 11:02 AM
is mysql installed?

spewperb
11th August 2008, 11:06 AM
Yes it is.

If I go to /usr/lib/mysql/ I can see the following files

libmysqlclient_r.so.15
libmysqlclient.so.15
mysqlbug
libmysqlclient_r.so.15.0.0
libmysqlclient.so.15.0.0
mysql_config

oneofmany
11th August 2008, 11:26 AM
make sure you have the mysql development libraries installed.



yum install mysql-devel

leigh123linux
11th August 2008, 11:27 AM
Why are you trying to build yourself ?

Its already in the repo's and has mysql support included !


yum install pure-ftpd



Here's part of the SPEC file !


Name: pure-ftpd
Version: 1.0.21
Release: 15%{?dist}
Summary: Lightweight, fast and secure FTP server

Group: System Environment/Daemons
License: BSD
URL: http://www.pureftpd.org
Source0: http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.21.tar.bz2
Source1: pure-ftpd.init
Source2: pure-ftpd.logrotate
Source3: pure-ftpd.xinetd
Source4: pure-ftpd.pure-ftpwho.pam
Source5: pure-ftpd.pure-ftpwho.consoleapp
Source6: pure-ftpd.README.SELinux
Source7: pure-ftpd.pureftpd.te
Patch0: pure-ftpd-1.0.21-config.patch
Patch1: pure-ftpd-1.0.20-libdir.patch
Patch2: pure-ftpd-paminclude.patch
Provides: ftpserver
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: pam-devel, perl, python, libcap-devel
%{!?_without_ldap:BuildRequires: openldap-devel}
%{!?_without_mysql:BuildRequires: mysql-devel}
%{!?_without_pgsql:BuildRequires: postgresql-devel}
%{!?_without_tls:BuildRequires: openssl-devel}
# SELinux module
%if 0%{?fedora} == 5
BuildRequires: checkpolicy, selinux-policy >= 2.2.40, m4
%else
BuildRequires: checkpolicy, selinux-policy-devel
%endif

Requires(post): chkconfig
Requires(preun): chkconfig, initscripts
Requires(postun): initscripts
Requires: logrotate, usermode


%description
Pure-FTPd is a fast, production-quality, standard-comformant FTP server,
based upon Troll-FTPd. Unlike other popular FTP servers, it has no known
security flaw, it is really trivial to set up and it is especially designed
for modern Linux and FreeBSD kernels (setfsuid, sendfile, capabilities) .
Features include PAM support, IPv6, chroot()ed home directories, virtual
domains, built-in LS, anti-warez system, bandwidth throttling, FXP, bounded
ports for passive downloads, UL/DL ratios, native LDAP and SQL support,
Apache log files and more.
Rebuild switches:
--without ldap disable ldap support
--without mysql disable mysql support
--without pgsql disable postgresql support
--without extauth disable external authentication
--without tls disable SSL/TLS


%package selinux
Summary: SELinux support for Pure-FTPD
Group: System Environment/Daemons
Requires: %{name} = %{version}
Requires(post): policycoreutils, initscripts, %{name}
Requires(preun): policycoreutils, initscripts, %{name}
Requires(postun): policycoreutils

%description selinux
This package adds SELinux enforcement to Pure-FTPD. Install it if you want
Pure-FTPd to be protected in the same way other FTP servers are in Fedora
(e.g. VSFTPd and ProFTPd)



%prep
%setup -q
%patch0 -p0 -b .config
%patch1 -p0 -b .libdir
%patch2 -p0 -b .paminclude
install -pm 644 %{SOURCE6} README.SELinux
mkdir selinux
cp -p %{SOURCE7} selinux/pureftpd.te


%build
%configure --with-paranoidmsg \
--with-capabilities \
--with-privsep \
--with-pam \
--with-puredb \
--with-sendfile \
--with-altlog \
--with-cookie \
--with-diraliases \
--with-throttling \
--with-ratios \
--with-quotas \
--with-ftpwho \
--with-welcomemsg \
--with-uploadscript \
--with-peruserlimits \
--with-virtualhosts \
--with-virtualchroot \
--with-largefile \
--sysconfdir=%{_sysconfdir}/%{name} \
--without-bonjour \
--with-cork \
--with-rfc2640 \
%{!?_without_tls:--with-tls --with-certfile=%{_sysconfdir}/pki/%{name}/%{name}.pem} \
%{!?_without_ldap:--with-ldap} \
%{!?_without_mysql:--with-mysql} \
%{!?_without_pgsql:--with-pgsql} \
%{!?_without_extauth:--with-extauth}

make %{?_smp_mflags}

spewperb
11th August 2008, 11:40 AM
Ok I've run yum install pure-ftpd is there a way of checking the mysql libraries are working?