0561.html 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Running Cachet Open Source Status Page System on Linux</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <meta name="keywords" content="Browser Based,Home Lab,Home Lab Ideas,Install Guide,Self-Hosted,Web Based,Web Based Tools,Cachet,Cachet Status Page,Free Software,Linux,Self-hosted,Status Page,Ubuntu,Debian,PHP,MariaDB,MySQL,PHP Based Application,PHP Based,Homelab,How To,Tutorial,i12bretro">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Running Cachet Open Source Status Page System on Linux">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <meta name="revised" content="05/04/2024 06:09:09 PM" />
  12. <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
  13. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  14. <script type="text/javascript" src="includes/js/steps.js"></script>
  15. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="gridContainer">
  19. <div class="topMargin"></div>
  20. <div id="listName" class="topMargin">
  21. <h1>Running Cachet Open Source Status Page System on Linux</h1>
  22. </div>
  23. <div></div>
  24. <div id="content">
  25. <h2>What is Cachet?</h2>
  26. <blockquote>Cachet is a beautiful and powerful open source status page system.<em> -<a href="https://github.com/CachetHQ/Cachet" target="_blank">https://github.com/CachetHQ/Cachet</a></em></blockquote>
  27. <h2>Installation</h2>
  28. <ol>
  29. <li>Log into the Linux device</li>
  30. <li>Run the following commands in a terminal window:
  31. <div class="codeBlock"># update software respositories<br />
  32. sudo apt update<br />
  33. # install available software updates<br />
  34. sudo apt upgrade -y<br />
  35. # install prerequisites<br />
  36. sudo apt install git openssl curl wget zip composer -y<br />
  37. # install Apache HTTPD and MySQL<br />
  38. sudo apt install apache2 mariadb-server mariadb-client -y<br />
  39. # install PHP components<br />
  40. 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<br />
  41. # configure the MySQL database<br />
  42. sudo su<br />
  43. mysql_secure_installation</div>
  44. </li>
  45. <li>Press Enter to login as root</li>
  46. <li>Type Y and press Enter to set a root password, type the password twice to confirm</li>
  47. <li>Type Y and press Enter to remove anonymous users</li>
  48. <li>Type Y and press Enter to disallow root login remotely</li>
  49. <li>Type Y and press Enter to remove the test database</li>
  50. <li>Type Y and press Enter to reload privilege tables</li>
  51. <li>Run the following command to login into MySQL:
  52. <div class="codeBlock">mysql -u root -p</div>
  53. </li>
  54. <li>Authenticate with the root password set earlier</li>
  55. <li>Run the following commands to create the Cachet database and database user
  56. <div class="codeBlock">CREATE DATABASE cachet;<br />
  57. GRANT ALL ON cachet.* to &#39;cachet_rw&#39;@&#39;localhost&#39; IDENTIFIED BY &#39;C@ch3t!!&#39;;<br />
  58. FLUSH PRIVILEGES;<br />
  59. EXIT;<br />
  60. exit</div>
  61. </li>
  62. <li>Continue with the following commands:
  63. <div class="codeBlock"># clone cachet from github<br />
  64. sudo git clone https://github.com/cachethq/Cachet.git /var/www/cachet<br />
  65. # change directories to cachet<br />
  66. cd /var/www/cachet<br />
  67. # create a copy of the sample .env file<br />
  68. sudo cp /var/www/cachet/.env.example /var/www/cachet/.env<br />
  69. # edit the .env file<br />
  70. sudo nano /var/www/cachet/.env</div>
  71. </li>
  72. <li>Edit the following environment variables as needed
  73. <p>APP_ENV=production<br />
  74. APP_DEBUG=false<br />
  75. APP_URL=http://localhost/cachet<br />
  76. APP_TIMEZONE=America/New_York<br />
  77. APP_KEY=<br />
  78. DEBUGBAR_ENABLED=false</p>
  79. <p>DB_DRIVER=mysql<br />
  80. DB_HOST=localhost<br />
  81. DB_UNIX_SOCKET=false<br />
  82. DB_DATABASE=cachet<br />
  83. DB_USERNAME=cache_rw<br />
  84. DB_PASSWORD=C@ch3t!!<br />
  85. DB_PORT=null<br />
  86. DB_PREFIX=null</p>
  87. <p>CACHE_DRIVER=database<br />
  88. SESSION_DRIVER=database<br />
  89. QUEUE_DRIVER=database<br />
  90. CACHET_EMOJI=false</p>
  91. <p>MAIL_DRIVER=smtp<br />
  92. MAIL_HOST=smtp.i12bretro.local<br />
  93. MAIL_PORT=25<br />
  94. MAIL_USERNAME=null<br />
  95. MAIL_PASSWORD=null<br />
  96. MAIL_ADDRESS=null<br />
  97. MAIL_NAME=&quot;Cachet&quot;<br />
  98. MAIL_ENCRYPTION=null</p>
  99. <p>REDIS_HOST=null<br />
  100. REDIS_DATABASE=null<br />
  101. REDIS_PORT=null</p>
  102. <p>GITHUB_TOKEN=null</p>
  103. </li>
  104. <li>Press CTRL+O, Enter, CTRL+X to write the changes to .env</li>
  105. <li>Continue with the following commands:
  106. <div class="codeBlock"># set the owner of the cachet directory<br />
  107. sudo chown -R www-data:www-data /var/www/cachet<br />
  108. # setup composer working directory<br />
  109. sudo mkdir /var/www/.composer<br />
  110. sudo chown -R www-data:www-data /var/www/.composer<br />
  111. # install dependencies with composer<br />
  112. sudo -u www-data composer install --no-dev -o<br />
  113. # generate app key, type yes to confirm generating a new key<br />
  114. sudo php artisan key:generate<br />
  115. # run cachet install, answer No and then Yes<br />
  116. sudo php artisan cachet:install<br />
  117. # create cachet apache configuration<br />
  118. sudo nano /etc/apache2/sites-available/cachet.conf</div>
  119. </li>
  120. <li>Paste the following configuration into cachet.conf
  121. <p>Alias /cachet &quot;/var/www/cachet/public&quot;<br />
  122. &lt;Directory /var/www/cachet/public&gt;<br />
  123. Require all granted<br />
  124. Options Indexes FollowSymLinks<br />
  125. AllowOverride All<br />
  126. Order allow,deny<br />
  127. Allow from all<br />
  128. &lt;/Directory&gt;</p>
  129. </li>
  130. <li>Press CTRL+O, Enter, CTRL+X to write the changes to cachet.conf</li>
  131. <li>Run the following command to enable the cachet site
  132. <div class="codeBlock"># enable rewrite module<br />
  133. sudo a2enmod rewrite<br />
  134. # enable the cachet site<br />
  135. sudo a2ensite cachet<br />
  136. # restart the apache2 service<br />
  137. sudo systemctl restart apache2</div>
  138. </li>
  139. </ol>
  140. <h2>Cachet Web Installer</h2>
  141. <ol>
  142. <li>Open a web browser and navigate to http://DNSorIP/cachet/setup</li>
  143. <li>The Cachet setup screen should be displayed</li>
  144. <li>Set the Cache, Queue and Session drivers to Database</li>
  145. <li>Optionally setup the SMTP host and email address &gt; Click Next</li>
  146. <li>Enter a site name, set the timezone and language &gt; Click Next</li>
  147. <li>Create an administrator account by entering a username, email address and password &gt; Click Complete Setup</li>
  148. <li>Click the Go to dashboard button</li>
  149. <li>Login with the administator account created earlier</li>
  150. <li>Welcome to Cachet</li>
  151. <li>To view the status page navigate to http://DNSorIP:8000</li>
  152. </ol> </div>
  153. </div>
  154. </body>
  155. </html>