FileZilla Server源码编译依赖c++17,gcc版本需使用gcc10以上
***强烈建议按照以下顺序编译,否则。。。
1.build environment
更换yum源
#备份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.back #这里使用阿里云的仓库 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo #更新仓库 yum update
2.GCC
安装旧版本gcc (centos7默认gcc4.8.5)
yum install gcc gcc-c++
源码编译升级gcc
#解压 tar -xzf gcc-10.1.0.tar.gz cd gcc-10.1.0 #下载所需的依赖项 ./contrib/download_prerequisites #创建编译目录和配置安装 cd .. mkdir objdir cd objdir ../configure --prefix=/opt/gcc --enable-languages=c,c++ --disable-multilib #编译和安装 make -j$(nproc) make install #配置环境变量 vim ~/.bashrc export PATH=/opt/gcc/bin:$PATH export LD_LIBRARY_PATH=/opt/gcc/lib64:$LD_LIBRARY_PATH source ~/.bashrc
3.GMP
#下载 wget https://gmplib.org/download/gmp/gmp-6.3.0.tar.xz #解压 tar -xvf gmp-6.3.0.tar.xz #配置 cd gmp-6.3.0/ ./configure #编译安装 make make install #配置环境变量 vim ~/.bashrc export GMP_CFLAGS="-I/usr/local/include" export GMP_LIBS="-L/usr/local/lib -lgmp" source ~/.bashrc
4.Nettle
#下载 wget https://ftp.gnu.org/gnu/nettle/nettle-3.10.tar.gz #解压 tar -vxzf nettle-3.10.tar.gz #配置 cd nettle-3.10/ ./configure #编译安装 make make install #配置环境变量 vim ~/.bashrc export NETTLE_LIBS="-L/usr/local/lib64 -lnettle" export NETTLE_CFLAGS="-I/usr/local/include" export HOGWEED_LIBS="-L/usr/local/lib64 -lhogweed" export HOGWEED_CFLAGS="-I/usr/local/include" source ~/.bashrc
5.libidn2
#下载 wget https://ftp.gnu.org/gnu/libidn/libidn2-2.3.7.tar.gz #解压 tar -vxzf libidn2-2.3.7.tar.gz #配置 cd libidn2-2.3.7/ ./configure #编译安装 make make install #配置环境变量 vim ~/.bashrc export LIBIDN2_LIBS="-L/usr/local/lib -lidn2" export LIBIDN2_CFLAGS="-I/usr/local/include" source ~/.bashrc
6.GnuTLS
#下载 wget https://www.gnupg.org/ftp/gcrypt/gnutls/v3.8/gnutls-3.8.1.tar.xz #解压 tar -xvf gnutls-3.8.1.tar.xz #配置 cd gnutls-3.8.1 ./configure --with-included-libtasn1 --with-included-unistring --without-p11-kit #编译安装 make make install #配置环境变量 vim ~/.bashrc export GNUTLS_LIBS="-L/usr/local/lib -lgnutls" export GNUTLS_CFLAGS="-I/usr/local/include" source ~/.bashrc
7.libfilezilla
#官网下载源码 libfilezilla-0.48.1.tar.xz #解压 tar -xvf libfilezilla-0.48.1.tar.xz #配置 cd libfilezilla-0.48.1 ./configure #编译安装 make make install #配置环境变量 vim ~/.bashrc export LIBFILEZILLA_LIBS="-L/usr/local/lib -lfilezilla" export LIBFILEZILLA_CFLAGS="-I/usr/local/include" source ~/.bashrc
8.SQLite
#官网下载源码 sqlite-autoconf-3460100.tar.gz #解压 tar -zxvf sqlite-autoconf-3460100.tar.gz #配置 cd sqlite-autoconf-3460100 ./configure #编译安装 make make install #配置环境变量 vim ~/.bashrc export LIBSQLITE3_LIBS="-L/usr/local/lib -lsqlite3" export LIBSQLITE3_CFLAGS="-I/usr/local/include" source ~/.bashrc
9.wxWidgets
#官网下载源码 wxWidgets-3.2.6.tar.bz2 #解压 tar -zxvf wxWidgets-3.2.6.tar.bz2 #安装依赖 cd wxWidgets-3.2.6 yum -y install gtk2-devel binutils-devel #配置 ./configure #编译安装 make make install
10.FileZilla-Server
#官网下载源码 filezilla_server_1.9.1_src.tar.xz #解压 tar -xvf filezilla_server_1.9.1_src.tar.xz #配置 cd filezilla-server-1.9.1 ./configure --prefix=/home/filezilla-server --with-pugixml=builtin #编译安装 make make install #配置环境变量 vim ~/.bashrc export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH source ~/.bashrc #运行服务 cd /home/filezilla-server/bin ./filezilla-server #运行服务配置gui ./filezilla-server-gui
到此就大功告成啦!!!恭喜恭喜!!!