centos 7.x安装fastdfs 5.10
来源:互联网 发布:大连理工大学网络期刊 编辑:程序博客网 时间:2024/06/03 15:07
软件仓库地址:
https://github.com/happyfish100/libfastcommon
https://github.com/happyfish100/fastdfs
https://github.com/happyfish100/fastdfs-nginx-module
实验环境:
vs73: tracker
vs74: storage(group1)+nginx
vs75: storage(group2)+nginx
下载libfastcommon:
cd
wget https://github.com/happyfish100/libfastcommon/archive/V1.0.35.tar.gz
tar -xavf V1.0.35.tar.gz
cd libfastcommon-1.0.35/
./make.sh
./make.sh install
安装fastdfs 5.10:
cd
wget https://github.com/happyfish100/fastdfs/archive/V5.10.tar.gz
tar -xzvf V5.10.tar.gz
cd fastdfs-5.10/
./make.sh
./make.sh install
cd ~/fastdfs-5.10/conf
cp http.conf anti-steal.jpg mime.types /etc/fdfs/
创建目录:
mkdir -p /var/lib/fast-dfs/tracker
mkdir -p /var/lib/fast-dfs/storage/{base,path0}
mkdir -p /var/lib/fast-dfs/client
mkdir -p /var/lib/fast-dfs/nginx-module
创建配置文件:
cp -p /etc/fdfs/tracker.conf.sample /etc/fdfs/tracker.conf
cp -p /etc/fdfs/storage.conf.sample /etc/fdfs/storage.conf
cp -p /etc/fdfs/client.conf.sample /etc/fdfs/client.conf
修改tracker进程的配置文件/etc/fdfs/tracker.conf:
--------------------------------------------------------
将:
base_path=/home/yuqing/fastdfs
改为:
base_path=/var/lib/fast-dfs/tracker
--------------------------------------------------------
修改storage进程的配置文件/etc/fdfs/storage.conf:
--------------------------------------------------------
将:
base_path=/home/yuqing/fastdfs
改为:
base_path=/var/lib/fast-dfs/storage/base
--------------------------------------------------------
将:
store_path0=/home/yuqing/fastdfs
改为:
store_path0=/var/lib/fast-dfs/storage/path0
--------------------------------------------------------
将:
tracker_server=192.168.209.121:22122
改为:
tracker_server=vs73:22122
--------------------------------------------------------
修改client进程的配置文件/etc/fdfs/client.conf:
--------------------------------------------------------
将:
base_path=/home/yuqing/fastdfs
改为:
base_path=/var/lib/fast-dfs/client
--------------------------------------------------------
将:
tracker_server=192.168.0.197:22122
改为:
tracker_server=vs73:22122
--------------------------------------------------------
启动tracker进程:
fdfs_trackerd /etc/fdfs/tracker.conf start
fdfs_trackerd /etc/fdfs/tracker.conf stop
或者
systemctl enable fdfs_trackerd
systemctl stop fdfs_trackerd
systemctl start fdfs_trackerd
systemctl status fdfs_trackerd
启动storage进程:
fdfs_storaged /etc/fdfs/storage.conf start
fdfs_storaged /etc/fdfs/storage.conf stop
或者
systemctl enable fdfs_storaged
systemctl stop fdfs_storaged
systemctl start fdfs_storaged
systemctl status fdfs_storaged
测试
fdfs_monitor /etc/fdfs/storage.conf
fdfs_upload_file /etc/fdfs/client.conf local_filename
fdfs_download_file /etc/fdfs/client.conf remote_filename
fdfs_file_info /etc/fdfs/client.conf remote_filename
安装fastdfs-nginx-module的依赖包:
yum -y install pcre pcre-devel zlib zlib-devel openssl openssl-devel
下载fastdfs-nginx-module、nginx(http://nginx.org/en/download.html)源代码:
cd
git clone https://github.com/happyfish100/fastdfs-nginx-module.git
wget http://nginx.org/download/nginx-1.12.0.tar.gz
tar -xzvf nginx-1.12.0.tar.gz
cd ~/nginx-1.12.0
./configure --prefix=/usr/local/nginx-1.12.0 --add-module=$HOME/fastdfs-nginx-module/src
make
make install
cp $HOME/fastdfs-nginx-module/src/mod_fastdfs.conf /etc/fdfs/
修改配置文件/usr/local/nginx-1.12.0/conf/nginx.conf:
server {
listen 80;
server_name localhost;
location ~ /group[0-9]/M00 {
ngx_fastdfs_module;
}
}
修改配置文件/etc/fdfs/mod_fastdfs.conf:
--------------------------------------------------------
将:
base_path=/tmp
改为:
base_path=/var/lib/fast-dfs/nginx-module
--------------------------------------------------------
将:
tracker_server=tracker:22122
改为:
tracker_server=vs73:22122
--------------------------------------------------------
将:
url_have_group_name = false
改为:
url_have_group_name = true
--------------------------------------------------------
将:
store_path0=/home/yuqing/fastdfs
改为:
store_path0=/var/lib/fast-dfs/storage/path0
--------------------------------------------------------
启动nginx:
/usr/local/nginx-1.12.0/sbin/nginx
https://github.com/happyfish100/libfastcommon
https://github.com/happyfish100/fastdfs
https://github.com/happyfish100/fastdfs-nginx-module
实验环境:
vs73: tracker
vs74: storage(group1)+nginx
vs75: storage(group2)+nginx
下载libfastcommon:
cd
wget https://github.com/happyfish100/libfastcommon/archive/V1.0.35.tar.gz
tar -xavf V1.0.35.tar.gz
cd libfastcommon-1.0.35/
./make.sh
./make.sh install
安装fastdfs 5.10:
cd
wget https://github.com/happyfish100/fastdfs/archive/V5.10.tar.gz
tar -xzvf V5.10.tar.gz
cd fastdfs-5.10/
./make.sh
./make.sh install
cd ~/fastdfs-5.10/conf
cp http.conf anti-steal.jpg mime.types /etc/fdfs/
创建目录:
mkdir -p /var/lib/fast-dfs/tracker
mkdir -p /var/lib/fast-dfs/storage/{base,path0}
mkdir -p /var/lib/fast-dfs/client
mkdir -p /var/lib/fast-dfs/nginx-module
创建配置文件:
cp -p /etc/fdfs/tracker.conf.sample /etc/fdfs/tracker.conf
cp -p /etc/fdfs/storage.conf.sample /etc/fdfs/storage.conf
cp -p /etc/fdfs/client.conf.sample /etc/fdfs/client.conf
修改tracker进程的配置文件/etc/fdfs/tracker.conf:
--------------------------------------------------------
将:
base_path=/home/yuqing/fastdfs
改为:
base_path=/var/lib/fast-dfs/tracker
--------------------------------------------------------
修改storage进程的配置文件/etc/fdfs/storage.conf:
--------------------------------------------------------
将:
base_path=/home/yuqing/fastdfs
改为:
base_path=/var/lib/fast-dfs/storage/base
--------------------------------------------------------
将:
store_path0=/home/yuqing/fastdfs
改为:
store_path0=/var/lib/fast-dfs/storage/path0
--------------------------------------------------------
将:
tracker_server=192.168.209.121:22122
改为:
tracker_server=vs73:22122
--------------------------------------------------------
修改client进程的配置文件/etc/fdfs/client.conf:
--------------------------------------------------------
将:
base_path=/home/yuqing/fastdfs
改为:
base_path=/var/lib/fast-dfs/client
--------------------------------------------------------
将:
tracker_server=192.168.0.197:22122
改为:
tracker_server=vs73:22122
--------------------------------------------------------
启动tracker进程:
fdfs_trackerd /etc/fdfs/tracker.conf start
fdfs_trackerd /etc/fdfs/tracker.conf stop
或者
systemctl enable fdfs_trackerd
systemctl stop fdfs_trackerd
systemctl start fdfs_trackerd
systemctl status fdfs_trackerd
启动storage进程:
fdfs_storaged /etc/fdfs/storage.conf start
fdfs_storaged /etc/fdfs/storage.conf stop
或者
systemctl enable fdfs_storaged
systemctl stop fdfs_storaged
systemctl start fdfs_storaged
systemctl status fdfs_storaged
测试
fdfs_monitor /etc/fdfs/storage.conf
fdfs_upload_file /etc/fdfs/client.conf local_filename
fdfs_download_file /etc/fdfs/client.conf remote_filename
fdfs_file_info /etc/fdfs/client.conf remote_filename
安装fastdfs-nginx-module的依赖包:
yum -y install pcre pcre-devel zlib zlib-devel openssl openssl-devel
下载fastdfs-nginx-module、nginx(http://nginx.org/en/download.html)源代码:
cd
git clone https://github.com/happyfish100/fastdfs-nginx-module.git
wget http://nginx.org/download/nginx-1.12.0.tar.gz
tar -xzvf nginx-1.12.0.tar.gz
cd ~/nginx-1.12.0
./configure --prefix=/usr/local/nginx-1.12.0 --add-module=$HOME/fastdfs-nginx-module/src
make
make install
cp $HOME/fastdfs-nginx-module/src/mod_fastdfs.conf /etc/fdfs/
修改配置文件/usr/local/nginx-1.12.0/conf/nginx.conf:
server {
listen 80;
server_name localhost;
location ~ /group[0-9]/M00 {
ngx_fastdfs_module;
}
}
修改配置文件/etc/fdfs/mod_fastdfs.conf:
--------------------------------------------------------
将:
base_path=/tmp
改为:
base_path=/var/lib/fast-dfs/nginx-module
--------------------------------------------------------
将:
tracker_server=tracker:22122
改为:
tracker_server=vs73:22122
--------------------------------------------------------
将:
url_have_group_name = false
改为:
url_have_group_name = true
--------------------------------------------------------
将:
store_path0=/home/yuqing/fastdfs
改为:
store_path0=/var/lib/fast-dfs/storage/path0
--------------------------------------------------------
启动nginx:
/usr/local/nginx-1.12.0/sbin/nginx
1 0
- centos 7.x安装fastdfs 5.10
- centos安装FastDFS+Nginx
- CentOS单机安装FastDFS
- CentOS安装FastDFS+Nginx
- centos安装FastDFS+Nginx
- centos中安装fastdfs
- CentOS安装FastDFS集群
- CentOS下安装FastDFS
- centos 7 安装FastDFS 5.09
- Centos安装FastDFS集群文件系统
- CentOS 7.x安装配置
- CentOS 7.X Docker安装
- Centos 7.X 安装 supervisord
- centos 7.x 安装docker
- CentOS 7.X系统安装
- CentOS 7.x安装mysql
- centos 系统下安装配置FastDFS步骤
- Centos安装FastDFS+Nginx(一天时间搞定)
- 《谷歌和亚马逊如何做产品》读书笔记之十:胜在沟通
- SSH实战OA 04:Struts2的OGNL表达式
- Nginx 集群环境搭建
- python学习笔记之正则表达式
- 关于解决在win10无线局域网环境下VMware虚拟机中的CentOS6.5系统连接网络的问题
- centos 7.x安装fastdfs 5.10
- swap分区执行脚本
- raspberry pi driver development
- 第三章 RecyclerView
- Android中使用Bundle页面传值
- linux下安装php扩展mysqli.so
- UE4连接leapmotion
- 模拟按键操作的几种方式
- xStore —— 一款在浏览器本地对 Local Storage 和 Session Storage 进行存取的工具