admin 发表于 2022-4-23 16:00:00

小白搭建论坛carbon-Forum教程

简介
[*]Carbon—Forum 是一个 PHP 的论坛程序。至于 UI 大家就不要吐槽了,作者的重心在性能优化,自己点开就能发现比其他论坛程序都要快很多~ 美工就需要各位自己修改啦。
官方 Demo 地址:https://www.94cb.com/
[*]演示图
https://ws1.sinaimg.cn/large/720ef3eagy1fh3upg90rjj20rg0elq5r.jpg搭建过程基础环境搭建
[*]如果想要搭建这个论坛,首先需要搭建基于 PHP7.0 的 LNMP 环境(个人比较喜欢 nginx)
推荐使用 oneinstack
程序下载
[*]下载地址:https://github.com/lincanbin/Carbon-Forum
[*]点击右上角的 clone or download,下载 zip 包,解压并 ftp 上传到 /var/www/carbon 里(具体路径看你的自己指定的咯)。
数据库
[*]mysql 里创建一个数据库
mysql -u root -p输入密码后,输入:create database carbon;这样就建了一个名字叫 carbon 的数据库。配置 nginx
[*]在 /etc/nginx/sites-available / 里新建一个文件:
vi carbon然后贴以下 nginx 配置,注意更换域名:server { listen 80; listen [::]:80; root /var/www/carbon;# Add index.php to the list if you are using PHP index index.php index.html index.htm index.nginx-debian.html; server_name test.abc.com;# nginx configurationerror_page 404 /404.php;# rewritelocation / {    try_files $uri $uri/ /index.php?$query_string;}# Git folder vulnerabilitylocation /.git {    deny all;    return 403;}location /controller {    deny all;    return 403;}location /docker_resources {    deny all;    return 403;}location /library {    deny all;    return 403;}location /service {    deny all;    return 403;}location /view {    deny all;    return 403;}# deny access to .htaccess files, if Apache's document root# concurs with nginx's one#location ~ /\.ht {   deny all;   return 403;}# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000# location ~ \.php$ { include snippets/fastcgi-php.conf;### With php7.0-cgi alone: fastcgi_pass 127.0.0.1:9000;## With php7.0-fpm:# fastcgi_pass unix:/run/php/php7.0-fpm.sock; }# deny access to .htaccess files, if Apache's document root# concurs with nginx's one#}然后创建软链使其生效:ln -s /etc/nginx/sites-available/carbon /etc/nginx/sites-enabled/然后 nginx -t 排错一下,然后重启 nginx:service nginx restart安装

[*]输入自己的域名:http://test.abc.com/install
根据提示完成安装就可以了。
页: [1]
查看完整版本: 小白搭建论坛carbon-Forum教程