storage install nginx
1. update dependency package
yum -y install pcre-devel openssl openssl-devel gcc
2. wget https://codeload.github.com/happyfish100/fastdfs-nginx-module/zip/master
3. unzip fastdfs-nginx-module-master.zip
install nginx
4. rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
5. yum install -y nginx
6. download nginx http://nginx.org/download/nginx-1.10.1.tar.gz
7. tar zxvf nginx-1.10.1.tar.gz
8. ./configure --add-module=fastdfs-nginx-module-master/src/
9. make; make install
10. cp /usr/local/src/fastdfs-nginx-module-master/src/mod_fastdfs.conf /etc/fdfs/
11. vi /etc/fdfs/mod_fastdfs.conf
1). modify base_path
2). tracker_server
3). store_path0
12. 复制 FastDFS 的部分配置文件到/etc/fdfs 目录# cd /usr/local/src/FastDFS/conf# cp http.conf mime.types /etc/fdfs/
13. config nginx
listen 80; #对应/etc/fdfs/storage.conf 中的http.server_port
server_name localhost;
location ~/group([0-9])/M00 {
#alias /opt/fdfs/storage/data;
ngx_fastdfs_module;
}
时间: 2024-10-08 11:47:01