网上的安装教程都过时了,谁来出个最新的宝塔的安装教程? 这是官方的文档:https://docs.flarum.org/install/
下这个包:https://xygypanus0.287636.xyz/f/flarum-master-250723.zip 然后登录你的宝塔面板,点网站,点添加站点,php版本选7.0及以上就行,创建一个数据库,推荐先把数据库信息记下来,不然过会还要手动翻数据库分类找,其它看自己实际情况填 创建以后点文件,找到你前面设置时显示的站点目录,把前面下的包传上去,然后解压 再点网站,找到你前面创建的那个网站,点右边的设置,然后点网站目录,找到运行目录这项,下拉框选择/public,然后点右边的保存,之后点伪静态,填下面的内容
# Pass requests that don't refer directly to files in the filesystem to index.php location / { try_files $uri $uri/ /index.php?$query_string; } # Uncomment the following lines if you are not using a `public` directory # to prevent sensitive resources from being exposed. # location ~* ^/(\.git|composer\.(json|lock)|auth\.json|config\.php|flarum|storage|vendor) { # deny all; # return 404; # } # The following directives are based on best practices from H5BP Nginx Server Configs # https://github.com/h5bp/server-configs-nginx # Expire rules for static content location ~* \.(?:manifest|appcache|html?|xml|json)$ { add_header Cache-Control "max-age=0"; } location ~* \.(?:rss|atom)$ { add_header Cache-Control "max-age=3600"; } location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|mp4|ogg|ogv|webm|htc)$ { add_header Cache-Control "max-age=2592000"; access_log off; } location ~* \.(?:css|js)$ { add_header Cache-Control "max-age=31536000"; access_log off; } location ~* \.(?:ttf|ttc|otf|eot|woff|woff2)$ { add_header Cache-Control "max-age=2592000"; access_log off; } # Gzip compression gzip on; gzip_comp_level 5; gzip_min_length 256; gzip_proxied any; gzip_vary on; gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
填完以后点保存,然后访问你的网站,过一下安装流程,填你的站点信息,数据库信息,管理员账号,之后就能进首页了,默认是英语,也能用,但推荐执行一下如下步骤,点右上角的 Log In ,填你在安装流程里设置的管理员账号和密码,最好把Remember Me打勾,之后点Log In,登录进去以后点右上角你的名字,点Administration,然后翻到底下,点简体中文语言包,把Disabled左边的开关打开,打开以后Disabled会变成Enabled,然后翻到上面,点Basics,找到Default Language,下拉框选 简体中文 (zh-Hans) ,点下面的Save Changes,之后返回主页就变成中文了,具体自己想要再设置什么就自己看着来就行
为啥我不用public目录,直接把安装包解压到根目录也能安装成功?
没什么区别啊
官方最新的可以直接下载安装包安装了,就像安装wordpress那样,但是网上目前能搜到的教程都写的很复杂
新版本已经能这样了,那些文章都是几年前的了
是不是把安装包下载好,丢到根目录下就可以了,不用安装什么composer? 全网搜了,没找到这样的一个教程,因为我是在搞不懂那个composer是干嘛的
下载后直接解压就能安装,但是目前网上搜的教程没一个提到这个方法的
但我还是觉得compose 安装很方便,宝塔也支持compose吧
我写了一个教程:https://www.blog.do/forum-post/109.html 但是第一步欢迎配置我没搞懂怎么弄
我去,还没搞明白你就搞教程啦
额 要用composer 装的
14 条回复
排序