<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                [TOC] > [參考鳥哥](https://www.laruence.com/2020/02/15/4982.html) >[asd 官網](https://wiki.archlinux.org/index.php/Anything-sync-daemon_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)) ## 概述 使用內存硬盤(tmpfs)來加速你的網站,操作前必須備份原始目錄內容 ## 創建內存硬盤目錄 ``` mount -t tmpfs -o size=256M tmpfs /ramdisk ``` 256M,會按實際占用的大小分配內存,不會直接占用256M ## Anything-sync-daemon 同步目錄 ``` wget https://github.com/graysky2/anything-sync-daemon/archive/master.zip cd anything-sync-daemon-master/ make install-systemd-all ``` 問題:如果 沒有把服務安裝到 /usr/lib/systemd/system 下 手動移動 ``` mv asd-resync.service asd-resync.timer asd.service /lib/systemd/system systemctl daemon-reload ``` ### 修改 asd.conf `/etc/asd.conf` or `/run/asd.conf` ``` #要同步的目錄 ,多目錄用逗號隔開 WHATTOSYNC=('/home/huixinchen/www/htdocs/') VOLATILE="/ramdisk" // tmpfs目錄 ``` ### 設置同步時間 vim /lib/systemd/system/asd-resync.timer ``` [Unit] Description=Timer for Anything-sync-daemon - 1Hour PartOf=asd-resync.service asd.service [Timer] # 分鐘 10min OnUnitActiveSec=24h ``` ### `asd p` 檢查 ``` $ asd p Anything-sync-daemon v5.85 on Ubuntu 18.04.4 LTS Daemon pid file is not present. Resync cronjob is not present. Overlayfs technology is currently inactive. Asd will manage the following per /etc/asd.conf settings: owner/group id: huixinchen/1000 target to manage: /home/huixinchen/www/htdocs sync target: /home/huixinchen/www/.htdocs-backup_asd tmpfs target: /ramdisk/asd-huixinchen/home/huixinchen/www/htdocs dir size: 237M recovery dirs: none ``` 1. asd會把`/home/huixinchen/www/htdocs `目錄同步到 `/ramdisk/asd-huixinchen/home/huixinchen/www/htdocs` 2. 并且會把tmpfs上的更新內容按照時間寫回到 `/home/huixinchen/www/.htdocs-backup_asd` 3. 當我們停止asd的服務的時候,asd會把`.htdocs-backup_asd`在mv成`htdocs`,這樣就不用擔心你的內容會因為服務器突然斷電丟失了 ### 啟動 asd ``` systemctl restart asd ``` ### 軟連接映射 * 啟動 asd 后 `/home/huixinchen/www` 下的`htdocs`自動映射到 `/ramdisk/asd-huixinchen/home/huixinchen/www/htdocs/` * 關閉 asd,映射自動取消,所以 nginx 或apache 的 htdocs 不需要改 ``` > systemctl stop asd > ll im_webserver drwxrwxr--. 14 im_user im_user 4096 Feb 17 09:24 apache drwxrwxr-x. 2 im_user im_user 4096 May 25 2017 common drwxrwxrwx. 15 im_user im_user 4096 Feb 17 09:24 mysql drwxrwxr--. 7 im_user im_user 60 Feb 17 09:24 php drwxrwxr-x. 7 im_user im_user 4096 Feb 17 15:11 www > systemctl start asd > ll /home/im_user/im_server/im_webserver drwxrwxr--. 14 im_user im_user 4096 Feb 17 09:24 apache drwxrwxr-x. 2 im_user im_user 4096 May 25 2017 common drwxrwxrwx. 15 im_user im_user 4096 Feb 17 09:24 mysql drwxrwxr--. 7 im_user im_user 60 Feb 17 09:24 php lrwxrwxrwx. 1 im_user im_user 60 Feb 18 11:18 www -> /ramdisk/asd-im_user/home/im_user/im_server/im_webserver/www ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看