美文网首页
FastDFS自启动

FastDFS自启动

作者: 心谛 | 来源:发表于2018-08-28 23:58 被阅读0次

mkdir /usr/local/fdfs

cp /usr/bin/stop.sh /usr/local/fdfs

cp /usr/bin/restart.sh /usr/local/fdfs

备份/etc/init.d/fdfs_trackerd

备份/etc/init.d/fdfs_storaged

修改/etc/init.d/fdfs_trackerd

※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※

PRG=/usr/bin/fdfs_trackerd

if [ ! -f /usr/local/fdfs/stop.sh ]; then

  echo "file /usr/local/fdfs/stop.sh does not exist!"

  exit 2

fi

if [ ! -f /usr/local/fdfs/restart.sh ]; then

  echo "file /usr/local/fdfs/restart.sh does not exist!"

  exit 2

stop() {

/usr/local/fdfs/stop.sh $CMD

RETVAL=$?

return $RETVAL

}

restart() {

/usr/local/fdfs/restart.sh $CMD &

}

※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※

修改/etc/init.d/fdfs_storaged

※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※

PRG=/usr/bin/fdfs_storaged

if [ ! -f /usr/local/fdfs/stop.sh ]; then

  echo "file /usr/local/fdfs/stop.sh does not exist!"

  exit 2

fi

if [ ! -f /usr/local/fdfs/restart.sh ]; then

  echo "file /usr/local/fdfs/restart.sh does not exist!"

  exit 2

stop() {

/usr/local/fdfs/stop.sh $CMD

RETVAL=$?

return $RETVAL

}

restart() {

/usr/local/fdfs/restart.sh $CMD &

}

※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※

chkconfig --add fdfs_trackerd

chkconfig --add fdfs_storaged

mkdir /usr/local/nginx/logs

修改/usr/local/nginx/conf/nginx.conf

※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※

pid        /usr/local/nginx/logs/nginx.pid;

※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※

vim /lib/systemd/system/nginx.service

※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※

[Unit]

Description=nginx

After=network.target

[Service]

Type=forking

ExecStart=/usr/local/nginx/sbin/nginx

ExecReload=/usr/local/nginx/sbin/nginx -s reload

ExecStop=/usr/local/nginx/sbin/nginx -s quit

PrivateTmp=true

[Install]

WantedBy=multi-user.target

※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※

相关文章

  • FastDFS自启动

    mkdir /usr/local/fdfs cp /usr/bin/stop.sh /usr/local/fdfs...

  • FastDFS 和 Nginx 整合

    1、安装 FastDFS Centos 7 安装 FastDFS 2、配置 fastdfs-nginx-modul...

  • 分布式FastDFS集群部署

    FastDFS FastDFS的作者余庆在其 GitHub 上是这样描述的:“FastDFS is an open...

  • 使用docker安装fastDFS

    使用Docker安装FastDFS 获取镜像可以利用已有的FastDFS Docker镜像来运行FastDFS。 ...

  • FastDFS

    1.FastDFS介绍 1.1FastDFS构成 FastDFS由存储服务器(Storage Server)、 跟...

  • FastDFS安装

    FastDFS安装报告 [TOC] 实验要求 安装 FastDFS这个开源的轻量级的分布式文件系统FastDFS ...

  • FastDFS集群部署

    之前介绍过关于FastDFS单机部署,详见博文:FastDFS单节点部署 下面来看下FastDFS集群部署,实现高...

  • 在CentOS上搭建FastDFS+nginx

    一、软件下载 fastdfs libfastcommon fastdfs-nginx-module nginx 二...

  • FastDFS 集群

    Centos 7 安装 FastDFS CentOS 7 安装 Nginx FastDFS 和 Nginx 整合 ...

  • Django开发教程(四)

    十四、分布式图片存储服务器FastDFS 14.1 什么是FastDFS FastDFS 是用 c 语言编写的一款...

网友评论

      本文标题:FastDFS自启动

      本文链接:https://www.haomeiwen.com/subject/cricwftx.html