Install Cachet on Centos 7/Virtualmin

  1. Application Prerequisites

You’ll need at least the following installed on your server:

  • PHP 5.5.9, you’ll also need ext-gd , ext-simplexml , mcrypt and ext-xml installed.
  • Composer and ext-mbstring , ext-tokenizer
  • APC or Redis for caching.
  • A database driver for your DB, such as MySQL, PostgreSQL or SQLite.
  • Git
  1. Clone Cachet
$ cd /var/www # Or wherever you chose to install web applications to
$ git clone https://github.com/cachethq/Cachet.git
$ cd Cachet
$ git tag -l

v0.1.0-alpha
v1.0.0
v1.1.0
v2.0.0
v2.1.0

$ git checkout v2.1.0
  1. Create Database

cp .env.example .env

vi .env

APP_ENV=production
APP_DEBUG=false
APP_URL=http://localhost
APP_KEY=SomeRandomString

DB_DRIVER=mysql
DB_HOST=localhost
DB_DATABASE=cachet
DB_USERNAME=homestead
DB_PASSWORD=secret
DB_PORT=null

CACHE_DRIVER=apc
SESSION_DRIVER=apc
QUEUE_DRIVER=sync
CACHET_EMOJI=false

MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ADDRESS=null
MAIL_NAME="Demo Status Page"
MAIL_ENCRYPTION=tls

REDIS_HOST=null
REDIS_DATABASE=null
REDIS_PORT=null

GITHUB_TOKEN=null
  1. Composer install

vi composer.json

Change php to php56 to prevent error [ PHP Parse error: syntax error, unexpected ‘$value’ (T_VARIABLE) in aws/aws-sdk-php/src/functions.php on line 36]

{
    "name": "cachethq/cachet",
    "description": "An open source status page system, for everyone.",
    "keywords": ["laravel", "cachet", "alt-three", "status", "page"],
    "type": "project",
    "license": "BSD-3-Clause",
    "authors": [
        {
            "name": "James Brooks",
            "email": "james@alt-three.com"
        },
        {
            "name": "Graham Campbell",
            "email": "graham@alt-three.com"
        },
        {
            "name": "Joseph Cohen",
            "email": "joe@alt-three.com"
        }
    ],
    "require": {
        "php": ">=5.5.9",
        "ext-xml": "*",
        "laravel/framework": "5.2.39",
        "alt-three/badger": "^3.1",
        "alt-three/bus": "^1.1",
        "alt-three/emoji": "^3.1",
        "alt-three/throttle": "^1.0",
        "alt-three/validator": "^1.5",
        "aws/aws-sdk-php": "^3.7",
        "backup-manager/laravel": "^1.1",
        "barryvdh/laravel-cors": "^0.8",
        "doctrine/dbal": "^2.5",
        "fedeisas/laravel-mail-css-inliner": "^1.5",
        "fideloper/proxy": "^3.1",
        "graham-campbell/binput": "^3.4",
        "graham-campbell/core": "^5.1",
        "graham-campbell/exceptions": "^8.6",
        "graham-campbell/markdown": "^6.1",
        "guzzlehttp/guzzle": "^6.2.1",
        "jenssegers/date": "^3.2",
        "mccool/laravel-auto-presenter": "^4.3",
        "pragmarx/google2fa": "^0.7.1",
        "rcrowe/twigbridge": "^0.9.2",
        "roumen/feed": "^2.10.4"
    },
    "require-dev": {
        "alt-three/testbench": "^1.7",
        "filp/whoops": "^2.1",
        "fzaninotto/faker": "^1.6",
        "graham-campbell/testbench-core": "^1.1",
        "mockery/mockery": "0.9.5",
        "phpunit/phpunit": "4.8.21",
        "symfony/css-selector": "^3.0",
        "symfony/dom-crawler": "^3.0"
    },
    "autoload": {
        "classmap": [
            "database"
        ],
        "files": [
            "app/helpers.php"
        ],
        "psr-4": {
            "CachetHQ\\Cachet\\": "app/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "CachetHQ\\Tests\\Cachet\\": "tests/"
        }
    },
    "scripts": {
        "post-root-package-install": [
            "php56 -r \"copy('.env.example', '.env');\"",
            "php56 artisan key:generate"
        ],
        "post-create-project-cmd": [
            "php56 artisan key:generate"
        ],
        "post-install-cmd": [
            "Illuminate\\Foundation\\ComposerScripts::postInstall",
            "php56 artisan optimize --force",
            "php56 artisan config:cache",
            "php56 artisan route:cache"
        ],
        "post-update-cmd": [
            "Illuminate\\Foundation\\ComposerScripts::postUpdate",
            "php56 artisan optimize --force",
            "php56 artisan config:cache",
            "php56 artisan route:cache"
        ]
    },
    "config": {
        "platform": {
            "php": "5.5.9"
        },
        "preferred-install": "dist"
    },
    "extra": {
        "branch-alias": {
            "dev-master": "2.3-dev"
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true
}

php56 /bin/composer install --no-dev -o

php56 artisan key:generate

php56 artisan app:install

  1. npm install

npm install

npm install --global gulp-cli

gulp

  1. Change web location to

/home/HOST/public_html/Cachet/public

  1. Remove htaccess line below to prevent 302 Not found error
<IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>