PHPackages                             lyhiving/swoolefilesync - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. lyhiving/swoolefilesync

ActiveLibrary

lyhiving/swoolefilesync
=======================

Swoole file sync system

0.5.6(5y ago)022MITPHP

Since May 21Pushed 5y agoCompare

[ Source](https://github.com/lyhiving/swoolefilesync)[ Packagist](https://packagist.org/packages/lyhiving/swoolefilesync)[ Docs](https://github.com/lyhiving/SwooleFileSync)[ RSS](/packages/lyhiving-swoolefilesync/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (1)Versions (13)Used By (0)

依赖inotify和swoole扩展
------------------

[](#依赖inotify和swoole扩展)

使用inotify监听目录 文件变更时自动同步到远程服务器程

```
pecl install swoole
pecl install inotify

```

配置说明
----

[](#配置说明)

```
$conf = [
    'SourceFileServer' => ['host' => '192.168.8.152', 'port' => 9657],//同步文件来源的主服务器
    'FileSyncClient'   => [//需要同步到的从服务器 端口设置保持一致
        ['host' => '192.168.8.98', 'port' => 9656],
        ['host' => '192.168.8.164', 'port' => 9656],
    ],
    'FileMonitorDir'   => '/data/synctest/',//文件动态监控的目录
    'cmd'              => '/usr/local/bin/php',//执行命令
];

```

使用说明
----

[](#使用说明)

- 配置文件设置完成后 将代码放置到涉及的各个服务器
- 使用前 需要先开启从服务器client

```
 php daemon.php -t c -o start

```

- 所有从服务器client 开启后 启动主服务器并开启文件监控

```
 php daemon.php -t s -o start

```

服务关闭
----

[](#服务关闭)

```
 php daemon.php -t c -o stop

 php daemon.php -t s -o stop

```

该目录的文件仅为示范，生产环境使用时，还是在工作目录引入。假设文件与vendor目录在同一层。

下面的命令是可以用的

```
 cp daemon.php ../../../daemon.php
 cp hooks_unzipAndMoveSample.php ../../../hooks_unzipAndMove.php
 cp config.sample.php ../../../config.inc.php
 cp config.inc.sample.php config.inc.php

```

然后对应修改：

- 当前目录下的config.inc.php 的路径指向，这种情况下，默认路径是正确的。
- 工作目录下的config.inc.php 里面的unzipAndMoveSample 到 unzipAndMove，并针对相应的文件进行调整即可。

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Total

12

Last Release

2142d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/db1eb069d037acc80edcd4b46bc92eab5bf48255d4cd753390668b36de70bed1?d=identicon)[lyhiving](/maintainers/lyhiving)

---

Top Contributors

[![lyhiving](https://avatars.githubusercontent.com/u/70043?v=4)](https://github.com/lyhiving "lyhiving (12 commits)")[![fpfgithub](https://avatars.githubusercontent.com/u/11733551?v=4)](https://github.com/fpfgithub "fpfgithub (3 commits)")

---

Tags

swoolesync

### Embed Badge

![Health badge](/badges/lyhiving-swoolefilesync/health.svg)

```
[![Health](https://phpackages.com/badges/lyhiving-swoolefilesync/health.svg)](https://phpackages.com/packages/lyhiving-swoolefilesync)
```

###  Alternatives

[laravel/octane

Supercharge your Laravel application's performance.

4.0k21.5M158](/packages/laravel-octane)[fastd/fastd

The FastD High Performance API Framework

42015.2k17](/packages/fastd-fastd)[hyperf/di

A DI for Hyperf.

182.8M594](/packages/hyperf-di)[mix/redis-subscriber

Redis native protocol Subscriber based on Swoole coroutine

151.8M2](/packages/mix-redis-subscriber)[hyperf/http-server

A HTTP Server for Hyperf.

102.8M305](/packages/hyperf-http-server)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
