如何在MAMP服务器上安装mod_ftp模块
背景:如何在MAMP服务器上安装mod_ftp模块,ftp,mamp,apache,apache-modules,Ftp,Mamp,Apache,Apache Modules,背景: To build and install as a DSO outside of the httpd source build, from the ftp source root directory, simply; ./configure.apxs make make install ... To build static, or as a DSO but within the same build as httpd, copy the entire ft
To build and install as a DSO outside of the httpd source
build, from the ftp source root directory, simply;
./configure.apxs
make
make install
...
To build static, or as a DSO but within the same build as httpd,
copy the entire ftp source directory tree on top of your existing
httpd source tree, and from the httpd source root directory
./buildconf (to pick up ftp)
./configure --enable-ftp {your usual options}
and proceed as usual.
$ ./configure.apxs
Configuring mod_ftp for APXS in /usr/sbin/apxs
Detecting features
Finished, run 'make' to compile mod_ftp
Run 'make FTPPORT=8021 install' to install mod_ftp
(The default FTPPORT is 21 if not specified)
The manual pages ftp/index.html and mod/mod_ftp.html
will be installed to help get you started.
The conf/extra/ftpd.conf will be installed as an example
for you to work from. In your configuration file,
/private/etc/apache2/httpd.conf
uncomment the line '#Include conf/extra/ftpd.conf'
to activate this example mod_ftp configuration.
$ make
Making all in modules/ftp
$ sudo make install
Password:
Making install in modules/ftp
/usr/share/apr-1/build-1/libtool --silent --mode=install cp mod_ftp.la /usr/libexec/apache2/
Installing configuration files
for i in /private/etc/apache2/httpd.conf /private/etc/apache2/original/httpd.conf; do \
if test -f $i; then \
(awk -f /applications/mamp/library/mod_ftp/build/addloadexample.awk \
-v MODULE=ftp -v DSO=.so -v LIBPATH=libexec/apache2 \
-v EXAMPLECONF=/private/etc/apache2/extra/ftpd.conf \
< $i > $i.new && \
mv $i $i.bak && mv $i.new $i \
) || true; \
fi; \
done
Preserving existing FTP documents
Installing header files
Installing online manual
$
我最近安装了MAMP,并将其用作生产服务器。服务器设置没有附带FTP服务器,根据我所读的内容,您可以通过mod_FTP(Apache模块)设置FTP服务器。我不是Apache软件或服务器管理员方面的专家,尽管我可以快速学习。我可以到达下面的点,然后我就被卡住了。有人能帮我吗
我从存储库中签出了mod_ftp模块文件,在这里:
我将内容解压缩到:
/Applications/MAMP/mod_ftp
我打开了README-FTP文件(此处):README-FTP:
To build and install as a DSO outside of the httpd source
build, from the ftp source root directory, simply;
./configure.apxs
make
make install
...
To build static, or as a DSO but within the same build as httpd,
copy the entire ftp source directory tree on top of your existing
httpd source tree, and from the httpd source root directory
./buildconf (to pick up ftp)
./configure --enable-ftp {your usual options}
and proceed as usual.
$ ./configure.apxs
Configuring mod_ftp for APXS in /usr/sbin/apxs
Detecting features
Finished, run 'make' to compile mod_ftp
Run 'make FTPPORT=8021 install' to install mod_ftp
(The default FTPPORT is 21 if not specified)
The manual pages ftp/index.html and mod/mod_ftp.html
will be installed to help get you started.
The conf/extra/ftpd.conf will be installed as an example
for you to work from. In your configuration file,
/private/etc/apache2/httpd.conf
uncomment the line '#Include conf/extra/ftpd.conf'
to activate this example mod_ftp configuration.
$ make
Making all in modules/ftp
$ sudo make install
Password:
Making install in modules/ftp
/usr/share/apr-1/build-1/libtool --silent --mode=install cp mod_ftp.la /usr/libexec/apache2/
Installing configuration files
for i in /private/etc/apache2/httpd.conf /private/etc/apache2/original/httpd.conf; do \
if test -f $i; then \
(awk -f /applications/mamp/library/mod_ftp/build/addloadexample.awk \
-v MODULE=ftp -v DSO=.so -v LIBPATH=libexec/apache2 \
-v EXAMPLECONF=/private/etc/apache2/extra/ftpd.conf \
< $i > $i.new && \
mv $i $i.bak && mv $i.new $i \
) || true; \
fi; \
done
Preserving existing FTP documents
Installing header files
Installing online manual
$
一些问题:
To build and install as a DSO outside of the httpd source
build, from the ftp source root directory, simply;
./configure.apxs
make
make install
...
To build static, or as a DSO but within the same build as httpd,
copy the entire ftp source directory tree on top of your existing
httpd source tree, and from the httpd source root directory
./buildconf (to pick up ftp)
./configure --enable-ftp {your usual options}
and proceed as usual.
$ ./configure.apxs
Configuring mod_ftp for APXS in /usr/sbin/apxs
Detecting features
Finished, run 'make' to compile mod_ftp
Run 'make FTPPORT=8021 install' to install mod_ftp
(The default FTPPORT is 21 if not specified)
The manual pages ftp/index.html and mod/mod_ftp.html
will be installed to help get you started.
The conf/extra/ftpd.conf will be installed as an example
for you to work from. In your configuration file,
/private/etc/apache2/httpd.conf
uncomment the line '#Include conf/extra/ftpd.conf'
to activate this example mod_ftp configuration.
$ make
Making all in modules/ftp
$ sudo make install
Password:
Making install in modules/ftp
/usr/share/apr-1/build-1/libtool --silent --mode=install cp mod_ftp.la /usr/libexec/apache2/
Installing configuration files
for i in /private/etc/apache2/httpd.conf /private/etc/apache2/original/httpd.conf; do \
if test -f $i; then \
(awk -f /applications/mamp/library/mod_ftp/build/addloadexample.awk \
-v MODULE=ftp -v DSO=.so -v LIBPATH=libexec/apache2 \
-v EXAMPLECONF=/private/etc/apache2/extra/ftpd.conf \
< $i > $i.new && \
mv $i $i.bak && mv $i.new $i \
) || true; \
fi; \
done
Preserving existing FTP documents
Installing header files
Installing online manual
$
To build and install as a DSO outside of the httpd source
build, from the ftp source root directory, simply;
./configure.apxs
make
make install
...
To build static, or as a DSO but within the same build as httpd,
copy the entire ftp source directory tree on top of your existing
httpd source tree, and from the httpd source root directory
./buildconf (to pick up ftp)
./configure --enable-ftp {your usual options}
and proceed as usual.
$ ./configure.apxs
Configuring mod_ftp for APXS in /usr/sbin/apxs
Detecting features
Finished, run 'make' to compile mod_ftp
Run 'make FTPPORT=8021 install' to install mod_ftp
(The default FTPPORT is 21 if not specified)
The manual pages ftp/index.html and mod/mod_ftp.html
will be installed to help get you started.
The conf/extra/ftpd.conf will be installed as an example
for you to work from. In your configuration file,
/private/etc/apache2/httpd.conf
uncomment the line '#Include conf/extra/ftpd.conf'
to activate this example mod_ftp configuration.
$ make
Making all in modules/ftp
$ sudo make install
Password:
Making install in modules/ftp
/usr/share/apr-1/build-1/libtool --silent --mode=install cp mod_ftp.la /usr/libexec/apache2/
Installing configuration files
for i in /private/etc/apache2/httpd.conf /private/etc/apache2/original/httpd.conf; do \
if test -f $i; then \
(awk -f /applications/mamp/library/mod_ftp/build/addloadexample.awk \
-v MODULE=ftp -v DSO=.so -v LIBPATH=libexec/apache2 \
-v EXAMPLECONF=/private/etc/apache2/extra/ftpd.conf \
< $i > $i.new && \
mv $i $i.bak && mv $i.new $i \
) || true; \
fi; \
done
Preserving existing FTP documents
Installing header files
Installing online manual
$
此目录:
/Applications/MAMP/Library/modules (where all of Apache's other mod_*.so files are...)
/Applications/MAMP/mod_ftp/modules/ftp (where all of mod_ftp's various .c, .h and other files are)
最后,我认为我遇到的问题是,我不明白如何集成mod_ftp源文件夹和httpd源文件夹之间的文件结构,以使模块正常运行。另外,我不知道我不知道的,所以可能有一个简单的问题要问,但不幸的是,我不知道怎么问。谢谢你的帮助和耐心
干杯
另外,是的,我在网上搜索了几个小时 我最终放弃了MAMP,使用了Mac的内置服务器。通过系统首选项>共享菜单,您可以启用文件共享,其中有一个选项窗格,允许您“使用FTP共享文件和文件夹”。我可以通过Comcast Business获得静态IP地址,并在路由器的端口21上配置端口转发以接受流量。然后,我可以使用我的FTP客户机连接到我的路由器,主机类似于“123.456.789:21”。虽然不是最好或最安全的解决方案,但它确实奏效了,所以请恕我直言。是的,我终于在Ubuntu LTS 16.04上安装了它
首先,您应该通过运行
sudo apt get安装subversion apache2-dev.
然后,将cd放入一个方便的文件夹,并运行svn co。这将下载名为/trunk的文件夹中的所有内容。然后,将cd放入下载的repo的/trunk文件夹中 然后,运行说明
./configure.apxs-->在子文件夹中执行某些操作以使makefile正常工作
make-->这将编译回购协议的内容并改变周围的情况。
使安装-->您可能希望使用建议的标志运行。基本上是将内容复制到需要复制的地方,并创建必要的模块。
建议的./buildconf和./configure只有在同时使用ftp编译apache2时才能执行。因为您应该已经安装了apache2,所以您不应该这样做。只需遵循第一组指令,它们用于独立于apache2编译mod_ftp,并根据需要进行修补。
在这一点上,安装应该在技术上可行。然而,你还没有完全脱离困境。如果此时重新启动apache2,它将无法启动。如果您运行systemctl-xe,您将看到这是由于配置文件中不同位置的语法错误造成的,其中有人忘记了在前面加一个正斜杠,因此指定的目录不是相对于root,而是相对于/etc/apache2。以行号为指导,解决这些问题。在指定mod_ftp模块位置的apache2.conf文件和指定错误日志位置的ftpd.conf文件中可以找到遗漏 现在需要处理apache2.conf和ftpd.conf(位于/etc/apache2文件夹的/extra子文件夹中)。确保所有行均已关闭
include/etc/apache2/extra/ftpd.conf
LoadModule ftp_module/usr/lib/apache2/modules/mod_ftp.so存在且未注释。
第一个基本上告诉主apache2.conf文件包含mod_ftp的配置文件,以帮助划分http和ftp配置设置。第二种方法只是确保加载了ftp模块,以便它能够解释ftpd.conf文件中的指令。因此,您不需要添加行“FTP on”或指定端口,因为ftpd.conf可以很好地处理这些端口
你现在应该可以走了。请注意,出于某种奇怪的原因,如果将ftpd.conf中的文档根设置为与apache2.conf中的相同,apache2仍将正常运行。ftp服务器将正常工作,但http服务器将不工作。不知道为什么,但如果您想这样做,一个简单的解决方法是只做一个到http文档根的符号链接,并将其设置为ftp文档根。您是否已经解决了这个问题?如果是这样的话,你肯定应该添加你的解决方案作为答案…不幸的是,没有。我最终放弃了MAMP并使用了Mac的内置服务器。通过系统优先