In this tutorial, you will learn how to install Cachet on Debian 8. Cachet is a powerful open source status page system.
Installation
This tutorial is going to assume you have already installed MySQL on the VPS.
Update your system:
apt-get update -yInstall these libraries:
apt-get install php5 php5-mysql libapache2-mod-php5 php5-fpm php5-cli php5-curl php5-gd git sudo apache2 -yThen navigate to /var/www:
cd /var/www/Clone the git repository for Cachet:
git clone https://github.com/cachethq/Cachet.gitNow navigate to the directory /var/www/Cachet:
cd CachetRun the following command, which will result in a list of versions:
git tag -l
v2.3.4
v2.3.5
v2.3.6
v2.3.7
v2.3.8
v2.3.9Choose the latest version, in our case its v2.3.9:
git checkout v2.3.9Setup
Login to MySQL:
mysql -u root -pOnce you have entered the password, Create a database called cachet:
CREATE DATABASE cachet;Create a new user for this database, replace `RANDOM_PASSWORD' with a password of your choice:
CREATE USER 'cachet'@'localhost' IDENTIFIED BY 'RANDOM_PASSWORD';
GRANT ALL PRIVILEGES ON cachet.* TO 'cachet'@'localhost';
FLUSH PRIVILEGES;Rename env.example to .env:
mv .env.example .envEdit .env with your MySQL details.
Then install composer:
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composerGenerate a key:
php artisan key:generateIf you run into the error:
PHP Warning: require(/root/Cachet/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /root/Cachet/bootstrap/autoload.php on line 28
PHP Fatal error: require(): Failed opening required '/root/Cachet/bootstrap/../vendor/autoload.php' (include_path='.:/usr/share/php:/usr/share/pear') in /root/Cachet/bootstrap/autoload.php on line 28... then run the following command:
composer update --no-scriptsIf you encounter this error:
[ErrorException]
proc_open(): fork failed - Cannot allocate memory
... then run the following commands:
/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
/sbin/mkswap /var/swap.1
/sbin/swapon /var/swap.1Regenerate a key:
php artisan key:generateInstall Cachet:
php artisan app:install Enable mod_rewrite:
a2enmod rewrite
a2enmod rewrite
service apache2 restartNavigate to /etc/apache2/sites-enabled/:
cd /etc/apache2/sites-enabled/Create a new file to access Cachet:
mv cachet.confInside of the created file copy and paste the following:
<VirtualHost *:80>
# Domain from where Cachet will be accessed
ServerName example.com
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>Replace example.com with your own domain name which you have linked with your Rcs VPS or with your Rcs Instance's IP Address.
Hit Ctrl+X and then press Enter.
Fix file permissions:
chmod -R 777 storage
rm -rf bootstrap/cache/*
chmod -R 777 bootstrap/Conclusion
You have successfully installed Cachet on your Rcs VPS.