In this tutorial, we will explain how to install CachetHQ on a CentOS 7.1 VPS with MariaDB, PHP-FPM 5.6 and Nginx. CachetHQ is an open source status page system build on top of Laravel 5. This guide should work on other Linux VPS systems as well but was tested and written for CentOS 7 VPS.
Table of Contents
1. Login to your VPS via SSH
ssh user@myVPS
2. Update the system and install necessary packages
Run the following command to secure your installation:
[user]$ sudo mysql_secure_installation
Next, we need to create a database for our CachetHQ instance.
[user]$ mysql -uroot -p
MariaDB [(none)]> CREATE DATABASE cachet;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON cachet.* TO 'cachetuser'@'localhost' IDENTIFIED BY 'cachetuser_passwd';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q
4. Install PHP and Nginx
Nginx is not available in the default CentOS 7 repository so we will use the official Nginx repository:
Composer is a dependency manager for PHP with which you can install packages. Composer will pull in all the required libraries and dependencies you need for your project.
Do not forget to change your_user with your username.
Finally, restart nginx:
[user]$ sudo systemctl restart nginx.service
That’s it. You have successfully installed CachetHQ on your Centos 7 VPS. If you have not change the default user and password before seeding, you can login with ‘test@test.com’ and ‘test123’.
For more information about CachetHQ ,please refer to the CachetHQ website.
Of course you don’t have to do any of this if you use one of our CentOS VPS Hosting services, in which case you can simply ask our expert Linux admins to setup this for you. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.
4 thoughts on “Install CachetHQ on CentOS 7”
Hello,
For me on OVH VPS cloud hosting, need to run:
sudo firewall-cmd –permanent –zone=public –add-service=http
sudo firewall-cmd –permanent –zone=public –add-service=https
sudo firewall-cmd –reload
to allow HTTP and HTTPS traffic.
I am getting following errors when running composer install cmd:
[vagrant@localhost CachetHQ]$ composer install –no-dev -o
Loading composer repositories with package information
Installing dependencies from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
– Installation request for simplesoftwareio/simple-qrcode 1.3.3 -> satisfiable by simplesoftwareio/simple-qrcode[1.3.3].
– simplesoftwareio/simple-qrcode 1.3.3 requires ext-gd * -> the requested PHP extension gd is missing from your system.
Problem 2
– simplesoftwareio/simple-qrcode 1.3.3 requires ext-gd * -> the requested PHP extension gd is missing from your system.
– pragmarx/google2fa v0.7.1 requires simplesoftwareio/simple-qrcode 1.3.* -> satisfiable by simplesoftwareio/simple-qrcode[1.3.3].
– Installation request for pragmarx/google2fa v0.7.1 -> satisfiable by pragmarx/google2fa[v0.7.1].
To enable extensions, verify that they are enabled in your .ini files:
– /etc/php.ini
– /etc/php.d/apcu.ini
– /etc/php.d/bz2.ini
– /etc/php.d/calendar.ini
– /etc/php.d/ctype.ini
– /etc/php.d/curl.ini
– /etc/php.d/dom.ini
– /etc/php.d/exif.ini
– /etc/php.d/fileinfo.ini
– /etc/php.d/ftp.ini
– /etc/php.d/gettext.ini
– /etc/php.d/gmp.ini
– /etc/php.d/iconv.ini
– /etc/php.d/json.ini
– /etc/php.d/mbstring.ini
– /etc/php.d/mcrypt.ini
– /etc/php.d/mysqlnd.ini
– /etc/php.d/mysqlnd_mysql.ini
– /etc/php.d/mysqlnd_mysqli.ini
– /etc/php.d/opcache.ini
– /etc/php.d/pdo.ini
– /etc/php.d/pdo_mysqlnd.ini
– /etc/php.d/pdo_sqlite.ini
– /etc/php.d/phar.ini
– /etc/php.d/posix.ini
– /etc/php.d/shmop.ini
– /etc/php.d/simplexml.ini
– /etc/php.d/sockets.ini
– /etc/php.d/sqlite3.ini
– /etc/php.d/sysvmsg.ini
– /etc/php.d/sysvsem.ini
– /etc/php.d/sysvshm.ini
– /etc/php.d/tokenizer.ini
– /etc/php.d/xml.ini
– /etc/php.d/xml_wddx.ini
– /etc/php.d/xmlreader.ini
– /etc/php.d/xmlwriter.ini
– /etc/php.d/xsl.ini
– /etc/php.d/zip.ini
You can also run `php –ini` inside terminal to see which files are used by PHP in CLI mode.
After successfully following all the steps I got stuck on the 7th step when running the npm install command, any ideas ? very much appreciate any help!
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {“os”:”darwin”,”arch”:”any”} (current: {“os”:”linux”,”arch”:”x64″})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.1.2 (node_modules/watchpack/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {“os”:”darwin”,”arch”:”any”} (current: {“os”:”linux”,”arch”:”x64″})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.1.2 (node_modules/webpack-dev-server/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {“os”:”darwin”,”arch”:”any”} (current: {“os”:”linux”,”arch”:”x64″})
npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none was installed.
npm ERR! Linux 3.10.0-862.2.3.el7.x86_64
npm ERR! argv “/usr/bin/node” “/usr/bin/npm” “install”
npm ERR! node v6.14.0
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! pngquant-bin@4.0.0 postinstall: `node lib/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pngquant-bin@4.0.0 postinstall script ‘node lib/install.js’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the pngquant-bin package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node lib/install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs pngquant-bin
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls pngquant-bin
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/devops/CachetHQ/npm-debug.log
Hello,
For me on OVH VPS cloud hosting, need to run:
sudo firewall-cmd –permanent –zone=public –add-service=http
sudo firewall-cmd –permanent –zone=public –add-service=https
sudo firewall-cmd –reload
to allow HTTP and HTTPS traffic.
Bye
I am getting following errors when running composer install cmd:
[vagrant@localhost CachetHQ]$ composer install –no-dev -o
Loading composer repositories with package information
Installing dependencies from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
– Installation request for simplesoftwareio/simple-qrcode 1.3.3 -> satisfiable by simplesoftwareio/simple-qrcode[1.3.3].
– simplesoftwareio/simple-qrcode 1.3.3 requires ext-gd * -> the requested PHP extension gd is missing from your system.
Problem 2
– simplesoftwareio/simple-qrcode 1.3.3 requires ext-gd * -> the requested PHP extension gd is missing from your system.
– pragmarx/google2fa v0.7.1 requires simplesoftwareio/simple-qrcode 1.3.* -> satisfiable by simplesoftwareio/simple-qrcode[1.3.3].
– Installation request for pragmarx/google2fa v0.7.1 -> satisfiable by pragmarx/google2fa[v0.7.1].
To enable extensions, verify that they are enabled in your .ini files:
– /etc/php.ini
– /etc/php.d/apcu.ini
– /etc/php.d/bz2.ini
– /etc/php.d/calendar.ini
– /etc/php.d/ctype.ini
– /etc/php.d/curl.ini
– /etc/php.d/dom.ini
– /etc/php.d/exif.ini
– /etc/php.d/fileinfo.ini
– /etc/php.d/ftp.ini
– /etc/php.d/gettext.ini
– /etc/php.d/gmp.ini
– /etc/php.d/iconv.ini
– /etc/php.d/json.ini
– /etc/php.d/mbstring.ini
– /etc/php.d/mcrypt.ini
– /etc/php.d/mysqlnd.ini
– /etc/php.d/mysqlnd_mysql.ini
– /etc/php.d/mysqlnd_mysqli.ini
– /etc/php.d/opcache.ini
– /etc/php.d/pdo.ini
– /etc/php.d/pdo_mysqlnd.ini
– /etc/php.d/pdo_sqlite.ini
– /etc/php.d/phar.ini
– /etc/php.d/posix.ini
– /etc/php.d/shmop.ini
– /etc/php.d/simplexml.ini
– /etc/php.d/sockets.ini
– /etc/php.d/sqlite3.ini
– /etc/php.d/sysvmsg.ini
– /etc/php.d/sysvsem.ini
– /etc/php.d/sysvshm.ini
– /etc/php.d/tokenizer.ini
– /etc/php.d/xml.ini
– /etc/php.d/xml_wddx.ini
– /etc/php.d/xmlreader.ini
– /etc/php.d/xmlwriter.ini
– /etc/php.d/xsl.ini
– /etc/php.d/zip.ini
You can also run `php –ini` inside terminal to see which files are used by PHP in CLI mode.
It seems that you are missing the GD extension, run:
sudo yum install php56w-gd
After successfully following all the steps I got stuck on the 7th step when running the npm install command, any ideas ? very much appreciate any help!
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {“os”:”darwin”,”arch”:”any”} (current: {“os”:”linux”,”arch”:”x64″})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.1.2 (node_modules/watchpack/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {“os”:”darwin”,”arch”:”any”} (current: {“os”:”linux”,”arch”:”x64″})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.1.2 (node_modules/webpack-dev-server/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {“os”:”darwin”,”arch”:”any”} (current: {“os”:”linux”,”arch”:”x64″})
npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none was installed.
npm ERR! Linux 3.10.0-862.2.3.el7.x86_64
npm ERR! argv “/usr/bin/node” “/usr/bin/npm” “install”
npm ERR! node v6.14.0
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! pngquant-bin@4.0.0 postinstall: `node lib/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pngquant-bin@4.0.0 postinstall script ‘node lib/install.js’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the pngquant-bin package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node lib/install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs pngquant-bin
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls pngquant-bin
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/devops/CachetHQ/npm-debug.log