安装
安装
PHP>=7.3
- 根目录
.env
文件修改数据库连接参数。
APP_DEBUG = false
SQL_LOG = false
DB_NAME = mysql
DB_DRIVER = mysql
DB_HOST = 127.0.0.1
DB_PORT = 3306
DB_DATABASE =
DB_USERNAME = root
DB_PASSWORD =
DB_COLLATION = utf8mb4_general_ci
DB_CHARSET = utf8mb4
DB_PREFIX = yi_
SERVER_LISTEN = http://0.0.0.0:8787
CHANNEL_PORT = 2206
- 项目根目录执行
php cli install [-u 管理员用户名] [-p 密码]
等待安装完成即可。-u
和-p
可以省略 默认为admin
和123456
。
运行
windows
下根目录执行 php win.php dev
(文件修改时自动重启) 或 php win.php
linux
下根目录执行 php start.php start
或 php start.php start -d
安装模块时请使用
php win.php
或php start.php start -d
方式运行。
<h3 id="h3-u5B89u88C5"><a name="安装" class="reference-link"></a><span class="header-link octicon octicon-link"></span>安装</h3><blockquote>
<p>PHP>=7.3</p>
</blockquote>
<ol>
<li>根目录 <code>.env</code> 文件修改数据库连接参数。</li></ol>
<pre class="prettyprint linenums prettyprinted" style=""><ol class="linenums"><li class="L0"><code><span class="pln">APP_DEBUG </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">false</span></code></li><li class="L1"><code><span class="pln">SQL_LOG </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">false</span></code></li><li class="L2"><code><span class="pln">DB_NAME </span><span class="pun">=</span><span class="pln"> mysql</span></code></li><li class="L3"><code><span class="pln">DB_DRIVER </span><span class="pun">=</span><span class="pln"> mysql</span></code></li><li class="L4"><code><span class="pln">DB_HOST </span><span class="pun">=</span><span class="pln"> </span><span class="lit">127.0</span><span class="pun">.</span><span class="lit">0.1</span></code></li><li class="L5"><code><span class="pln">DB_PORT </span><span class="pun">=</span><span class="pln"> </span><span class="lit">3306</span></code></li><li class="L6"><code><span class="pln">DB_DATABASE </span><span class="pun">=</span><span class="pln"> </span></code></li><li class="L7"><code><span class="pln">DB_USERNAME </span><span class="pun">=</span><span class="pln"> root</span></code></li><li class="L8"><code><span class="pln">DB_PASSWORD </span><span class="pun">=</span><span class="pln"> </span></code></li><li class="L9"><code><span class="pln">DB_COLLATION </span><span class="pun">=</span><span class="pln"> utf8mb4_general_ci</span></code></li><li class="L0"><code><span class="pln">DB_CHARSET </span><span class="pun">=</span><span class="pln"> utf8mb4</span></code></li><li class="L1"><code><span class="pln">DB_PREFIX </span><span class="pun">=</span><span class="pln"> yi_</span></code></li><li class="L2"><code><span class="pln">SERVER_LISTEN </span><span class="pun">=</span><span class="pln"> http</span><span class="pun">:</span><span class="com">//0.0.0.0:8787</span></code></li><li class="L3"><code><span class="pln">CHANNEL_PORT </span><span class="pun">=</span><span class="pln"> </span><span class="lit">2206</span></code></li></ol></pre><ol>
<li>项目根目录执行 <code>php cli install [-u 管理员用户名] [-p 密码]</code> 等待安装完成即可。<code>-u</code> 和 <code>-p</code> 可以省略 默认为 <code>admin</code> 和 <code>123456</code>。</li></ol>
<h3 id="h3-u8FD0u884C"><a name="运行" class="reference-link"></a><span class="header-link octicon octicon-link"></span>运行</h3><p><code>windows</code> 下根目录执行 <code>php win.php dev</code>(文件修改时自动重启) 或 <code>php win.php</code><br><code>linux</code> 下根目录执行 <code>php start.php start</code> 或 <code>php start.php start -d</code></p>
<blockquote>
<p>安装模块时请使用 <code>php win.php</code> 或 <code>php start.php start -d</code> 方式运行。</p>
</blockquote>