Skip to content

Commit 5dd9e0a

Browse files
committed
jekyll build of commit c278a17
1 parent f4406b5 commit 5dd9e0a

51 files changed

Lines changed: 9021 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.nojekyll

Whitespace-only changes.

2017/06/27/install-icingaweb2.html

Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
<!DOCTYPE html>
2+
<html lang="en"><head>
3+
<meta charset="utf-8">
4+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
5+
<meta name="viewport" content="width=device-width, initial-scale=1"><!-- Begin Jekyll SEO tag v2.8.0 -->
6+
<title>Installing Icinga Web 2 on Debian Stretch | Blog?</title>
7+
<meta name="generator" content="Jekyll v4.4.1" />
8+
<meta property="og:title" content="Installing Icinga Web 2 on Debian Stretch" />
9+
<meta property="og:locale" content="en_US" />
10+
<meta name="description" content="Icinga Web 2 is neat, and it’s in Debian Stretch. It’s not trivial to install like the original Icinga CGI (“Icinga Classic UI”) was. It’s not that hard, but I had to make some notes." />
11+
<meta property="og:description" content="Icinga Web 2 is neat, and it’s in Debian Stretch. It’s not trivial to install like the original Icinga CGI (“Icinga Classic UI”) was. It’s not that hard, but I had to make some notes." />
12+
<link rel="canonical" href="/2017/06/27/install-icingaweb2.html" />
13+
<meta property="og:url" content="/2017/06/27/install-icingaweb2.html" />
14+
<meta property="og:site_name" content="Blog?" />
15+
<meta property="og:type" content="article" />
16+
<meta property="article:published_time" content="2017-06-27T20:25:00+01:00" />
17+
<meta name="twitter:card" content="summary" />
18+
<meta property="twitter:title" content="Installing Icinga Web 2 on Debian Stretch" />
19+
<script type="application/ld+json">
20+
{"@context":"https://schema.org","@type":"BlogPosting","dateModified":"2017-06-27T20:25:00+01:00","datePublished":"2017-06-27T20:25:00+01:00","description":"Icinga Web 2 is neat, and it’s in Debian Stretch. It’s not trivial to install like the original Icinga CGI (“Icinga Classic UI”) was. It’s not that hard, but I had to make some notes.","headline":"Installing Icinga Web 2 on Debian Stretch","mainEntityOfPage":{"@type":"WebPage","@id":"/2017/06/27/install-icingaweb2.html"},"url":"/2017/06/27/install-icingaweb2.html"}</script>
21+
<!-- End Jekyll SEO tag -->
22+
<link rel="stylesheet" href="/assets/main.css"><link type="application/atom+xml" rel="alternate" href="/feed.xml" title="Blog?" /></head>
23+
<body><header class="site-header" role="banner">
24+
25+
<div class="wrapper"><a class="site-title" rel="author" href="/">Blog?</a><nav class="site-nav">
26+
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
27+
<label for="nav-trigger">
28+
<span class="menu-icon">
29+
<svg viewBox="0 0 18 15" width="18px" height="15px">
30+
<path d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.032C17.335,0,18,0.665,18,1.484L18,1.484z M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.032C17.335,6.031,18,6.696,18,7.516L18,7.516z M18,13.516C18,14.335,17.335,15,16.516,15H1.484 C0.665,15,0,14.335,0,13.516l0,0c0-0.82,0.665-1.483,1.484-1.483h15.032C17.335,12.031,18,12.695,18,13.516L18,13.516z"/>
31+
</svg>
32+
</span>
33+
</label>
34+
35+
<div class="trigger"><a class="page-link" href="/about/">About</a></div>
36+
</nav></div>
37+
</header>
38+
<main class="page-content" aria-label="Content">
39+
<div class="wrapper">
40+
<article class="post h-entry" itemscope itemtype="http://schema.org/BlogPosting">
41+
42+
<header class="post-header">
43+
<h1 class="post-title p-name" itemprop="name headline">Installing Icinga Web 2 on Debian Stretch</h1>
44+
<p class="post-meta">
45+
<time class="dt-published" datetime="2017-06-27T20:25:00+01:00" itemprop="datePublished">Jun 27, 2017
46+
</time></p>
47+
</header>
48+
49+
<div class="post-content e-content" itemprop="articleBody">
50+
<p>Icinga Web 2 is neat, and it’s in Debian Stretch. It’s not trivial to install like the original Icinga CGI (“Icinga Classic UI”) was. It’s not that hard, but I had to make some notes.</p>
51+
52+
<h1 id="install-icinga-2">Install Icinga 2</h1>
53+
54+
<p>Icinga comes ready to run, with an example configuration that monitors services on localhost.</p>
55+
56+
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>apt-get install icinga2
57+
</code></pre></div></div>
58+
59+
<p>If you want to trigger re-checks etc., you will need to enable the <code class="language-plaintext highlighter-rouge">command</code> plugin:</p>
60+
61+
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>icinga2 feature enable command
62+
</code></pre></div></div>
63+
64+
<p>The “checker”, “mainlog”, and “notification” plugins should already be enabled. However, at one point in my testing they were not. So you might want to check that.</p>
65+
66+
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ls -l /etc/icinga2/features-enabled
67+
</code></pre></div></div>
68+
69+
<h1 id="install-the-web-server">Install the web server</h1>
70+
71+
<p>You will now be running a web server on your network (and you’re about to install a PHP webapp). Better keep up with those security updates!</p>
72+
73+
<p>Also, sending passwords (or commands) unprotected is a security problem. Debian has scripts to help you set up self-signed SSL. I haven’t shown them here, but they can be surprisingly straightforward to use.</p>
74+
75+
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>apt-get install apache2
76+
</code></pre></div></div>
77+
78+
<h1 id="install-the-database-server">Install the database server</h1>
79+
80+
<p>The MariaDB package in Debian Stretch does not ask you to make up a password. Instead, the Debian root user (or users of sudo) are simply granted access to mysql root. Not <em>quite</em> as elegant as postgres, but it’s a massive improvement.</p>
81+
82+
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>apt-get install mariadb-server
83+
</code></pre></div></div>
84+
85+
<h1 id="install-icingas-ido-for-mariadb--mysql">Install Icinga’s IDO for mariadb / mysql.</h1>
86+
87+
<p>The install will prompt to enable IDO, and create a DB. Say yes.
88+
This might take a minute or so if you’re not using an SSD.</p>
89+
90+
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>apt-get install icinga2-ido-mysql
91+
</code></pre></div></div>
92+
93+
<p>The install does not actually enable IDO in icinga2, despite what it says.
94+
<a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=865350">Bug report</a>.</p>
95+
96+
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>icinga2 feature enable ido-mysql
97+
systemctl restart icinga2
98+
</code></pre></div></div>
99+
100+
<h1 id="install-icinga-web-2">Install Icinga Web 2</h1>
101+
102+
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>apt-get install icingaweb2
103+
</code></pre></div></div>
104+
105+
<h1 id="prepare-to-run-the-wizard">Prepare to run the wizard</h1>
106+
107+
<p>Edit <code class="language-plaintext highlighter-rouge">/etc/php/7.0/apache2/php.ini</code>.
108+
Uncomment <code class="language-plaintext highlighter-rouge">date.timezone</code> and set it.
109+
Your current timezone is shown by <code class="language-plaintext highlighter-rouge">timedatectl</code>. E.g. “Europe/London”.</p>
110+
111+
<p>Create a database to store user passwords and settings.
112+
If you need to protect against other users with access to the server,
113+
change the password (IDENTIFIED BY ‘icingaweb2’) to be more secure.
114+
(One lazy option would be to copy the password from IDO - see below).</p>
115+
116+
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>mysql
117+
118+
CREATE DATABASE icingaweb2;
119+
GRANT ALL PRIVILEGES ON icingaweb2.*
120+
TO 'icingaweb2'@'localhost' IDENTIFIED BY 'icingaweb2';
121+
quit
122+
123+
icingacli setup token create
124+
</code></pre></div></div>
125+
126+
<h1 id="run-the-wizard">Run the wizard</h1>
127+
128+
<p>Browse to <code class="language-plaintext highlighter-rouge">http://localhost/icingaweb2</code>.
129+
You should see a red box saying “It appears that you did not configure Icinga Web 2 yet” etc.
130+
Follow the link which starts the wizard.</p>
131+
132+
<p>I like to enable the “doc” module.</p>
133+
134+
<p>The password, database name etc which Debian generated for IDO,
135+
can be found in <code class="language-plaintext highlighter-rouge">/etc/icinga2/features-available/ido-mysql.conf</code>.</p>
136+
137+
<h1 id="reduce-database-privileges">Reduce database privileges</h1>
138+
139+
<p>This step is a workaround. The privileges used above are broader than documented. The wizard did not accept a pre-created database like it says it can (and if I ignored the failed validation, it then didn’t create the user that it says it did, so you can’t log in).</p>
140+
141+
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>mysql
142+
143+
DROP USER 'icingaweb2'@'localhost';
144+
GRANT SELECT, INSERT, UPDATE, DELETE,
145+
DROP, CREATE VIEW, INDEX, EXECUTE ON icingaweb2.*
146+
TO 'icingaweb2'@'localhost' IDENTIFIED BY 'icingaweb2';
147+
quit
148+
</code></pre></div></div>
149+
150+
151+
</div><a class="u-url" href="/2017/06/27/install-icingaweb2.html" hidden></a>
152+
</article>
153+
154+
</div>
155+
</main><footer class="site-footer h-card">
156+
<data class="u-url" href="/"></data>
157+
158+
<div class="wrapper">
159+
160+
<h2 class="footer-heading">Blog?</h2>
161+
162+
<div class="footer-col-wrapper">
163+
<div class="footer-col footer-col-1">
164+
<ul class="contact-list">
165+
<li class="p-name">Blog?</li></ul>
166+
</div>
167+
168+
<div class="footer-col footer-col-2"><ul class="social-media-list"><li><a href="https://github.com/sourcejedi"><svg class="svg-icon"><use xlink:href="/assets/minima-social-icons.svg#github"></use></svg> <span class="username">sourcejedi</span></a></li><li><a href="https://www.twitter.com/sourcejedi"><svg class="svg-icon"><use xlink:href="/assets/minima-social-icons.svg#twitter"></use></svg> <span class="username">sourcejedi</span></a></li></ul>
169+
</div>
170+
171+
<div class="footer-col footer-col-3">
172+
<p></p>
173+
</div>
174+
</div>
175+
176+
</div>
177+
178+
</footer>
179+
</body>
180+
181+
</html>

