What is Cachet?
Cachet is a beautiful and powerful open source status page system. -https://github.com/CachetHQ/Cachet
Installation
- Log into the Linux device
- Run the following commands in a terminal window:
# update software respositories
sudo apt update
# install available software updates
sudo apt upgrade -y
# install prerequisites
sudo apt install git openssl curl wget zip composer -y
# install Apache HTTPD and MySQL
sudo apt install apache2 mariadb-server mariadb-client -y
# install PHP components
sudo apt install php7.3 libapache2-mod-php7.3 php7.3-curl php7.3-tokenizer php7.3-ldap php7.3-cli php7.3-json php7.3-gd php7.3-mbstring php7.3-mysql php7.3-xml php7.3-zip php7.3-bcmath php7.3-fpm -y
# configure the MySQL database
sudo su
mysql_secure_installation - Press Enter to login as root
- Type Y and press Enter to set a root password, type the password twice to confirm
- Type Y and press Enter to remove anonymous users
- Type Y and press Enter to disallow root login remotely
- Type Y and press Enter to remove the test database
- Type Y and press Enter to reload privilege tables
- Run the following command to login into MySQL:
mysql -u root -p
- Authenticate with the root password set earlier
- Run the following commands to create the Cachet database and database user
CREATE DATABASE cachet;
GRANT ALL ON cachet.* to 'cachet_rw'@'localhost' IDENTIFIED BY 'C@ch3t!!';
FLUSH PRIVILEGES;
EXIT;
exit - Continue with the following commands:
# clone cachet from github
sudo git clone https://github.com/cachethq/Cachet.git /var/www/cachet
# change directories to cachet
cd /var/www/cachet
# create a copy of the sample .env file
sudo cp /var/www/cachet/.env.example /var/www/cachet/.env
# edit the .env file
sudo nano /var/www/cachet/.env - Edit the following environment variables as needed
APP_ENV=production
APP_DEBUG=false
APP_URL=http://localhost/cachet
APP_TIMEZONE=America/New_York
APP_KEY=
DEBUGBAR_ENABLED=falseDB_DRIVER=mysql
DB_HOST=localhost
DB_UNIX_SOCKET=false
DB_DATABASE=cachet
DB_USERNAME=cache_rw
DB_PASSWORD=C@ch3t!!
DB_PORT=null
DB_PREFIX=nullCACHE_DRIVER=database
SESSION_DRIVER=database
QUEUE_DRIVER=database
CACHET_EMOJI=falseMAIL_DRIVER=smtp
MAIL_HOST=smtp.i12bretro.local
MAIL_PORT=25
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ADDRESS=null
MAIL_NAME="Cachet"
MAIL_ENCRYPTION=nullREDIS_HOST=null
REDIS_DATABASE=null
REDIS_PORT=nullGITHUB_TOKEN=null
- Press CTRL+O, Enter, CTRL+X to write the changes to .env
- Continue with the following commands:
# set the owner of the cachet directory
sudo chown -R www-data:www-data /var/www/cachet
# setup composer working directory
sudo mkdir /var/www/.composer
sudo chown -R www-data:www-data /var/www/.composer
# install dependencies with composer
sudo -u www-data composer install --no-dev -o
# generate app key, type yes to confirm generating a new key
sudo php artisan key:generate
# run cachet install, answer No and then Yes
sudo php artisan cachet:install
# create cachet apache configuration
sudo nano /etc/apache2/sites-available/cachet.conf - Paste the following configuration into cachet.conf
Alias /cachet "/var/www/cachet/public"
<Directory /var/www/cachet/public>
Require all granted
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory> - Press CTRL+O, Enter, CTRL+X to write the changes to cachet.conf
- Run the following command to enable the cachet site
# enable rewrite module
sudo a2enmod rewrite
# enable the cachet site
sudo a2ensite cachet
# restart the apache2 service
sudo systemctl restart apache2
Cachet Web Installer
- Open a web browser and navigate to http://DNSorIP/cachet/setup
- The Cachet setup screen should be displayed
- Set the Cache, Queue and Session drivers to Database
- Optionally setup the SMTP host and email address > Click Next
- Enter a site name, set the timezone and language > Click Next
- Create an administrator account by entering a username, email address and password > Click Complete Setup
- Click the Go to dashboard button
- Login with the administator account created earlier
- Welcome to Cachet
- To view the status page navigate to http://DNSorIP:8000