<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>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                ## 獨立部署 獨立部署即為在后端運行程序,讓程序跑在后臺。 ## daemon 參數 - 通過骨架代碼中自帶的 `-d/--daemon` 參數使程序在后臺執行。 ~~~ $ php bin/mix.php web -d ~~~ ~~~ $ php bin/mix.php web --daemon ~~~ ## nohup 通過 Linux 的 `nohup` 命令使程序在后臺執行。 ~~~ $ nohup php bin/mix.php web >/dev/null 2>&1 & ~~~ ## shell 通常我們會使用一個簡單的 shell 腳本來管理 mix 進程,保存以下腳本為 `mix.sh`: - `php` 使用的 php 絕對路徑 - `file` mix 入口文件絕對路徑 - `cmd` 使用的 mix 命令名稱 - `numprocs` 開啟的進程數量,大于 1 就會執行端口復用多開 ~~~ #!/bin/sh echo "============`date +%F' '%T`===========" php=/usr/local/php/bin/php file=/data/mix/bin/mix.php cmd=web numprocs=1 getpid() { docmd=`ps aux | grep ${file} | grep ${cmd} | grep -v 'grep' | grep -v '\.sh' | awk '{print $2}' | xargs` echo $docmd } start() { pidstr=`getpid` if [ -n "$pidstr" ];then echo "running with pids $pidstr" else if [ $numprocs -eq 1 ];then $php $file $cmd -d else i=0 while(( $i<$numprocs )) do $php $file $cmd -r -d let "i++" done fi sleep 1 pidstr=`getpid` echo "start with pids $pidstr" fi } stop() { pidstr=`getpid` if [ ! -n "$pidstr" ];then echo "Not Executed!" return fi echo "kill $pidstr" kill $pidstr } restart() { stop sleep 1 start } case "$1" in start) start ;; stop) stop ;; restart) restart ;; esac ~~~ 腳本如何使用: - `sh mix.sh start` - `sh mix.sh stop` - `sh mix.sh restart` > 有些公司喜歡使用 crontab 拉起異常停止的程序,可以定時調用該腳本的 start 方法
                  <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>

                              哎呀哎呀视频在线观看