当前第2页 返回上一页
1 2 | wget https:
cp /usr/local/src/fastdfs-nginx-module/src/mod_fastdfs.conf /etc/fdfs
|
配置nginx moudle:
1 2 3 4 | vim /etc/fdfs/mod_fastdfs.conf
tracker_server=192.168.0.104:22122 #tracker服务器IP和端口
url_have_group_name=true
store_path0=/home/dfs
|
安装nginx:
1 2 3 4 5 | wget http:
tar -zxvf nginx-1.15.4.tar.gz
cd nginx-1.15.4/
./configure --add-module=/usr/local/src/fastdfs-nginx-module/src/ # 添加fastdfs-nginx-module模块
make && make install
|
7.2#配置nginx.config
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | touch /usr/local/nginx/logs/nginx.pid && chmod a+w /usr/local/nginx/logs/nginx.pid
vim /usr/local/nginx/conf/nginx.conf
#添加如下配置
pid /usr/local/nginx/logs/nginx.pid;
server {
listen 8888; ## 该端口为storage.conf中的http.server_port相同
server_name 192.168.110.151;
location ~/group[0-9]/ {
ngx_fastdfs_module;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
|
8.关闭防火墙:
systemctl stop firewalld.service
9.nginx 启动停止
1 2 3 4 | ./nginx -c /usr/local/nginx/conf/nginx.conf # 根据配置启动
/usr/local/nginx/sbin/nginx #启动nginx
/usr/local/nginx/sbin/nginx -s reload #重启nginx
/usr/local/nginx/sbin/nginx -s stop #停止nginx
|
10.测试访问:
以上就是关于centos7 fastdfs部署的详细内容,更多文章请关注木庄网络博客!
返回前面的内容
相关阅读 >>
CentOS7怎么使用yum安装lnmp环境
CentOS7怎么关闭防火墙
CentOS7怎么添加新用户
CentOS7配置自定义jdk的方法
CentOS7系统无法使用yum命令怎么办
介绍CentOS7 bond的配置和调试
CentOS7更换国内yum源
linux学习第三篇之CentOS7安装mysql5.7.16数据库的详细介绍
CentOS7怎么配置网络
CentOS7安装zabbix的详细介绍
更多相关阅读请进入《CentOS7》频道 >>
转载请注明出处:木庄网络博客 » 关于centos7 fastdfs部署