2017/06/27/installed-jekyll.html

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
<!DOCTYPE html>
2+
<html lang="en"><head>
3+
<meta charset="utf-8">
4+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
5+
<meta name="viewport" content="width=device-width, initial-scale=1"><!-- Begin Jekyll SEO tag v2.8.0 -->
6+
<title>How I installed Jekyll | Blog?</title>
7+
<meta name="generator" content="Jekyll v4.4.1" />
8+
<meta property="og:title" content="How I installed Jekyll" />
9+
<meta property="og:locale" content="en_US" />
10+
<meta name="description" content="As per the docs" />
11+
<meta property="og:description" content="As per the docs" />
12+
<link rel="canonical" href="/2017/06/27/installed-jekyll.html" />
13+
<meta property="og:url" content="/2017/06/27/installed-jekyll.html" />
14+
<meta property="og:site_name" content="Blog?" />
15+
<meta property="og:type" content="article" />
16+
<meta property="article:published_time" content="2017-06-27T18:31:00+01:00" />
17+
<meta name="twitter:card" content="summary" />
18+
<meta property="twitter:title" content="How I installed Jekyll" />
19+
<script type="application/ld+json">
20+
{"@context":"https://schema.org","@type":"BlogPosting","dateModified":"2017-06-27T18:31:00+01:00","datePublished":"2017-06-27T18:31:00+01:00","description":"As per the docs","headline":"How I installed Jekyll","mainEntityOfPage":{"@type":"WebPage","@id":"/2017/06/27/installed-jekyll.html"},"url":"/2017/06/27/installed-jekyll.html"}</script>
21+
<!-- End Jekyll SEO tag -->
22+
<link rel="stylesheet" href="/assets/main.css"><link type="application/atom+xml" rel="alternate" href="/feed.xml" title="Blog?" /></head>
23+
<body><header class="site-header" role="banner">
24+
25+
<div class="wrapper"><a class="site-title" rel="author" href="/">Blog?</a><nav class="site-nav">
26+
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
27+
<label for="nav-trigger">
28+
<span class="menu-icon">
29+
<svg viewBox="0 0 18 15" width="18px" height="15px">
30+
<path d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.032C17.335,0,18,0.665,18,1.484L18,1.484z M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.032C17.335,6.031,18,6.696,18,7.516L18,7.516z M18,13.516C18,14.335,17.335,15,16.516,15H1.484 C0.665,15,0,14.335,0,13.516l0,0c0-0.82,0.665-1.483,1.484-1.483h15.032C17.335,12.031,18,12.695,18,13.516L18,13.516z"/>
31+
</svg>
32+
</span>
33+
</label>
34+
35+
<div class="trigger"><a class="page-link" href="/about/">About</a></div>
36+
</nav></div>
37+
</header>
38+
<main class="page-content" aria-label="Content">
39+
<div class="wrapper">
40+
<article class="post h-entry" itemscope itemtype="http://schema.org/BlogPosting">
41+
42+
<header class="post-header">
43+
<h1 class="post-title p-name" itemprop="name headline">How I installed Jekyll</h1>
44+
<p class="post-meta">
45+
<time class="dt-published" datetime="2017-06-27T18:31:00+01:00" itemprop="datePublished">Jun 27, 2017
46+
</time></p>
47+
</header>
48+
49+
<div class="post-content e-content" itemprop="articleBody">
50+
<p>As per the <a href="https://jekyllrb.com/docs/installation/">docs</a></p>
51+
52+
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>gem install jekyll bundler
53+
</code></pre></div></div>
54+
55+
<h1 id="dependencies">Dependencies</h1>
56+
57+
<ul>
58+
<li><code class="language-plaintext highlighter-rouge">gcc</code></li>
59+
<li><code class="language-plaintext highlighter-rouge">make</code></li>
60+
<li><code class="language-plaintext highlighter-rouge">ruby-devel</code> / <code class="language-plaintext highlighter-rouge">ruby-dev</code></li>
61+
</ul>
62+
63+
<p>Additionally, on systems that use RPM:</p>
64+
65+
<ul>
66+
<li><code class="language-plaintext highlighter-rouge">/usr/lib/rpm/redhat/redhat-hardened-cc1</code></li>
67+
</ul>
68+
69+
<p>At least that’s what I was missing, on Fedora 25. <code class="language-plaintext highlighter-rouge">mkmf.log</code> showed the full path. Pass this path to <code class="language-plaintext highlighter-rouge">dnf install</code>, then you can install jekyll successfully. Or use <code class="language-plaintext highlighter-rouge">dnf provides</code> to see the necessary package, <code class="language-plaintext highlighter-rouge">redhat-rpm-config</code>.</p>
70+
71+
<h1 id="why-dont-i-install-the-github-pages-gem">Why don’t I install the Github Pages gem?</h1>
72+
73+
<p>I like GitHub Pages for free and convenient hosting, but I’m <em>not</em> using the deployment instructions from jekyll docs. I can just upload generated HTML to GitHub Pages, like any other static host.</p>
74+
75+
<p>The Jekyll docs page confuses me. The instructions advocate <a href="https://github.com/github/pages-gem">matching versions of everything including ruby</a>, to avoid compatibility issues. I like that Github provide their version information. However if breaking changes are a concern, why would you upgrade gems on someone else’s schedule? It seems mainly useful to debug a breaking change on Github - some time after you notice a failure - which was caused by Github not implementing <code class="language-plaintext highlighter-rouge">Gemfile.lock</code>.</p>
76+
77+
<p>It’s also useful for people who want to edit on Github. This is unrelated to the reason given in the Jekyll documentation, which doesn’t mention editing on Github at all.</p>
78+
79+
<p>On top of this, it’s not immediately clear how this gem matches versions of <em>ruby</em>. What implications does that have? I can avoid the two issues they documented easily, by not running years-old versions of ruby.</p>
80+
81+
<h1 id="why-dont-i-use-fedora-packages">Why don’t I use Fedora packages?</h1>
82+
83+
<p>Installing a packaged jekyll may not be the best idea. Fedora packaged jekyll 3.2.1-3.fc25 without the default theme, “minima”. You would then run an initial <code class="language-plaintext highlighter-rouge">bundle install</code> to get minima. Bundler ends up <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1464502">installing newer versions of existing gems</a> anyway. (It doesn’t upgrade jekyll; the reason being that <code class="language-plaintext highlighter-rouge">jekyll new</code> specifies its exact version in the Gemfile).</p>
84+
85+
<p>If your distribution did include all your gems (themes or plugins), presumably you can use jekyll without <code class="language-plaintext highlighter-rouge">bundle install</code>. In more recent versions of jekyll e.g. 3.5, you will have to use <code class="language-plaintext highlighter-rouge">jekyll new --skip-bundle</code>. You’d then be using jekyll in a different way to its authors. Package upgrades of the various gems will affect your site, and how it needs to be written. You won’t have a Gemfile.lock to record which versions worked correctly.</p>
86+
87+
<p>This issue is not so prominent in versions before 3.2, when gem-based themes were introduced. E.g. using 3.1.6 in Debian Stretch, <code class="language-plaintext highlighter-rouge">jekyll new</code> copied the minima files into the new site. There was no minima gem, and no Gemfile was created.</p>
88+
89+
<p>Another option I saw suggested was <code class="language-plaintext highlighter-rouge">bundle install --local</code>. As well as system-installed gems, this also considers versions from your personal gem download <em>cache</em>. The latter doesn’t make sense to me, so I’m not able to recommend this.</p>
90+
91+
</div><a class="u-url" href="/2017/06/27/installed-jekyll.html" hidden></a>
92+
</article>
93+
94+
</div>
95+
</main><footer class="site-footer h-card">
96+
<data class="u-url" href="/"></data>
97+
98+
<div class="wrapper">
99+
100+
<h2 class="footer-heading">Blog?</h2>
101+
102+
<div class="footer-col-wrapper">
103+
<div class="footer-col footer-col-1">
104+
<ul class="contact-list">
105+
<li class="p-name">Blog?</li></ul>
106+
</div>
107+
108+
<div class="footer-col footer-col-2"><ul class="social-media-list"><li><a href="https://github.com/sourcejedi"><svg class="svg-icon"><use xlink:href="/assets/minima-social-icons.svg#github"></use></svg> <span class="username">sourcejedi</span></a></li><li><a href="https://www.twitter.com/sourcejedi"><svg class="svg-icon"><use xlink:href="/assets/minima-social-icons.svg#twitter"></use></svg> <span class="username">sourcejedi</span></a></li></ul>
109+
</div>
110+
111+
<div class="footer-col footer-col-3">
112+
<p></p>
113+
</div>
114+
</div>
115+
116+
</div>
117+
118+
</footer>
119+
</body>
120+
121+
</html>

0 commit comments

Comments
 (0)