Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Install Development Copy

Ian edited this page Jan 7, 2018 · 16 revisions

Setting up a development environment for MyBB2

Contents

There are 2 main ways of installing MyBB 2.0, one being with Homestead and the latter running without it. This guide is split into several parts, covering Homestead, configuring your application, installing MyBB.

  1. Homestead Setup

    1. Downloading Updates
    2. Installing essential packages
    3. Cleaning up
  2. Setting up MyBB

    1. Getting MyBB
    2. Configuring your application

Homestead Setup

  1. Getting Homestead
  2. Downloading Updates
  3. Installing essential packages
  4. Cleaning up

Getting Homestead

Homestead is an official Laravel development environment, a fully packaged Vagrant machine, to read more about Homestead and how to acquire it, please visit the official documentation

Downloading Updates

First we want to download the latest updates for our Homestead.

sudo apt-get update
sudo apt-get upgrade

Installing Essential Packages

Next we want to install our essential packages

sudo apt-get install build-essential

Git should be included with your Homestead installation, however if for some reason it is not, please make sure it is installed with the following:

sudo apt-get install git

Clean up

This command will clean up dependencies for packages that are no longer used.

sudo apt-get autoremove

MyBB Setup

Now that you have your development environment ready we can now proceed to configuring and installing MyBB.

  1. Getting MyBB
  2. Configuring your application

Getting MyBB

You can use Laravels own web server by using the command php artisan serve

First up we need to clone the repository, if you are using Homestead you will be wanting to clone it under /home/vagrant/Code, if you are on WAMP or XAMPP cd into your appropriate directory.

Let's clone it

git clone https://github.com/mybb/mybb2.git
mv mybb2* .

Configuration

  1. Folder Permissions
  2. Composer
  3. Environment Variables
  4. Asset Publishing
  5. Migrations
Folder Permissions

Give write permissions to the /storage/ directory.

chmod -R 777 storage/
Composer

Install Composer dependencies.

composer install
Environment Variables

In the default Homestead environment you can leave the .env untouched and everything will work right out of the box.

After you have run the above command for composer, there should be a .env file in your root directory, for those new to environment variables, this file contains variables specific to an environment, this file is never to be committed to Git under any circumstance, this is where you put in your passwords for your database, your API credentials etc, core configuration.

If you do not have an .env file, you may have an .env.example file. This can just be copied using the following command

cp .env.example .env

If there is no .env file then you may use the below template, simply copy and paste it into a file called .env.

APP_ENV=local
APP_DEBUG=true
APP_KEY=

DB_HOST=localhost
DB_DATABASE=
DB_USERNAME=
DB_PASSWORD=

CACHE_DRIVER=file
SESSION_DRIVER=file
Asset Publishing

Note that these are not front end assets, these are package assets from dependencies installed via composer

Publish assets by packages

php artisan vendor:publish
Migrations

Install migrations table and run migrations.

php artisan migrate:install
php artisan migrate

Add Debug Data (aka Seeds)

php artisan db:seed