Discuz! Q 2024年宝塔搭建最详细的安装教程,要是还不会我也没办法了!
<br /><font color="#2c3e50"><font style="background-color:rgb(243, 245, 247)"><font face="-apple-system, BlinkMacSystemFont, &quot;"><font style="font-size:16px"><br /></font></font></font></font><br /><font style="background-color:rgb(243, 245, 247)"><font face="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif"><font color="#2c3e50">用到的系统,宝塔CentOS 7.6 系统 PHP 7.3.31 Nginx 1.18.0 MySQL 5.7.44 </font></font></font><br /><font face="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif"><font color="#2c3e50"><font style="font-size:16px"><br /></font></font></font><br /><img title="截图202406101608514592.jpg" id="aimg_30234" aid="30234" src1="static/image/common/none.gif" zoom="https://www.dismall.com/data/attachment/forum/202406/10/160851aqpx9qz4449wp64k.jpg" src="https://www.dismall.com/data/attachment/forum/202406/10/160851aqpx9qz4449wp64k.jpg" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="292" inpost="1" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" /><br /><br /><strong>步骤一:配置 PHP7.3.31</strong><strong>安装扩展 </strong><br /><strong>在宝塔控制台中,单击【软件商城】->【已安装】,查找已安装的 PHP 软件。如下图所示:</strong><font face="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif"><font color="#2c3e50"><font style="font-size:16px"><br /></font></font></font><br /><br /><img title="截图202406101626522139.jpg" id="aimg_30238" aid="30238" src1="static/image/common/none.gif" zoom="https://www.dismall.com/data/attachment/forum/202406/10/162652ap8ri6inpziil887.jpg" src="https://www.dismall.com/data/attachment/forum/202406/10/162652ap8ri6inpziil887.jpg" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="600" inpost="1" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" /><br /><font color="#2c3e50"><font face="-apple-system, BlinkMacSystemFont, &quot;"><font style="font-size:16px"><br /></font></font></font><br /><font color="#2c3e50"><font face="-apple-system, BlinkMacSystemFont, &quot;"><font style="font-size:16px">单击选择需要为 Discuz!Q 使用的 PHP 软件名称(需为7.2及以上)。此处以 PHP-7.3.31 为例。</font></font></font><br /><br /><img title="截图202406101628142842.jpg" id="aimg_30239" aid="30239" src1="static/image/common/none.gif" zoom="https://www.dismall.com/data/attachment/forum/202406/10/162814yqqsbqinm2zgsot9.jpg" src="https://www.dismall.com/data/attachment/forum/202406/10/162814yqqsbqinm2zgsot9.jpg" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="600" inpost="1" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" /><br /><font color="#2c3e50"><font face="-apple-system, BlinkMacSystemFont, &quot;"><font style="font-size:16px"><br /></font></font></font><br /><font color="#2c3e50"><font face="-apple-system, BlinkMacSystemFont, &quot;"><font style="font-size:16px">在弹出的 【php 管理】窗口中,单击【安装扩展】,进行安装扩展设置。如下图所示</font></font></font><br /><br /><br /><img title="截图202406101609596376.jpg" id="aimg_30235" aid="30235" src1="static/image/common/none.gif" zoom="https://www.dismall.com/data/attachment/forum/202406/10/160959gyb9wy5rutwufbg5.jpg" src="https://www.dismall.com/data/attachment/forum/202406/10/160959gyb9wy5rutwufbg5.jpg" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="600" inpost="1" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" /><br /><br /><font color="#2c3e50"><font face="-apple-system, BlinkMacSystemFont, &quot;"><font style="font-size:16px">在弹出的 </font></font></font>fileinfo<font color="#2c3e50"><font face="-apple-system, BlinkMacSystemFont, &quot;"><font style="font-size:16px"> </font></font></font><font color="#2c3e50"><font face="-apple-system, BlinkMacSystemFont, &quot;"><font style="font-size:16px">安装窗口中,单击【确定】。如下图所示:</font></font></font><br /><font color="#2c3e50"><font face="-apple-system, BlinkMacSystemFont, &quot;"><font style="font-size:16px"><br /></font></font></font><br /><img title="截图202406101629596763.jpg" id="aimg_30240" aid="30240" src1="static/image/common/none.gif" zoom="https://www.dismall.com/data/attachment/forum/202406/10/162959ejrtbq4frbw7z93e.jpg" src="https://www.dismall.com/data/attachment/forum/202406/10/162959ejrtbq4frbw7z93e.jpg" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="341" inpost="1" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" /><br /><font color="#2c3e50"><font face="-apple-system, BlinkMacSystemFont, &quot;"><font style="font-size:16px"><br /></font></font></font><br /><font color="#2c3e50"><font face="-apple-system, BlinkMacSystemFont, &quot;"><font style="font-size:16px">php 管理窗口中【fileinfo】与【exif】状态栏显示为</font></font></font><img id="aimg_Uu7jQ" onclick="zoom(this, this.src, 0, 0, 0)" class="zoom" src="https://www.dismall.com/data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAaCAYAAACkVDyJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACPSURBVEhL7dRBCoAgEIXhTutdvILX8BxuvYrLiVe6GTLHcWgR/iAZgR+KdNDHbdC8DZq3QXEppTp7zwQMIZBz7nqOWgYb1kaMsX55bgnkmNkOSymUc65vdxoMDUFg3vtr0XZcWgwNQb44HzMYEh1pD53FkPjScFSDITGIGqrF0BSIpH+UXtPgahs07+8g0QmsxgZcENlzVgAAAABJRU5ErkJggg==" onmouseover="img_onmouseoverfunc(this)" lazyloadthumb="1" border="0" alt="" /><font color="#2c3e50"><font face="-apple-system, BlinkMacSystemFont, &quot;"><font style="font-size:16px">即为安装成功。</font></font></font><br /><br /><font color="#2c3e50"><font face="-apple-system, BlinkMacSystemFont, &quot;"><font style="font-size:16px"><br /></font></font></font><img title="截图202406101632295350.jpg" id="aimg_30241" aid="30241" src1="static/image/common/none.gif" zoom="https://www.dismall.com/data/attachment/forum/202406/10/163229i6f69yl6fy36vzyy.jpg" src="https://www.dismall.com/data/attachment/forum/202406/10/163229i6f69yl6fy36vzyy.jpg" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="555" inpost="1" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" /><br /><br /><strong>删除禁用函数</strong><br /><br /><font color="#2c3e50"><font style="background-color:rgb(243, 245, 247)"><font face="-apple-system, BlinkMacSystemFont, &quot;"><font style="font-size:16px">删除禁用的函数 </font></font></font></font>putenv<font color="#2c3e50"><font style="background-color:rgb(243, 245, 247)"><font face="-apple-system, BlinkMacSystemFont, &quot;"><font style="font-size:16px">、</font></font></font></font>readlink<font color="#2c3e50"><font style="background-color:rgb(243, 245, 247)"><font face="-apple-system, BlinkMacSystemFont, &quot;"><font style="font-size:16px">、</font></font></font></font>symlink<font color="#2c3e50"><font style="background-color:rgb(243, 245, 247)"><font face="-apple-system, BlinkMacSystemFont, &quot;"><font style="font-size:16px">、</font></font></font></font>shell_exec<font color="#2c3e50"><font style="background-color:rgb(243, 245, 247)"><font face="-apple-system, BlinkMacSystemFont, &quot;"><font style="font-size:16px"> 就这 四 个 (可快捷建CTRL+F查找)</font></font></font></font><br /><br /><font color="#2c3e50"><font style="background-color:rgb(243, 245, 247)"><font face="-apple-system, BlinkMacSystemFont, &quot;"><font style="font-size:16px"><br /></font></font></font></font><br /><font color="#2c3e50"><font style="background-color:rgb(243, 245, 247)"><font face="-apple-system, BlinkMacSystemFont, &quot;"><font style="font-size:16px"><br /></font></font></font></font><br /><img title="截图202406101633487861.jpg" id="aimg_30242" aid="30242" src1="static/image/common/none.gif" zoom="https://www.dismall.com/data/attachment/forum/202406/10/163348ncpsvh0cshpxb3ko.jpg" src="https://www.dismall.com/data/attachment/forum/202406/10/163348ncpsvh0cshpxb3ko.jpg" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="600" inpost="1" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" /><br /><br /><font color="#2c3e50"><font style="background-color:rgb(243, 245, 247)"><font face="-apple-system, BlinkMacSystemFont, &quot;"><font style="font-size:16px"><br /></font></font></font></font><img title="截图202406101635025025.jpg" id="aimg_30243" aid="30243" src1="static/image/common/none.gif" zoom="https://www.dismall.com/data/attachment/forum/202406/10/163502cawzwaw8alnp0x85.jpg" src="https://www.dismall.com/data/attachment/forum/202406/10/163502cawzwaw8alnp0x85.jpg" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="600" inpost="1" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" /><br /><br /><strong>创建站点</strong><strong>在宝塔控制台中,单击【网站】->【添加站点】。如下图所示:</strong><br /><font face="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif"><font color="#2c3e50"><font style="font-size:16px"><br /></font></font></font><br /><br /><img title="截图202406101635295455.jpg" id="aimg_30244" aid="30244" src1="static/image/common/none.gif" zoom="https://www.dismall.com/data/attachment/forum/202406/10/163529p9j55zj85urd9fug.jpg" src="https://www.dismall.com/data/attachment/forum/202406/10/163529p9j55zj85urd9fug.jpg" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="600" inpost="1" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" /><br /><font color="#2c3e50"><font face="-apple-system, BlinkMacSystemFont, &quot"><font style="font-size:16px"><br /></font></font></font><br /><font color="#2c3e50"><font face="-apple-system, BlinkMacSystemFont, &quot"><font style="font-size:16px">在弹出的添加网站窗口中,输入相关配置信息。如下图所示:</font></font></font><br /><font face="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif"><font color="#2c3e50"><font style="font-size:16px"><br /></font></font></font><br /><img title="截图202406101636007106.jpg" id="aimg_30245" aid="30245" src1="static/image/common/none.gif" zoom="https://www.dismall.com/data/attachment/forum/202406/10/163600sik7rr1rc15lccc3.jpg" src="https://www.dismall.com/data/attachment/forum/202406/10/163600sik7rr1rc15lccc3.jpg" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="600" inpost="1" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" /><br /><br />添加好自己的网站后,进入网站的根目录里面<br /><br /><img title="截图202406101637069279.jpg" id="aimg_30246" aid="30246" src1="static/image/common/none.gif" zoom="https://www.dismall.com/data/attachment/forum/202406/10/163706m1detz6kufvgyt6g.jpg" src="https://www.dismall.com/data/attachment/forum/202406/10/163706m1detz6kufvgyt6g.jpg" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="540" inpost="1" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" /><br /><br />在网站的根目录里面创建两文件,<br /><br />1. localpack <br /><br />2. public<br /><br /><img title="截图202406101639376024.jpg" id="aimg_30247" aid="30247" src1="static/image/common/none.gif" zoom="https://www.dismall.com/data/attachment/forum/202406/10/163937wzqwealzhxfxtqml.jpg" src="https://www.dismall.com/data/attachment/forum/202406/10/163937wzqwealzhxfxtqml.jpg" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="596" inpost="1" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" /><br /><br /><br />下载Dl.PHP文件和程序的安装包<br /><br />dl.php 下载: <ignore_js_op><span style="white-space: nowrap" id="attach_30250" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})">dl.zip<em class="xg1">(18.27 KB, 下载次数: 207)</em></span>2024-6-10 16:52 上传点击文件名下载附件<br />dl.php</ignore_js_op><br /><br />程序安装包:https://www.dismall.com/thread-19012-1-1.html<br /><br /><br />提示:不要再官方下载dl.php,官方的dl.php有问题,我这个是修改好的。程序正常在官方下载<br /><br />问题一:在官网社区下载的DL.PHP会出现的问题 <br /><br />1.不显示下载 <br /><br /><img id="aimg_MvILz" onclick="zoom(this, this.src, 0, 0, 0)" class="zoom" width="600" height="352" src="https://www.dismall.com/data/attachment/forum/202405/27/133911indp1j4prrfulp91.jpg" onmouseover="img_onmouseoverfunc(this)" onclick="zoom(this)" style="cursor:pointer" border="0" alt="" /><br /><br /><br /><br /><br />2.安装无法继续,请纠正以下错误<br /><br /><br /><img id="aimg_s6L6h" onclick="zoom(this, this.src, 0, 0, 0)" class="zoom" width="600" height="164" src="https://www.dismall.com/data/attachment/forum/202406/02/032616aflosnrvqq8bqvrn.jpg" onmouseover="img_onmouseoverfunc(this)" onclick="zoom(this)" style="cursor:pointer" border="0" alt="" /><br /><br /><br />3.安装到检查软连接后就出现错误502<br /><br /><img id="aimg_EBIXY" onclick="zoom(this, this.src, 0, 0, 0)" class="zoom" width="600" height="204" src="https://www.dismall.com/data/attachment/forum/202405/30/200058plfg3x24g2hjix60.jpg" onmouseover="img_onmouseoverfunc(this)" onclick="zoom(this)" style="cursor:pointer" border="0" alt="" /><img id="aimg_gH2ts" onclick="zoom(this, this.src, 0, 0, 0)" class="zoom" width="600" height="159" src="https://www.dismall.com/data/attachment/forum/202405/30/200147l5o5gy81m3o83byw.jpg" onmouseover="img_onmouseoverfunc(this)" onclick="zoom(this)" style="cursor:pointer" border="0" alt="" /><br /><br /><br /><br /><br />等等很多问题,所以说不要在官方下载,我这边都是修改好的不会出现其他问题<br /><br /><br /><br />将dl.php上传到 public 文件<br /><br /><img title="截图202406101657527083.jpg" id="aimg_30252" aid="30252" src1="static/image/common/none.gif" zoom="https://www.dismall.com/data/attachment/forum/202406/10/165752g679q7sehq055siz.jpg" src="https://www.dismall.com/data/attachment/forum/202406/10/165752g679q7sehq055siz.jpg" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="297" inpost="1" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" /><br /><br /><br />将程序上传到 localpack 文件 (所有文件)<br /><br /><img title="截图202406101657209985.jpg" id="aimg_30251" aid="30251" src1="static/image/common/none.gif" zoom="https://www.dismall.com/data/attachment/forum/202406/10/165720afpammz4pmjpippa.jpg" src="https://www.dismall.com/data/attachment/forum/202406/10/165720afpammz4pmjpippa.jpg" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="297" inpost="1" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" /><br /><br />上传好后,在自己创建的网站上设置 网站目录 <br /><br />1.选择网站目录<br /><br /><img title="截图202406101700081373.jpg" id="aimg_30253" aid="30253" src1="static/image/common/none.gif" zoom="https://www.dismall.com/data/attachment/forum/202406/10/170008dpr99xkpz2diwawk.jpg" src="https://www.dismall.com/data/attachment/forum/202406/10/170008dpr99xkpz2diwawk.jpg" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="600" inpost="1" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" /><br /><br /><br />2.点击运行目录<br /><br />3.运行目录选择 public目录<br /><br /><img title="截图202406101702272270.jpg" id="aimg_30254" aid="30254" src1="static/image/common/none.gif" zoom="https://www.dismall.com/data/attachment/forum/202406/10/170227do2uf19pau0viap4.jpg" src="https://www.dismall.com/data/attachment/forum/202406/10/170227do2uf19pau0viap4.jpg" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="583" inpost="1" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" /><br /><br />4.保存<br /><br />5.关闭 防跨站攻击<br /><br /><img title="截图202406101703458979.jpg" id="aimg_30255" aid="30255" src1="static/image/common/none.gif" zoom="https://www.dismall.com/data/attachment/forum/202406/10/170345d96z0jr22qw3cp83.jpg" src="https://www.dismall.com/data/attachment/forum/202406/10/170345d96z0jr22qw3cp83.jpg" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="600" inpost="1" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" /><br /><br /><br /><br />设置自己创建网站的伪静态 <br /><br /><blockquote><font color="#000000">location / { try_files $uri $uri/ /index.php?$query_string;}</font></blockquote><br /><br />打开本地浏览器,访问 http://<绑定网站的域名名称>/dl.php 。如下图所示:<br /><br /><br /><br /><img title="截图202406101706224246.jpg" id="aimg_30256" aid="30256" src1="static/image/common/none.gif" zoom="https://www.dismall.com/data/attachment/forum/202406/10/170622ngqbdpqzb5ppq152.jpg" src="https://www.dismall.com/data/attachment/forum/202406/10/170622ngqbdpqzb5ppq152.jpg" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="600" inpost="1" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" /><br /><br /><br /><br />一般设置好了 都是绿色的 <br /><br /><br />一步一步的就OK了 其他的也没什么 对于新人来说尝试了就会了 <br /><br /><br /><br />请不要喷我,谢谢 <br />Sans 提示 502 Bad Gateway nginx <br />dl.php 问题<br /> <br />用的是最新的,帖子里面下载的,不是官方的
頁:
[1]