DevOps mybb 论坛

wailer · October 25, 2019 · 20 hits

下面是笔记备用

顺便搜了下 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 admin@your_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

No Reply at the moment.
You need to Sign in before reply, if you don't have an account, please Sign up first.