测试环境:
Fedora 18 64位
1. tar.gz
1> wget http://mirror.bit.edu.cn/apache//httpd/httpd-2.4.4.tar.gz
2> wget http://labs.mop.com/apache-mirror//apr/apr-1.4.6.tar.gz
3> wget http://labs.mop.com/apache-mirror//apr/apr-util-1.4.1.tar.gz
4> wget http://labs.mop.com/apache-mirror//apr/apr-iconv-1.2.1.tar.gz
5> wget https://fastdfs.googlecode.com/files/fastdfs-apache-module_v1.15.tar.gz
2. 安装apache
1> tar -xvf httpd-2.4.4.tar.gz
2> tar -xvf apr-1.4.6.tar.gz -> ln -sv apr-1.4.6 /http-2.4.4/srclib/apr
3> tar -xvf apr-util-1.4.1.tar.gz -> ln -sv apr-util-1.4.1 /http2.4.4/srclib/apr-util
4> tar -xvf apr-iconv-1.2.1.tar.gz -> ln -sv apr-iconv-1.2.1 /http2.4.4/srclib/apr-iconv
5> 进入 httpd-2.4.4
6> ./configure --prefix=/usr/local/apache2 --with-include-apr --with-ssl --enable--ssl --enable--module=so --enable-rewrite --enable-cgid --enable-cgi
7> make
8> make install
3. 安装 fastdfs-apache-module_v1.15
1> tar -xvf fastdfs-apache-module_v1.15.tar.gz
2> cd fastdfs-apache-module/src
3> vim Makefile
修改为
APACHE_BASE_PATH=/usr/local/apache2
4> make
5> make install
6> vim /usr/local/apache2/conf/httpd.conf
添加:
LoadModule fastdfs_module modules/mod_fastdfs.so
<VirtualHost *:80>
Servername localhost
<Location /M00>
sethandler fastdfs
</Location>
</VirtualHost>
7> /usr/local/apache2/bin/apachectl start
注意:
如果开启了显示group, 则要配置成 <Location /group/M00>