Mainos / Advertisement:

Cachet

Kohteesta Taisto
Versio hetkellä 27. elokuuta 2015 kello 06.44 – tehnyt Frans (keskustelu | muokkaukset) (Ak: Uusi sivu: === E-mail orders ===)
Siirry navigaatioon Siirry hakuun
Muut kielet:
English • ‎suomi

Cachet is a free and open source status page. It is a powerful and easy to manage service like Statuspage.io and Status.io

Documentation: https://docs.cachethq.io/docs/welcome

Demo: https://status.cachethq.io/

Installation

  • Requires PHP5.5 or higher and the Composer package.
  • Install Apache2 or Nginx.
 aptitude install apache2 mysql-server

Because Cachet needs PHP5.5 and Debian Wheezy only comes with 5.4 by default, we add the following to the source.list file:

 nano /etc/apt/source.list
deb http://packages.dotdeb.org wheezy all
deb http://packages.dotdeb.org wheezy-php56 all

We load keys and update source.list and install the required packets.

wget http://www.dotdeb.org/dotdeb.gpg
apt-key add dotdeb.gpg
apt-get update
apt-get install php5 php-pear php5-mysql php5-mcrypt php5-apcu php5-cli php-db php5-intl php5-readline openssl

Enable the rewrite module for Apache.

 a2enmod rewrite

Restart the apache service:

 service apache2 restart

Install Composer

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

Download the git (install git if you haven't) installation packet for the web directory:

apt-get install git-core
apt-get install vim
cd /var/www
git clone https://github.com/cachethq/Cachet.git
cd Cachet

Updating

Make a backup of the Cachet database and installation files (especially the .env file, which is the configuration file).

Remove old files and replace them with the new ones.

Run cachet in a directory:

 composer install --no-dev -o
  php artisan migrate
 chown www-data -R /cachet-dir

Configuration

Open .env.example and save it as a .env file. After this open the .env file and modify it.

APP_ENV=production
APP_DEBUG=false
APP_URL=http://cachet.io.dev
APP_KEY=LWvqPaQWVeaBKc8yEYz6Z1xYe92lIFMQ

DB_DRIVER=mysql
DB_HOST=127.0.0.1
DB_DATABASE=cachet
DB_USERNAME=root
DB_PASSWORD=root

CACHE_DRIVER=apc
SESSION_DRIVER=apc
QUEUE_DRIVER=database

MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ADDRESS=null
MAIL_NAME=null

Create a database for your server along with a user which Cachet can use.

Go to the Cachet directory and run the installation command

 composer install --no-dev -o

After this run the database migration command

  php artisan migrate

and generate a security key

 php artisan key:generate

Configure for instance Apache2:

  <VirtualHost *:80>
    ServerName cachet.dev # Or whatever you want to use
    ServerAlias cachet.dev # Make this the same as ServerName
    DocumentRoot "/var/www/Cachet/public"
    <Directory "/var/www/Cachet/public">
        Require all granted # Used by Apache 2.4
        Options Indexes FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

E-mail orders

Sähköpostitilaukset voit ottaa käyttöön lisäämällä .env tiedostoon MAIL_ADDRESS ja MAIL_NAME. Esimerkiksi:

[email protected]
MAIL_NAME=Cachet HQ

Tämän jälkeen hallintapaneelista ota käyttöön Allow people to signup to email notifications? joka on Application Setup asetuksissa.

Tämän jälkeen sinun tulee tyhjentää välimuisti:

 php artisan config:cache

Määritä croniin ajastus miten s.postit lähetetään, esimerkiksi 5min välein:

 */5 * * * * php /path/to/artisan schedule:run 1>> /dev/null 2>&1
Mainos / Advertisement: