mybb 论坛

下面是笔记备用

顺便搜了下vps的安装教程,记下来
MyBB源代码:https://github.com/mybb/mybb

安装MySQL

sudo apt-get install mysql-server

为MyBB创建数据库和用户:
SQL语句创建了一个mybbdb数据库和mybb用户(密码test1234)

mysql -u root -p
mysql> CREATE DATABASE mybbdb;
mysql> CREATE USER 'mybb'@'localhost' IDENTIFIED BY 'test1234';
mysql> GRANT ALL PRIVILEGES ON mybbdb.* TO 'mybb'@'localhost' IDENTIFIED BY 'test1234';
mysql> FLUSH PRIVILEGES;
mysql> exit

安装 php

sudo apt-get install php php-mysql php-mcrypt php-xml

下载mybb,到官网地址https://mybb.com/download/找出最新版本压缩包,下面是1.8.12版本

cd /var/www/html/
sudo wget https://resources.mybb.com/downloads/mybb_1812.zip
sudo unzip mybb_1812.zip
sudo mv Upload mybb
sudo chown www-data: -R /var/www/html/mybb/

创建配置文件:

cd mybb/
sudo cp inc/config.default.php inc/config.php

更改文件权限:

sudo chmod 666 inc/config.php inc/settings.php
sudo chmod 777 cache/ cache/themes/ uploads/ uploads/avatars/
sudo chmod 666 inc/languages/english/*.php inc/languages/english/admin/*.php
sudo chmod 777 cache/ cache/themes/ uploads/ uploads/avatars/ admin/backups/

安装配置Apache

sudo apt-get install apache2 libapache2-mod-php

创建虚拟主机配置文件:
sudo vim /etc/apache2/sites-available/mybb.conf

<VirtualHost *:80>
ServerAdmin [email protected]_domain.com
DocumentRoot /var/www/html/mybb/

ServerName your_domain.com
ServerAlias www.your_domain.com

<Directory /var/www/html/mybb/>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/your_domain.com-error_log
CustomLog /var/log/apache2/your_domain.com-access_log common
</VirtualHost>

使配置生效:

sudo a2ensite mybb.conf
sudo service apache2 restart

设置站点信息和管理员用户。

下载中文语言包解压后复制到vps上相应目录http://pan.baidu.com/s/1qWM7vha

参考1 参考2


Windows下的Apache+Mysql/MariaDB+Perl/PHP/Python http://www.wampserver.com/en/
Debian GNU/Linux 安装php说明http://php.net/manual/zh/install.unix.debian.php
PHP Caddy是一款适用于Windows 的小型 PHP开发环境 https://www.phpcaddy.co/
Setup Caddy with PHP on Ubuntu